Troubleshooting Precompiled Containers

Troubleshooting Precompiled Containers

If a Docker Container fails to run, or continually restarts, you can check the logs to see what might be happening.

Current status of all docker containers can be listed using:

docker container ls -a

Docker logs can be read using:

docker logs containername

Container “edgemanager” Crashes

Often the logs will indicate issues communicating with postgres. Confirm that the “database” container is running and contains a database named “ASIServerDB”. You can access the postgres container using ‘exec’ to enter the terminal

docker exec -it database bash psql -U postgres -d postgres CREATE DATABASE “ASIServerDB”; \q exit

Container “database” Crashes

The .tar of postgres that we include is a snapshot that may not work with all environments. If the container can’t continue running and the log contains errors like:

popen failure: Cannot allocate memory initdb: error: program "postgres" is needed by initdb but was not found in the same directory as "/usr/lib/postgresql/15/bin/initdb"

Then the .tar may not be compatible with your system. If you have internet access, you can resolve this by removing the container and image:

docker container rm database docker image rm postgres_tar:latest

Then recreate the docker container from Dockerhub:

docker run -d --name database --network autosol --restart always -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=”ASIServerDB” postgres

In some cases, you may need to manually specify the Postgres build. For example, on a Debian 9 machine:

docker run -d --name database --network autosol --mount --restart always -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=”ASIServerDB” postgres:11.16-stretch

For assistance, please submit a ticket via our Support Portal, email autosol.support@autosoln.com or call 281.286.6017 to speak to a support team member.