coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
31.16k stars 1.59k forks source link

[Bug]: Proxy Error Second Server #2791

Open SanderVreeken opened 1 month ago

SanderVreeken commented 1 month ago

Description

I'm using my Raspberry Pi 5 with Coolify, running smoothly by opening ports 80 and 443 to access its dashboard via the instance domain. Today, I added a second server using my Raspberry Pi 4, following a tutorial video.

To integrate the Pi 4, I added its public key to the Coolify dashboard and opened port 22 for SSH access. Despite no visible errors during setup, proxy logs indicate issues affecting the Pocketbase application's accessibility, likely related to proxy settings.

I suspect the Traefik configuration file needs adjustments for the second server. Could you advise on what changes are necessary to resolve this?

Summary:

Any guidance on updating the configuration files would be greatly appreciated.

Minimal Reproduction (if possible, example repository)

You could reproduce the same error by self hosting Coolify on two devices that share the same public ip address.

Exception or Error

Proxy Error Log 2024-07-10T17:50:19.622231726Z time="2024-07-10T17:50:19Z" level=error msg="Unable to obtain ACME certificate for domains \"\": unable to generate a certificate for the domains : error: one or more domains had a problem:\n acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: : Invalid response from http:///.well-known/acme-challenge/_t0eeL2cf3VIbCxZs1BKd4PtE9FzQ5Mlup7E_0Lf2Vk: 404\n" rule="Host(<SECRET: MY ACCESS PAGE>) && PathPrefix(/app)" ACME CA="https://acme-v02.api.letsencrypt.org/directory" providerName=letsencrypt.acme routerName=coolify-realtime-wss@file

Version

v4.0.0-beta.307

andrasbacsai commented 1 month ago

It looks like your domain setings is incorrect based on the following line:

rule="Host(``) && PathPrefix(/app)

Could you please reset the proxy labels in your application's configuration and restart your application?

SanderVreeken commented 1 month ago

Thanks! I tried that, but it didn't work.

I'm running two servers on my network using Raspberry Pis. I added the second server to the first via SSH key, which seems to work fine.

The project works fine on the first server, but it doesn't on the second one.

Here is the error message from the second server:

2024-08-04T09:56:33.912862821Z time="2024-08-04T09:56:33Z" level=error msg="Unable to obtain ACME certificate for domains "www.tasktilt.com": unable to generate a certificate for the domains [www.tasktilt.com]: error: one or more domains had a problem:\n[www.tasktilt.com] acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: : Invalid response from http://www.tasktilt.com/.well-known/acme-challenge/fCKAh37-uYCgmcnrFK7gKqKMmb0xQxR6QS0mvWxpk1M: 404\n" providerName=letsencrypt.acme ACME CA="https://acme-v02.api.letsencrypt.org/directory" rule="Host(www.tasktilt.com) && PathPrefix(/)" routerName=https-1-r4848cc@docker

Could you suggest what the ports should be for the Traefik configuration file for the second server, given that I am already using ports 80 and 443 on the first server?