Penpot-backend unable to connect to postgres

Fresh Ubuntu 22.04 install
Fresh Docker
Fresh config.env and docker-compose.yaml unmodified

ubuntu@penpot:~/penpot$ docker-compose ps
          Name                        Command               State                   Ports                
penpot_penpot-backend_1    /bin/bash                 Exit 1                                       
penpot_penpot-exporter_1   /usr/local/nodejs/bin/node ...   Up                                           
penpot_penpot-frontend_1   /bin/bash / n ...   Up>80/tcp,:::9001->80/tcp
penpot_penpot-postgres_1 postgres    Up       5432/tcp                            
penpot_penpot-redis_1 redis ...   Up       6379/tcp                            
ubuntu@penpot:~/penpot$ docker-compose up penpot-backend
penpot_penpot-postgres_1 is up-to-date
penpot_penpot-redis_1 is up-to-date
Starting penpot_penpot-backend_1 ... done
Attaching to penpot_penpot-backend_1
penpot-backend_1   | + exec /usr/lib/jvm/openjdk/bin/java -jar penpot.jar -m app.main
penpot-backend_1   | [2022-10-24 19:09:34.262] I app.metrics - action="initialize metrics"
penpot-backend_1   | [2022-10-24 19:09:34.299] I app.db - hint="initialize connection pool", name="main", uri="postgresql://penpot-postgres/penpot", read-only=false, with-credentials=true, min-size=0, max-size=60
penpot-backend_1   | Execution error (SQLTransientConnectionException) at com.zaxxer.hikari.pool.HikariPool/createTimeoutException (
penpot-backend_1   | main - Connection is not available, request timed out after 10002ms.
penpot-backend_1   | 
penpot-backend_1   | Full report at:
penpot-backend_1   | /tmp/clojure-120441958685947261.edn
penpot_penpot-backend_1 exited with code 1

It seems that you are using an older docker version, previous than v2. It should work, but we are not actively testing it.

Please change in your config.env this line


to this


and check if it works. If not, could you try to update to the latest docker version?

So sorry, but a reboot was all that was needed to make it work, there was something broken with the docker networking, I realized that a few minutes after my poste was hidden.

It’s working great now , thank you.

1 Like

Good, then! Glad it works now.