Penpot Backend exiting after fresh self-hosted install bug:
Steps To Reproduce
After a fresh and clean installation of the latest version of Penpot on my cloud machine with docker, my penpot-backend is exiting after running docker compose.
Expected behavior
Regular login and running docker backend.
Actual behavior
I found this log inside Penpot Backend container:
+ exec /usr/lib/jvm/openjdk/bin/java -jar penpot.jar -m app.main [2022-11-22 19:18:50.707] I app.metrics - action="initialize metrics" [2022-11-22 19:18:50.796] I app.db - hint="initialize connection pool", name="main", uri="postgresql://postgres/penpot", read-only=false, with-credentials=true, min-size=0, max-size=60 Execution error (UnknownHostException) at sun.nio.ch.NioSocketImpl/connect (NioSocketImpl.java:564). postgres Full report at: /tmp/clojure-10439546947645451583.edn
On the frontend I got this message on the console with a "BAD GATEWAY" message being displayed:
Failed to load resource: the server responded with a status of 502 (Bad Gateway)
Screenshots or video
No response
Desktop (please complete the following information)
No response
Smartphone (please complete the following information)
No response
Environment (please complete the following information)
Self Hosted
- Ubuntu 20.04 LTS
- Docker version 20.10.19, build d85ef84
Frontend Stack Trace
No response
Backend Stack Trace
No response
Additional context
No response
Hello @afonsolopez
Unfortunately, with provided information I can only interpret the log you pasted and it looks pretty clear: UnknownHostException. This mean that the backend is unable to connect to the database.
Without more information about how you started it and the configuration, etc.. this the only that I can say. And it does not looks like a bug.
Hey man, first of all thanks for the help.
The only thing that I did was running the docker compose file from the docs using the config.env without any change.
All the containers from PenPot runs ok, but only the backend one exits after less than a minute after running the docker compose command.
Can you tell me which other info I can give you in order to make easier to find the main cause of it?
FYI I did the same process locally to my raspberry pi and it worked well…
Well, I forgot to mention that I was doing this process trough Portainer, after running directly from the command line it worked as usual.
I’m just wondering what happened wrong because on my Pi 4 I use it in the same way with Portainer and it just works fine….
Anyway it’s solved 🙂
I'm having this problem now although I am using Unraid to manage the config. Will give it a go without Unraid to see how it goes.
Yep running it through the docker CLI solved the problem. So strange that it doesn't work in any other environment. Should be the same right?
Yep, It was the same case with me with Portainer….
I'm working on changing the compose a bit for make it more compatible with stull like portainer. https://gist.github.com/niwinz/aced79bfdd55a5da3d02a1051e5c48ec here you have a preview, but take care, this is a WIP, and is still not merged to the penpot main development branch, but you can test it. It also includes a reference to penpot-admin (an in development) administration panel for on-premise penpot (still private)
Sick thanks. I will try it out and check back with results
The latest release includes all the fixes and relevant changes.