Another Bad Gateway error

Hello, thank you all for the time you can dedicate to me.

I followed the tutorial for the self hosted docker solution. I’m running containers on fedora 41 and podman + podman-compose. At the first start I could not connect to the local instance on port 9001, but searching on the internet I modified the file docker-compose.yaml replacing port 8080 with port 80 for the frontend.
After that I managed to see the home page with the message “bad gateway”.

I have already read other posts related to bad gateway but none of these seem to match my case.
I’m adding the information I’ve seen asked for in these cases

container status

CONTAINER ID  IMAGE                                COMMAND               CREATED        STATUS         PORTS                             NAMES
ad7389d9703c  docker.io/penpotapp/exporter:latest  node app.js           5 minutes ago  Up 5 minutes                                     penpot_penpot-exporter_1
56ed6bb1a765  docker.io/library/postgres:15        postgres              5 minutes ago  Up 5 minutes   5432/tcp                          penpot_penpot-postgres_1
d96214f2bde8  docker.io/library/redis:7.2          redis-server          5 minutes ago  Up 5 minutes   6379/tcp                          penpot_penpot-redis_1
86dda12ef3e8  docker.io/sj26/mailcatcher:latest    --ip 0.0.0.0          5 minutes ago  Up 5 minutes   0.0.0.0:1080->1080/tcp, 1025/tcp  penpot_penpot-mailcatch_1
7e6b862dfd6c  docker.io/penpotapp/backend:latest   /bin/bash run.sh      5 minutes ago  Up 12 seconds                                    penpot_penpot-backend_1
9a493660d11d  docker.io/penpotapp/frontend:latest  nginx -g daemon o...  5 minutes ago  Up 5 minutes   0.0.0.0:9001->80/tcp              penpot_penpot-frontend_1

backend log

  • exec /opt/jdk/bin/java -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Dlog4j2.configurationFile=log4j2.xml -XX:-OmitStackTraceInFastThrow -Dpolyglot.engine.WarnInterpreterOnly=false --enable-preview -jar penpot.jar -m app.main
    Error on validating configuration:
    – Configuration Validation Error - app.common.schema:229 –

Value

 {:assets-path ...,
   :assets-storage-backend ...,
   :auto-file-snapshot-every ...,
   :auto-file-snapshot-timeout ...,
   :auto-file-snapshot-total ...,
   :database-password ...,
   :database-uri ...,
   :database-username ...,
   :default-blob-version ...,
   :email-verify-threshold ...,
   :flags ...,
   :host ...,
   :initial-project-skey ...,
   :ldap-attrs-email ...,
   :ldap-attrs-fullname ...,
   :ldap-attrs-username ...,
   :ldap-user-query ...,
   :media-max-file-size ...,
   :objects-storage-backend ...,
   :objects-storage-fs-directory ...,
   :profile-bounce-max-age ...,
   :profile-bounce-threshold ...,
   :profile-complaint-max-age ...,
   :profile-complaint-threshold ...,
   :public-uri ...,
   :redis-uri ...,
   :rpc-climit-config ...,
   :rpc-rlimit-config ...,
   :smtp-default-from ...,
   :smtp-default-reply-to ...,
   :smtp-host ...,
   :smtp-port ...,
   :smtp-ssl "False",
   :smtp-tls "False",
   :storage-assets-fs-directory ...,
   :telemetry-enabled "False",
   :telemetry-uri ...,
   :tenant ...}

Errors

  {:smtp-ssl ["expected boolean"],
   :smtp-tls ["expected boolean"],
   :telemetry-enabled ["expected boolean"]}

------------------------------------------------------------

frontend log

10.89.0.159 - - [01/Jan/2025:15:39:23 +0000] "GET /js/config.js?ts=1731662552642 HTTP/1.1" 200 132 
"http://localhost:9001/" "Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"

10.89.0.159 - - [01/Jan/2025:15:39:23 +0000] "GET / HTTP/1.1" 200 565757 "-" 
"Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"

10.89.0.159 - - [01/Jan/2025:15:39:24 +0000] "HEAD / HTTP/1.1" 200 0 "-" 
"Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"

10.89.0.159 - - [01/Jan/2025:15:39:24 +0000] "GET /rasterizer.html HTTP/1.1" 200 320
"http://localhost:9001/" "Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"

10.89.0.159 - - [01/Jan/2025:15:39:24 +0000] "GET /js/config.js?ts=1731662552642 HTTP/1.1" 200 132
"http://localhost:9001/rasterizer.html" "Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"

2025/01/01 15:39:27 [error] 5#5: *2 connect() failed (113: No route to host) while connecting to upstream,
client: 10.89.0.159, server: _, request: "GET /api/rpc/command/get-profile HTTP/1.1",
upstream: "http://10.89.0.158:6060/api/rpc/command/get-profile", host: "localhost:9001"

I added some blank lines and line breaks for better readability…

I tried to follow the instructions to add a new user but I have very little time to write because after a few seconds the terminal returns to the prompt.

Another strange thing is the cpu workload after about 30 seconds from the containers startup.
See screnshot…

I am getting a similar “Bad Gateway” error page. I have installed the latest Penpot on the latest Docker. This is on an Ubuntu v22 machine, as well as a CentOS v9 machine. Penpot is coming up and, when I access it, it displays a page shown below:

Another thing I note is that I am seeing the penpot-backend is stopping and restarting. One of the "cycles I am seeing is shown below:

penpot-penpot-backend-1    | [2025-01-12 02:10:05.535] I app.metrics - action="initialize metrics"
penpot-penpot-backend-1    | [2025-01-12 02:10:05.554] I app.db - hint="initialize connection pool", name="main", uri="postgresql://penpot-postgres/penpot", read-only=false, credentials=true, min-size=0, max-size=60
penpot-penpot-backend-1    | [2025-01-12 02:10:05.582] I app.migrations - hint="running migrations", module=:app.migrations/migrations
penpot-penpot-backend-1    | SUMMARY:
penpot-penpot-backend-1    |  →  clojure.lang.ExceptionInfo: Assertion failed on key :app.setup/props when building system (core.cljc:540)
penpot-penpot-backend-1    |  →  java.lang.AssertionError: Assert failed: expected valid key string (setup.clj:78)
penpot-penpot-backend-1    | DETAIL:
penpot-penpot-backend-1    |  →  clojure.lang.ExceptionInfo: Assertion failed on key :app.setup/props when building system (core.cljc:540)
penpot-penpot-backend-1    |     at: integrant.core$wrap_assert_exception.invokeStatic(core.cljc:540)
penpot-penpot-backend-1    |         integrant.core$wrap_assert_exception.invoke(core.cljc:539)
penpot-penpot-backend-1    |         integrant.core$wrapped_assert_key.invokeStatic(core.cljc:550)
penpot-penpot-backend-1    |         integrant.core$wrapped_assert_key.invoke(core.cljc:547)
penpot-penpot-backend-1    |         integrant.core$build_key.invokeStatic(core.cljc:425)
penpot-penpot-backend-1    |         integrant.core$build_key.invoke(core.cljc:423)
penpot-penpot-backend-1    |         clojure.core$partial$fn__5931.invoke(core.clj:2656)
penpot-penpot-backend-1    |         clojure.core.protocols$fn__8275.invokeStatic(protocols.clj:167)
penpot-penpot-backend-1    |         clojure.core.protocols/fn(protocols.clj:123)
penpot-penpot-backend-1    |         clojure.core.protocols$fn__8229$G__8224__8238.invoke(protocols.clj:19)
penpot-penpot-backend-1    |         clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
penpot-penpot-backend-1    |         clojure.core.protocols$fn__8262.invokeStatic(protocols.clj:74)
penpot-penpot-backend-1    |         clojure.core.protocols/fn(protocols.clj:74)
penpot-penpot-backend-1    |         clojure.core.protocols$fn__8203$G__8198__8216.invoke(protocols.clj:13)
penpot-penpot-backend-1    |         clojure.core$reduce.invokeStatic(core.clj:6965)
penpot-penpot-backend-1    |         clojure.core$reduce.invoke(core.clj:6947)
penpot-penpot-backend-1    |         integrant.core$build.invokeStatic(core.cljc:453)
penpot-penpot-backend-1    |         integrant.core$build.invoke(core.cljc:430)
penpot-penpot-backend-1    |         integrant.core$init.invokeStatic(core.cljc:675)
penpot-penpot-backend-1    |         integrant.core$init.invoke(core.cljc:667)
penpot-penpot-backend-1    |         integrant.core$init.invokeStatic(core.cljc:672)
penpot-penpot-backend-1    |         integrant.core$init.invoke(core.cljc:667)
penpot-penpot-backend-1    |         app.main$start$fn__48565.invoke(main.clj:551)
penpot-penpot-backend-1    |         clojure.lang.AFn.applyToHelper(AFn.java:154)
penpot-penpot-backend-1    |         clojure.lang.AFn.applyTo(AFn.java:144)
penpot-penpot-backend-1    |         clojure.lang.Var.alterRoot(Var.java:310)
penpot-penpot-backend-1    |         clojure.core$alter_var_root.invokeStatic(core.clj:5563)
penpot-penpot-backend-1    |         clojure.core$alter_var_root.doInvoke(core.clj:5558)
penpot-penpot-backend-1    |         clojure.lang.RestFn.invoke(RestFn.java:428)
penpot-penpot-backend-1    |         app.main$start.invokeStatic(main.clj:545)
penpot-penpot-backend-1    |         app.main$start.invoke(main.clj:541)
penpot-penpot-backend-1    |         app.main$_main.invokeStatic(main.clj:611)
penpot-penpot-backend-1    |         app.main$_main.doInvoke(main.clj:603)
penpot-penpot-backend-1    |         clojure.lang.RestFn.invoke(RestFn.java:400)
penpot-penpot-backend-1    |         clojure.lang.AFn.applyToHelper(AFn.java:152)
penpot-penpot-backend-1    |         clojure.lang.RestFn.applyTo(RestFn.java:135)
penpot-penpot-backend-1    |         clojure.lang.Var.applyTo(Var.java:707)
penpot-penpot-backend-1    |         clojure.core$apply.invokeStatic(core.clj:667)
penpot-penpot-backend-1    |         clojure.main$main_opt.invokeStatic(main.clj:515)
penpot-penpot-backend-1    |         clojure.main$main_opt.invoke(main.clj:511)
penpot-penpot-backend-1    |         clojure.main$main.invokeStatic(main.clj:665)
penpot-penpot-backend-1    |         clojure.main$main.doInvoke(main.clj:617)
penpot-penpot-backend-1    |         clojure.lang.RestFn.applyTo(RestFn.java:140)
penpot-penpot-backend-1    |         clojure.lang.Var.applyTo(Var.java:707)
penpot-penpot-backend-1    |         clojure.main.main(main.java:40)
penpot-penpot-backend-1    |     dt: {:reason :integrant.core/build-failed-spec,
penpot-penpot-backend-1    |          :system
penpot-penpot-backend-1    |          {:app.auth.oidc.providers/github nil,
penpot-penpot-backend-1    |           :app.db/pool #object[com.zaxxer.hikari.HikariDataSource 0x7745f680 "HikariDataSource (main)"],
penpot-penpot-backend-1    |           :app.auth.oidc.providers/gitlab nil,
penpot-penpot-backend-1    |           :app.http.client/client
penpot-penpot-backend-1    |           #object[jdk.internal.net.http.HttpClientFacade 0x40bc74be "jdk.internal.net.http.HttpClientImpl@3aaba0a(1)"],
penpot-penpot-backend-1    |           :app.email/blacklist nil,
penpot-penpot-backend-1    |           :app.auth.oidc.providers/generic nil,
penpot-penpot-backend-1    |           :app.email/whitelist nil,
penpot-penpot-backend-1    |           :app.migrations/migrations nil,
penpot-penpot-backend-1    |           ...},
penpot-penpot-backend-1    |          :key :app.setup/props,
penpot-penpot-backend-1    |          :value
penpot-penpot-backend-1    |          {:app.db/pool #object[com.zaxxer.hikari.HikariDataSource 0x7745f680 "HikariDataSource (main)"],
penpot-penpot-backend-1    |           :app.main/migrations nil}}
penpot-penpot-backend-1    |
penpot-penpot-backend-1    |  →  java.lang.AssertionError: Assert failed: expected valid key string (setup.clj:78)
penpot-penpot-backend-1    |     at: app.setup$eval42321$fn__42322.invoke(setup.clj:78)
penpot-penpot-backend-1    |         clojure.lang.MultiFn.invoke(MultiFn.java:234)
penpot-penpot-backend-1    |         integrant.core$wrapped_assert_key.invokeStatic(core.cljc:548)
penpot-penpot-backend-1    |         integrant.core$wrapped_assert_key.invoke(core.cljc:547)
penpot-penpot-backend-1    |         integrant.core$build_key.invokeStatic(core.cljc:425)
penpot-penpot-backend-1    |         integrant.core$build_key.invoke(core.cljc:423)
penpot-penpot-backend-1    |         clojure.core$partial$fn__5931.invoke(core.clj:2656)
penpot-penpot-backend-1    |         clojure.core.protocols$fn__8275.invokeStatic(protocols.clj:167)
penpot-penpot-backend-1    |         clojure.core.protocols/fn(protocols.clj:123)
penpot-penpot-backend-1    |         clojure.core.protocols$fn__8229$G__8224__8238.invoke(protocols.clj:19)
penpot-penpot-backend-1    |         clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
penpot-penpot-backend-1    |         clojure.core.protocols$fn__8262.invokeStatic(protocols.clj:74)
penpot-penpot-backend-1    |         clojure.core.protocols/fn(protocols.clj:74)
penpot-penpot-backend-1    |         clojure.core.protocols$fn__8203$G__8198__8216.invoke(protocols.clj:13)
penpot-penpot-backend-1    |         clojure.core$reduce.invokeStatic(core.clj:6965)
penpot-penpot-backend-1    |         clojure.core$reduce.invoke(core.clj:6947)
penpot-penpot-backend-1    |         integrant.core$build.invokeStatic(core.cljc:453)
penpot-penpot-backend-1    |         integrant.core$build.invoke(core.cljc:430)
penpot-penpot-backend-1    |         integrant.core$init.invokeStatic(core.cljc:675)
penpot-penpot-backend-1    |         integrant.core$init.invoke(core.cljc:667)
penpot-penpot-backend-1    |         integrant.core$init.invokeStatic(core.cljc:672)
penpot-penpot-backend-1    |         integrant.core$init.invoke(core.cljc:667)
penpot-penpot-backend-1    |         app.main$start$fn__48565.invoke(main.clj:551)
penpot-penpot-backend-1    |         clojure.lang.AFn.applyToHelper(AFn.java:154)
penpot-penpot-backend-1    |         clojure.lang.AFn.applyTo(AFn.java:144)
penpot-penpot-backend-1    |         clojure.lang.Var.alterRoot(Var.java:310)
penpot-penpot-backend-1    |         clojure.core$alter_var_root.invokeStatic(core.clj:5563)
penpot-penpot-backend-1    |         clojure.core$alter_var_root.doInvoke(core.clj:5558)
penpot-penpot-backend-1    |         clojure.lang.RestFn.invoke(RestFn.java:428)
penpot-penpot-backend-1    |         app.main$start.invokeStatic(main.clj:545)
penpot-penpot-backend-1    |         app.main$start.invoke(main.clj:541)
penpot-penpot-backend-1    |         app.main$_main.invokeStatic(main.clj:611)
penpot-penpot-backend-1    |         app.main$_main.doInvoke(main.clj:603)
penpot-penpot-backend-1    |         clojure.lang.RestFn.invoke(RestFn.java:400)
penpot-penpot-backend-1    |         clojure.lang.AFn.applyToHelper(AFn.java:152)
penpot-penpot-backend-1    |         clojure.lang.RestFn.applyTo(RestFn.java:135)
penpot-penpot-backend-1    |         clojure.lang.Var.applyTo(Var.java:707)
penpot-penpot-backend-1    |         clojure.core$apply.invokeStatic(core.clj:667)
penpot-penpot-backend-1    |         clojure.main$main_opt.invokeStatic(main.clj:515)
penpot-penpot-backend-1    |         clojure.main$main_opt.invoke(main.clj:511)
penpot-penpot-backend-1    |         clojure.main$main.invokeStatic(main.clj:665)
penpot-penpot-backend-1    |         clojure.main$main.doInvoke(main.clj:617)
penpot-penpot-backend-1    |         clojure.lang.RestFn.applyTo(RestFn.java:140)
penpot-penpot-backend-1    |         clojure.lang.Var.applyTo(Var.java:707)
penpot-penpot-backend-1    |         clojure.main.main(main.java:40)
penpot-penpot-backend-1    |
penpot-penpot-backend-1    |
penpot-penpot-backend-1 exited with code 0

Does anyone have any idea why Penpot is doing this? Apparently, this has been happening for quite some time for different reasons – though none of those reasons seem to apply to my situation or that of domini.

Can someone help with this problem???

Add PENPOT_SECRET_KEY to your docker-compose.yml.

Add PENPOT_SECRET_KEY to docker-compose.yml by codiflow · Pull Request #5558 · penpot/penpot · GitHub

Hello,
I saw your post.

I add an update to my previous message explaining how I solved the problem.
After reading about the different management of the internal network in Podman compose compared to Docker compose, I installed the following packages:

  • docker-buildx-plugin.x86_64
  • docker-ce.x86_64
  • docker-ce-cli.x86_64
  • docker-ce-rootless-extras.x86_64
  • docker-compose-plugin.x86_64

After that, relaunching the docker compose file, everything worked correctly.
I don’t know if this applies to your situation. I’m writing this as a note for anyone who is running Fedora and wants to use podman compose instead of docker compose.

Domini

The adding of the secret key fixed the problem. Very interesting…