Today cannot open WebODM (Ubuntu)| Postgres is unavailable - sleeping

Any idea?
Thanks

Using the following environment:

Host: localhost
Port: 8000
Media directory: appmedia
Postgres DB directory: dbdata
SSL: NO
SSL key:
SSL certificate:
SSL insecure port redirect: 80
Celery Broker: redis://broker
Default Nodes: 1

Make sure to issue a ./webodm.sh down if you decide to change the environment.

docker-compose -f docker-compose.yml -f docker-compose.nodeodm.yml up --scale node-odm=1
[+] Running 5/0
:heavy_check_mark: Container broker Created 0.0s
:heavy_check_mark: Container webodm-node-odm-1 Created 0.0s
:heavy_check_mark: Container db Created 0.0s
:heavy_check_mark: Container worker Created 0.0s
:heavy_check_mark: Container webapp Created 0.0s
Attaching to broker, db, webapp, webodm-node-odm-1, worker
db |
db | PostgreSQL Database directory appears to contain a database; Skipping initialization
db |
broker | 1:C 11 May 2023 15:53:14.074 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
broker | 1:C 11 May 2023 15:53:14.074 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started
broker | 1:C 11 May 2023 15:53:14.074 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
broker | 1:M 11 May 2023 15:53:14.076 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
broker | 1:M 11 May 2023 15:53:14.076 # Server can’t set maximum open files to 10032 because of OS error: Operation not permitted.
broker | 1:M 11 May 2023 15:53:14.076 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase ‘ulimit -n’.
broker | 1:M 11 May 2023 15:53:14.076 * monotonic clock: POSIX clock_gettime
broker | 1:M 11 May 2023 15:53:14.095 * Running mode=standalone, port=6379.
broker | 1:M 11 May 2023 15:53:14.095 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
broker | 1:M 11 May 2023 15:53:14.095 # Server initialized
broker | 1:M 11 May 2023 15:53:14.095 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see vm.max_map_count growing steadily when vm.overcommit_memory is 2 · Issue #1328 · jemalloc/jemalloc · GitHub. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
broker | 1:M 11 May 2023 15:53:14.227 * Loading RDB produced by version 7.0.11
broker | 1:M 11 May 2023 15:53:14.227 * RDB age 1297 seconds
broker | 1:M 11 May 2023 15:53:14.228 * RDB memory usage when created 0.56 Mb
broker | 1:M 11 May 2023 15:53:14.228 * Done loading RDB, keys loaded: 0, keys expired: 0.
broker | 1:M 11 May 2023 15:53:14.228 * DB loaded from disk: 0.132 seconds
broker | 1:M 11 May 2023 15:53:14.228 * Ready to accept connections
db | LOG: database system was shut down at 2023-05-11 15:31:37 UTC
db | LOG: MultiXact member wraparound protections are now enabled
db | LOG: database system is ready to accept connections
db | LOG: autovacuum launcher started
webodm-node-odm-1 | (node:1) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.
webodm-node-odm-1 |
webodm-node-odm-1 | Please migrate your code to use AWS SDK for JavaScript (v3).
webodm-node-odm-1 | For more information, check the migration guide at Migrating your code to SDK for JavaScript V3 - AWS SDK for JavaScript
webodm-node-odm-1 | (Use node --trace-warnings ... to show where the warning was created)
webodm-node-odm-1 | info: Authentication using NoTokenRequired
webodm-node-odm-1 | info: Listening on 0.0.0.0:6367 UDP for progress updates
webodm-node-odm-1 | info: Initialized 0 tasks
webodm-node-odm-1 | info: Checking for orphaned directories to be removed…
webodm-node-odm-1 | info: Server has started on port 3000
worker | psql: error: could not connect to server: Connection timed out
worker | Is the server running on host “db” (172.21.0.3) and accepting
worker | TCP/IP connections on port 5432?
worker | Postgres is unavailable - sleeping
webapp | psql: error: could not connect to server: Connection timed out
webapp | Is the server running on host “db” (172.21.0.3) and accepting
webapp | TCP/IP connections on port 5432?
webapp | Postgres is unavailable - sleeping

1 Like

I had the same issue some time ago, and unfortunately couldn’t resolve this. The solution for me was to reinstall my server with Debian instead of Ubuntu and install WebODM.

See WebODM won't start: Postgres is unavailable - sleeping [solved]

1 Like

Hi,
I don’t want to install a debian (i want to stay with ubuntu)
I try rebuild and update but same error message "postgres sleeping)
i am under ubuntu 18 i try on another pc ubuntu 17 version older it works!!

1 Like

I can imagine. I tried it also with updating.

Fortunately for me it was on a clean installed server, so i could switch to Debian.

I have 5 other Ubuntu 22.04 servers / instances on which WebODM works fantastic. Also with updating there are no problems. But this one time I couldn’t get it to work under Ubuntu.

Hope you can find a solution.

1 Like

Thanks Aeret
i try rebuild and update but purge? there is a special command ??
and a complete desinstall is it possible ???(special command in the terminal???)

1 Like

I had this issue at somepoint. I think I had to tell docker to purge the images and start again.

1 Like