Error starting a Container

Troubleshoot an appliance container that stops immediately or that won't start.

An appliance container started in the background stops immediately

When starting an Appliance Container in the background (-d flag when using the docker run command), the Container might stop immediately, even though it issued a Container ID to the console.

It generally occurs because the initialization routines in the Container fail due to incorrect or insufficient environment variables that are passed to the Container. These logs can be visible if the Container is run in the foreground, but can also be visible in Docker logs.

Note: For more information, see Docker run command and Container environment variables.

Example: Error when starting an Accesser Container

# sudo docker run -it clevos-accesser:3.19.4.1

[ ok ] Configuring Container persistence ... done.
Error: No manager IP specified
expected DS_MANAGER_IP=“<ip>”
Error: /etc/rcS.Container/300-env-mapping failed with return code 1

In this case, the environment variable DS_MANAGER_IP was expected but was not present.

An appliance container won't start

Check that the container persistence directory is owned by UID 1000670000 and GID 600

  • ls -ld <PATH_OF_CONTAINER_PERSISTENCE_DIRECTORY>
    where <PATH_OF_CONTAINER_PERSISTENCE_DIRECTORY> is the path of the container persistence directory.
Check logs/dsnet-core/stdout.log in container-persistence for one of the following errors:
  • ulimit max open files configured to <CONFIGURED_OPEN_FILES> instead of <MAX_OPEN_FILES>
    where <CONFIGURED_OPEN_FILES> is the number of open files currently allowed by Docker and <MAX_OPEN_FILES> is the number of open files needed for the dsnet-core process.
  • ulimit max locked memory configured to <CONFIGURED_LOCKED_MEMORY> instead of <MAX_LOCKED_MEMORY>
    where <CONFIGURED_LOCKED_MEMORY> is the amount of locked memory currently allowed by Docker and <MAX_LOCKED_MEMORY> is the amount of locked memory needed for the dsnet-core process.

If either error appears, add -ulimit nofile=1000000:1000000 --ulimit memlock=-1 to the docker run command.