Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: penpot: "server not available" #4957

Closed
endquote opened this issue Jan 25, 2025 · 15 comments · Fixed by #5217
Closed

[Bug]: penpot: "server not available" #4957

endquote opened this issue Jan 25, 2025 · 15 comments · Fixed by #5217

Comments

@endquote
Copy link

endquote commented Jan 25, 2025

Error Message and Logs

I had penpot working for a while. Recently Coolify said "latest configuration was not applied", so I restarted it. Now it just gives me "server not available" when accessing.

Tried syncing the compose file with the latest version, no luck.

Completely deleted penpot and set it up again, same result.

All containers show as healthy except front end. All containers seem to have good logs, front end shows no logs. Something about the health checks and "depends" settings seems to not be working.

Coolify Version

v4.0.0-beta.389

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24

@endquote endquote added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Jan 25, 2025
@endquote
Copy link
Author

@OliverSpeir @peaklabs-dev is it working for you?

@OliverSpeir
Copy link
Contributor

I haven't tried the new dependson config I just manually applied the new health checks when I was testing my PR

I'll try tonight and let you know

@peaklabs-dev
Copy link
Member

Yes, it works for me. Another user also had exactly 1 service that did not work. Not really sure what is going on.

@eugeneduvenage
Copy link

eugeneduvenage commented Jan 25, 2025

I am seeing the same failure, brand new install of coolify and penpot.

Container penpot-backend-vc0ckskc4cgs8o48cso8844w  Error
dependency failed to start: container penpot-backend-vc0ckskc4cgs8o48cso8844w is unhealthy

There are no errors in the backend logs as far as I can see, just the java service starting up.

2025-01-25T16:22:58.152323775Z [2025-01-25 16:22:58.151] I app.worker.dispatcher - hint="started"
2025-01-25T16:22:58.153132475Z [2025-01-25 16:22:58.152] I app.worker.executor - hint="monitor started", name="default"
2025-01-25T16:22:58.167577286Z [2025-01-25 16:22:58.167] I app.worker.runner - hint="started", id=0, queue="default"
2025-01-25T16:22:58.168359730Z [2025-01-25 16:22:58.168] I app.worker.runner - hint="started", id=0, queue="webhooks"
2025-01-25T16:22:58.176243708Z [2025-01-25 16:22:58.175] I app.srepl - hint="initializing repl server", name="prepl", port=6063, host="localhost"
2025-01-25T16:22:58.181397956Z [2025-01-25 16:22:58.180] I app.main - hint="welcome to penpot", flags="backend-openapi-doc,login-with-password,backend-api-doc,secure-session-cookies,v2-migration,export-file-v3,backend-worker,smtp,email-verification,registration,prepl-server", worker?=true, version="2.4.1"

My penpot frontend never responds and there are no logs unless I comment out the health check, then I get:

2025-01-25T16:22:10.209765749Z 2025/01/25 16:22:10 [emerg] 1#1: host not found in upstream "penpot-backend" in /etc/nginx/nginx.conf:105
2025-01-25T16:22:10.209815047Z nginx: [emerg] host not found in upstream "penpot-backend" in /etc/nginx/nginx.conf:105

I did see an issue in the penpot repo penpot/penpot#5430 that spoke of changes to the ports for the frontend in the images in the 2.4.0 and 2.4.1, not sure if those have been accounted for in the coolify current compose file.

@Ventajou
Copy link

I had the same issue with the frontend container being unhealthy, I was able to fix it by updating the health check in the compose file to use port 8080 instead of 80

@endquote
Copy link
Author

endquote commented Feb 3, 2025

Looks like there's some action on this https://github.com/penpot/penpot/releases/tag/2.5.0-RC1

@peaklabs-dev peaklabs-dev added this to the v4.0.0 Stable Release milestone Feb 11, 2025
@SebasGDEV
Copy link

I've removed all healthchecks for frontend but I cantt start penpot frontend because shows me this

2025-02-12T15:23:58.481104862Z 2025/02/12 15:23:58 [emerg] 1#1: host not found in upstream "penpot-backend" in /etc/nginx/nginx.conf:105
2025-02-12T15:23:58.481128526Z nginx: [emerg] host not found in upstream "penpot-backend" in /etc/nginx/nginx.conf:105

Someone can help me? please

@endquote
Copy link
Author

I suggested that the Penpot community officially support Coolify here.

@eugeneduvenage
Copy link

@SebasGDEV The main issue is that the Coolify compose file expects Penpot on port 80, you need to make it proxy to port 8080 instead as the newer versions of Penpot have changed, I have it working smoothly. This is from memory but I think the main changes were to change the frontend health check to port 8080 and to add the environment variable SERVICE_FQDN_FRONTEND_8080, which I set to $SERVICE_FQDN_FRONTEND:8080.

@ycsh-w
Copy link

ycsh-w commented Feb 19, 2025

@SebasGDEV The main issue is that the Coolify compose file expects Penpot on port 80, you need to make it proxy to port 8080 instead as the newer versions of Penpot have changed, I have it working smoothly. This is from memory but I think the main changes were to change the frontend health check to port 8080 and to add the environment variable SERVICE_FQDN_FRONTEND_8080, which I set to $SERVICE_FQDN_FRONTEND:8080.

Hmm this is a good catch but even if I set this I am still not able to get a fresh install to work. I am using Cloudflare Tunnel with my hostname btw.

@stewnight
Copy link
Contributor

Hi guys, can you please try the following docker-compose to see if it works

  • Changed to port 8080
  • Increased the backend health check duration as the first run of migrations takes a while.
  • If all but the frontend work on the first run, please check the backend logs to ensure the migration has completed
# documentation: https://help.penpot.app/technical-guide/getting-started/#install-with-docker
# slogan: Penpot is the first Open Source design and prototyping platform for product teams.
# tags: penpot,design,prototyping,figma,open,source
# logo: svgs/penpot.svg
# port: 8080

services:
  frontend:
    image: penpotapp/frontend:latest
    volumes:
      - penpot-assets:/opt/data/assets
    depends_on:
      penpot-backend:
        condition: service_healthy
      penpot-exporter:
        condition: service_healthy
    environment:
      - SERVICE_FQDN_FRONTEND_8080
      - PENPOT_FLAGS=${PENPOT_FRONTEND_FLAGS:-enable-login-with-password}
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:8080']
      interval: 2s
      timeout: 10s
      retries: 15

  penpot-backend:
    image: penpotapp/backend:latest
    volumes:
      - penpot-assets:/opt/data/assets
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
    environment:
      - PENPOT_FLAGS=${PENPOT_BACKEND_FLAGS:-enable-login-with-password enable-smtp enable-prepl-server}
      - PENPOT_HTTP_SERVER_PORT=6060
      - PENPOT_SECRET_KEY=$SERVICE_REALBASE64_64_PENPOT
      - PENPOT_PUBLIC_URI=$SERVICE_FQDN_FRONTEND_8080
      - PENPOT_BACKEND_URI=http://penpot-backend
      - PENPOT_EXPORTER_URI=http://penpot-exporter
      - PENPOT_DATABASE_URI=postgresql://postgres/${POSTGRES_DB:-penpot}
      - PENPOT_DATABASE_USERNAME=${SERVICE_USER_POSTGRES}
      - PENPOT_DATABASE_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
      - PENPOT_REDIS_URI=redis://redis/0
      - PENPOT_ASSETS_STORAGE_BACKEND=assets-fs
      - PENPOT_STORAGE_ASSETS_FS_DIRECTORY=/opt/data/assets
      - PENPOT_TELEMETRY_ENABLED=${PENPOT_TELEMETRY_ENABLED:-false}
      - PENPOT_SMTP_DEFAULT_FROM=${PENPOT_SMTP_DEFAULT_FROM:[email protected]}
      - PENPOT_SMTP_DEFAULT_REPLY_TO=${PENPOT_SMTP_DEFAULT_REPLY_TO:[email protected]}
      - PENPOT_SMTP_HOST=${PENPOT_SMTP_HOST:-mailpit}
      - PENPOT_SMTP_PORT=${PENPOT_SMTP_PORT:-1025}
      - PENPOT_SMTP_USERNAME=${PENPOT_SMTP_USERNAME:-penpot}
      - PENPOT_SMTP_PASSWORD=${PENPOT_SMTP_PASSWORD:-penpot}
      - PENPOT_SMTP_TLS=${PENPOT_SMTP_TLS:-false}
      - PENPOT_SMTP_SSL=${PENPOT_SMTP_SSL:-false}
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:6060/readyz']
      interval: 10s
      timeout: 30s
      retries: 15

  penpot-exporter:
    image: penpotapp/exporter:latest
    environment:
      - PENPOT_PUBLIC_URI=$SERVICE_FQDN_FRONTEND_8080
      - PENPOT_REDIS_URI=redis://redis/0
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:6061/readyz']
      interval: 2s
      timeout: 10s
      retries: 15

  mailpit:
    image: axllent/mailpit:latest
    environment:
      - SERVICE_FQDN_MAILPIT_8025
    healthcheck:
      test: ['CMD', '/mailpit', 'readyz']
      interval: 5s
      timeout: 20s
      retries: 10

  postgres:
    image: postgres:15
    volumes:
      - penpot-postgresql-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_INITDB_ARGS=--data-checksums
      - POSTGRES_USER=$SERVICE_USER_POSTGRES
      - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
      - POSTGRES_DB=${POSTGRES_DB:-penpot}
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}']
      interval: 5s
      timeout: 20s
      retries: 10

  redis:
    image: redis:7-alpine
    command: redis-server --appendonly yes
    volumes:
      - penpot-redis-data:/data
    healthcheck:
      test: ['CMD', 'redis-cli', 'ping']
      interval: 5s
      timeout: 20s
      retries: 10

@SebasGDEV
Copy link

Hi guys, can you please try the following docker-compose to see if it works

  • Changed to port 8080
  • Increased the backend health check duration as the first run of migrations takes a while.
  • If all but the frontend work on the first run, please check the backend logs to ensure the migration has completed
# documentation: https://help.penpot.app/technical-guide/getting-started/#install-with-docker
# slogan: Penpot is the first Open Source design and prototyping platform for product teams.
# tags: penpot,design,prototyping,figma,open,source
# logo: svgs/penpot.svg
# port: 8080

services:
  frontend:
    image: penpotapp/frontend:latest
    volumes:
      - penpot-assets:/opt/data/assets
    depends_on:
      penpot-backend:
        condition: service_healthy
      penpot-exporter:
        condition: service_healthy
    environment:
      - SERVICE_FQDN_FRONTEND_8080
      - PENPOT_FLAGS=${PENPOT_FRONTEND_FLAGS:-enable-login-with-password}
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:8080']
      interval: 2s
      timeout: 10s
      retries: 15

  penpot-backend:
    image: penpotapp/backend:latest
    volumes:
      - penpot-assets:/opt/data/assets
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
    environment:
      - PENPOT_FLAGS=${PENPOT_BACKEND_FLAGS:-enable-login-with-password enable-smtp enable-prepl-server}
      - PENPOT_HTTP_SERVER_PORT=6060
      - PENPOT_SECRET_KEY=$SERVICE_REALBASE64_64_PENPOT
      - PENPOT_PUBLIC_URI=$SERVICE_FQDN_FRONTEND_8080
      - PENPOT_BACKEND_URI=http://penpot-backend
      - PENPOT_EXPORTER_URI=http://penpot-exporter
      - PENPOT_DATABASE_URI=postgresql://postgres/${POSTGRES_DB:-penpot}
      - PENPOT_DATABASE_USERNAME=${SERVICE_USER_POSTGRES}
      - PENPOT_DATABASE_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
      - PENPOT_REDIS_URI=redis://redis/0
      - PENPOT_ASSETS_STORAGE_BACKEND=assets-fs
      - PENPOT_STORAGE_ASSETS_FS_DIRECTORY=/opt/data/assets
      - PENPOT_TELEMETRY_ENABLED=${PENPOT_TELEMETRY_ENABLED:-false}
      - PENPOT_SMTP_DEFAULT_FROM=${PENPOT_SMTP_DEFAULT_FROM:[email protected]}
      - PENPOT_SMTP_DEFAULT_REPLY_TO=${PENPOT_SMTP_DEFAULT_REPLY_TO:[email protected]}
      - PENPOT_SMTP_HOST=${PENPOT_SMTP_HOST:-mailpit}
      - PENPOT_SMTP_PORT=${PENPOT_SMTP_PORT:-1025}
      - PENPOT_SMTP_USERNAME=${PENPOT_SMTP_USERNAME:-penpot}
      - PENPOT_SMTP_PASSWORD=${PENPOT_SMTP_PASSWORD:-penpot}
      - PENPOT_SMTP_TLS=${PENPOT_SMTP_TLS:-false}
      - PENPOT_SMTP_SSL=${PENPOT_SMTP_SSL:-false}
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:6060/readyz']
      interval: 10s
      timeout: 30s
      retries: 15

  penpot-exporter:
    image: penpotapp/exporter:latest
    environment:
      - PENPOT_PUBLIC_URI=$SERVICE_FQDN_FRONTEND_8080
      - PENPOT_REDIS_URI=redis://redis/0
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:6061/readyz']
      interval: 2s
      timeout: 10s
      retries: 15

  mailpit:
    image: axllent/mailpit:latest
    environment:
      - SERVICE_FQDN_MAILPIT_8025
    healthcheck:
      test: ['CMD', '/mailpit', 'readyz']
      interval: 5s
      timeout: 20s
      retries: 10

  postgres:
    image: postgres:15
    volumes:
      - penpot-postgresql-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_INITDB_ARGS=--data-checksums
      - POSTGRES_USER=$SERVICE_USER_POSTGRES
      - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
      - POSTGRES_DB=${POSTGRES_DB:-penpot}
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}']
      interval: 5s
      timeout: 20s
      retries: 10

  redis:
    image: redis:7-alpine
    command: redis-server --appendonly yes
    volumes:
      - penpot-redis-data:/data
    healthcheck:
      test: ['CMD', 'redis-cli', 'ping']
      interval: 5s
      timeout: 20s
      retries: 10

In url add ':8080', worked for me. I also have changed port in healthcheck for 8080.

Screenshot_20250219-001222.png

@stewnight
Copy link
Contributor

@SebasGDEV did you have to change the ports yourself?
Curious, did you override an existing instance of penpot's docker-compose content or try from a new resource?

@SebasGDEV
Copy link

@SebasGDEV did you have to change the ports yourself?
Curious, did you override an existing instance of penpot's docker-compose content or try from a new resource?

@stewnight yes, I have changed ports by myself, when I changed port from compose didn't happen

@ycsh-w
Copy link

ycsh-w commented Feb 19, 2025

Hi guys, can you please try the following docker-compose to see if it works

  • Changed to port 8080
  • Increased the backend health check duration as the first run of migrations takes a while.
  • If all but the frontend work on the first run, please check the backend logs to ensure the migration has completed
# documentation: https://help.penpot.app/technical-guide/getting-started/#install-with-docker
# slogan: Penpot is the first Open Source design and prototyping platform for product teams.
# tags: penpot,design,prototyping,figma,open,source
# logo: svgs/penpot.svg
# port: 8080

services:
  frontend:
    image: penpotapp/frontend:latest
    volumes:
      - penpot-assets:/opt/data/assets
    depends_on:
      penpot-backend:
        condition: service_healthy
      penpot-exporter:
        condition: service_healthy
    environment:
      - SERVICE_FQDN_FRONTEND_8080
      - PENPOT_FLAGS=${PENPOT_FRONTEND_FLAGS:-enable-login-with-password}
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:8080']
      interval: 2s
      timeout: 10s
      retries: 15

  penpot-backend:
    image: penpotapp/backend:latest
    volumes:
      - penpot-assets:/opt/data/assets
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
    environment:
      - PENPOT_FLAGS=${PENPOT_BACKEND_FLAGS:-enable-login-with-password enable-smtp enable-prepl-server}
      - PENPOT_HTTP_SERVER_PORT=6060
      - PENPOT_SECRET_KEY=$SERVICE_REALBASE64_64_PENPOT
      - PENPOT_PUBLIC_URI=$SERVICE_FQDN_FRONTEND_8080
      - PENPOT_BACKEND_URI=http://penpot-backend
      - PENPOT_EXPORTER_URI=http://penpot-exporter
      - PENPOT_DATABASE_URI=postgresql://postgres/${POSTGRES_DB:-penpot}
      - PENPOT_DATABASE_USERNAME=${SERVICE_USER_POSTGRES}
      - PENPOT_DATABASE_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
      - PENPOT_REDIS_URI=redis://redis/0
      - PENPOT_ASSETS_STORAGE_BACKEND=assets-fs
      - PENPOT_STORAGE_ASSETS_FS_DIRECTORY=/opt/data/assets
      - PENPOT_TELEMETRY_ENABLED=${PENPOT_TELEMETRY_ENABLED:-false}
      - PENPOT_SMTP_DEFAULT_FROM=${PENPOT_SMTP_DEFAULT_FROM:[email protected]}
      - PENPOT_SMTP_DEFAULT_REPLY_TO=${PENPOT_SMTP_DEFAULT_REPLY_TO:[email protected]}
      - PENPOT_SMTP_HOST=${PENPOT_SMTP_HOST:-mailpit}
      - PENPOT_SMTP_PORT=${PENPOT_SMTP_PORT:-1025}
      - PENPOT_SMTP_USERNAME=${PENPOT_SMTP_USERNAME:-penpot}
      - PENPOT_SMTP_PASSWORD=${PENPOT_SMTP_PASSWORD:-penpot}
      - PENPOT_SMTP_TLS=${PENPOT_SMTP_TLS:-false}
      - PENPOT_SMTP_SSL=${PENPOT_SMTP_SSL:-false}
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:6060/readyz']
      interval: 10s
      timeout: 30s
      retries: 15

  penpot-exporter:
    image: penpotapp/exporter:latest
    environment:
      - PENPOT_PUBLIC_URI=$SERVICE_FQDN_FRONTEND_8080
      - PENPOT_REDIS_URI=redis://redis/0
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:6061/readyz']
      interval: 2s
      timeout: 10s
      retries: 15

  mailpit:
    image: axllent/mailpit:latest
    environment:
      - SERVICE_FQDN_MAILPIT_8025
    healthcheck:
      test: ['CMD', '/mailpit', 'readyz']
      interval: 5s
      timeout: 20s
      retries: 10

  postgres:
    image: postgres:15
    volumes:
      - penpot-postgresql-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_INITDB_ARGS=--data-checksums
      - POSTGRES_USER=$SERVICE_USER_POSTGRES
      - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
      - POSTGRES_DB=${POSTGRES_DB:-penpot}
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}']
      interval: 5s
      timeout: 20s
      retries: 10

  redis:
    image: redis:7-alpine
    command: redis-server --appendonly yes
    volumes:
      - penpot-redis-data:/data
    healthcheck:
      test: ['CMD', 'redis-cli', 'ping']
      interval: 5s
      timeout: 20s
      retries: 10

In url add ':8080', worked for me. I also have changed port in healthcheck for 8080.

Screenshot_20250219-001222.png

@stewnight I can confirm the steps here also do the trick for me. Adding a port number after URL also aligns with my other Coolify-hosted services tho, so this is no surprise to me.

@peaklabs-dev peaklabs-dev added ✅ Done Issues that are fixed and a PR is ready to be merged. and removed 🔍 Triage Issues that need assessment and prioritization. labels Feb 24, 2025
@github-actions github-actions bot removed 🐛 Bug Reported issues that need to be reproduced by the team. ✅ Done Issues that are fixed and a PR is ready to be merged. labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants