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]: cannot access self-hosted after upgrade v4.0.0-beta.367 #4253

Open
ryansyrl opened this issue Nov 12, 2024 · 20 comments
Open

[Bug]: cannot access self-hosted after upgrade v4.0.0-beta.367 #4253

ryansyrl opened this issue Nov 12, 2024 · 20 comments
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.

Comments

@ryansyrl
Copy link

ryansyrl commented Nov 12, 2024

Error Message and Logs

  1. Tried with ip the page shows "404 not found"
  2. Tried with sub-domain that registered to self-hosted coolify got response 502 bad gateway
  3. I checked the docker inside my vm everything looks good and working, but still i cannot access it

this error occurs after i upgrade coolify to 4-beta.3.6.7

Steps to Reproduce

  1. upgrade the coolify 7to 4.0.0-bet.3.6

Example Repository URL

No response

Coolify Version

v4.0.0-beta.3.6.7

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

ubuntu 22.04

Additional Information

No response

@ryansyrl ryansyrl added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Nov 12, 2024
@ryansyrl
Copy link
Author

after i check again there's one service keeps restarting

Image

can someone tell me how to fix this?

@ershisan99
Copy link
Contributor

Same here. Updated from 364 to 367 and am now getting 502 bad gateway @andrasbacsai

@ryansyrl
Copy link
Author

i found the temporary solution, install update manually using the third step from the documentation

https://coolify.io/docs/upgrade

if the manual update success, the instance will be back to normal again.

@andrasbacsai
Copy link
Member

I will check what is going on. But until then, you can use the upgrade process provided in the link (previous comment).

@ryansyrl
Copy link
Author

I will check what is going on. But until then, you can use the upgrade process provided in the link (previous comment).

thank you very much!

@ershisan99
Copy link
Contributor

i found the temporary solution, install update manually using the third step from the documentation

https://coolify.io/docs/upgrade

if the manual update success, the instance will be back to normal again.

Yep, running this twice solved the issue, thank you!

@moshetanzer
Copy link

Getting 404 on everything!!!😱

@che0one
Copy link
Contributor

che0one commented Nov 12, 2024

I encounter this error frequently. Are you using dynamic middlewares? Also, is the Traefik dashboard enabled?
When i check logs of coolify-proxy which unless restarting on that errors, received the an error stating:
someapp1@auth not found.
someapp2@auth not found.
someapp3@auth not found.
All from middlewares...

@Opswatch
Copy link

Opswatch commented Nov 12, 2024

there is definitely something funky with this update, i got it updated by force stopping the instance but the running the two ghost instances fix does not work im back to having the whole coolify instance crash

root@ip-172-26-2-41:~# docker logs 885575759b6c 2024-11-12T20:19:08Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-v84co04040sswoo48w8ssoog-ghost@docker 2024-11-12T20:19:12Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-v84co04040sswoo48w8ssoog-ghost@docker 2024-11-12T20:24:59Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-v84co04040sswoo48w8ssoog-ghost@docker 2024-11-12T20:33:22Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-v84co04040sswoo48w8ssoog-ghost@docker 2024-11-12T20:42:07Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-v84co04040sswoo48w8ssoog-ghost@docker 2024-11-12T20:42:13Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-v84co04040sswoo48w8ssoog-ghost@docker 2024-11-12T20:42:14Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-v84co04040sswoo48w8ssoog-ghost@docker 2024-11-12T20:42:20Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-v84co04040sswoo48w8ssoog-ghost@docker 2024-11-12T20:49:29Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-v84co04040sswoo48w8ssoog-ghost@docker 2024-11-12T20:59:42Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-v84co04040sswoo48w8ssoog-ghost@docker 2024-11-12T21:37:33Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-v84co04040sswoo48w8ssoog-ghost@docker 2024-11-12T21:37:38Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-pgwoscoooog4wckck8okk4g8-ghost@docker 2024-11-12T21:37:38Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-v84co04040sswoo48w8ssoog-ghost@docker 2024-11-12T21:37:48Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-pgwoscoooog4wckck8okk4g8-ghost@docker 2024-11-12T21:37:48Z ERR error="middleware \"redir-ghost@docker\" does not exist" entryPointName=https routerName=https-0-v84co04040sswoo48w8ssoog-ghost@docker

@che0one
Copy link
Contributor

che0one commented Nov 12, 2024

Opswatch Maybe something funky with ghost, everytime breaks something and not only on Coolify :)

@Opswatch
Copy link

@che0one its weird because with just one ghost i was getting a 404 from traffic after the update, ghost logs looked good same with sql db, then i launched the second ghost instance and everything broke, like the previous bug :(

@che0one
Copy link
Contributor

che0one commented Nov 12, 2024

@Opswatch
There is only 2 solutions at least works:

  1. Run update over coolify binary as mentioned @ershisan99
  2. Restart coolify-proxy using lazydocker. ( Restart from other points doesn't works )

And one works well:

  1. Remove or Isolate Ghost from Coolify`...

@alxhu-dev
Copy link

i found the temporary solution, install update manually using the third step from the documentation

https://coolify.io/docs/upgrade

if the manual update success, the instance will be back to normal again.

Manual update tried to install OpenSSH although I already used a different SSH server before (which worked for months). Now I'm unable to connect to the machine via SSH at all :( I'm not at home right now, so I'm unable to fix this for the next days

@che0one
Copy link
Contributor

che0one commented Nov 14, 2024

@alxhu-dev Try to connect http://ip:8000 and restart the proxy server. Ensure the connection works without using a proxy. If available, if it show list of middlewares, remove any dynamic middlewares before restarting the proxy server.

@alxhu-dev
Copy link

@alxhu-dev Try to connect http://ip:8000 and restart the proxy server. Ensure the connection works without using a proxy. If available, if it show list of middlewares, remove any dynamic middlewares before restarting the proxy server.

I'm unable to access it via IP/port

@theDanielJLewis
Copy link

I found that I have to re-enable the ports in order to access Coolify after an upgrade.

@luckydonald
Copy link
Contributor

luckydonald commented Nov 18, 2024

Maybe pin this issue for better visibility until the issue is resolved with another (hopefully automated) update?

Also, the manual upgrade command recommended is currently the same as the initial install one.

@luckydonald
Copy link
Contributor

luckydonald commented Nov 18, 2024

I'm having the same issue with 4.0.0-beta.370, which is what apparently both what is currently installed (via autoupdate) and the version the manual update installs, hence the workaround of manually upgrading doesn't seem to work.
At least not after the fact.

root@host:~# curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
Welcome to Coolify Installer!
This script will install everything for you. Sit back and relax.
Source code: https://github.com/coollabsio/coolify/blob/main/scripts/install.sh

---------------------------------------------
| Operating System  | ubuntu 20.04
| Docker            | 27.0
| Coolify           | 4.0.0-beta.370
| Helper            | 1.0.4
| Realtime          | 1.0.5
---------------------------------------------

1. Installing required packages (curl, wget, git, jq, openssl).
2. Check OpenSSH server configuration.
 - OpenSSH server is installed.
 - SSH PermitRootLogin is enabled.
3. Check Docker Installation.
 - Docker is installed.
4. Check Docker Configuration.
 - Docker configuration is up to date.
5. Download required files from CDN.
6. Make backup of .env to .env-20241118-220705
7. Propagating .env with new values - if necessary.
8. Checking for SSH key for localhost access.
9. Installing Coolify (4.0.0-beta.370)
 - It could take a while based on your server's performance, network speed, stars, etc.
 - Please wait.
 - Until then, here's a joke for you:

Four engineers get into a car. The car won't start.
The Mechanical engineer says "It's a broken starter".
The Electrical engineer says "Dead battery".
The Chemical engineer says "Impurities in the gasoline".
The IT engineer says "Hey guys, I have an idea: How about we all get out of the car and get back in".

root@host:~#

But it still fails

root@host: ~# sleep 120

root@host: ~# curl https://coolify.example.com
Bad Gateway

@luckydonald
Copy link
Contributor

luckydonald commented Nov 18, 2024

I did dig a bit deeper, and will provide updates in this very post as I dig it up:

  1. check logs
root@host:/data/coolify/source# cat upgrade-2024-11-18-22-04-18.log

 Container coolify  Stopping
 Container coolify  Stopping
 Container coolify  Stopping
 Container coolify  Stopped
 Container coolify-realtime  Recreate
 Container coolify  Stopped
 Container coolify-db  Recreate
 Container coolify  Stopped
 Container coolify-redis  Recreate
 Container coolify-realtime  Recreated
 Container coolify-redis  Recreated
 Container coolify-db  Recreated
 Container coolify  Recreate
 Container coolify  Recreated
 Container coolify-redis  Starting
 Container coolify-db  Starting
 Container coolify-realtime  Starting
 Container coolify-redis  Started
 Container coolify-db  Started
Error response from daemon: driver failed programming external connectivity on endpoint coolify-realtime (63a4511aa7e4c3da39fca68ed13c8b5b7a390735f90822824d2425a1996184bf): failed to bind port 0.0.0.0:6001/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:6001: bind: address already in use
  1. check port
root@host:/# sudo lsof -i :6001
COMMAND       PID USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME
docker-pr 2438214 root    4u  IPv4 2961781734      0t0  TCP *:x11-1 (LISTEN)
  1. check process
htop -p 2438214

Image

  1  [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||          84.8%]   Tasks: 281, 1304 thr; 4 running
  2  [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||                  77.7%]   Load average: 8.93 9.10 9.21
  3  [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||94.4%]   Uptime: 69 days, (nice!) 14:37:24
  4  [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||                    76.4%]
  Mem[||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||4.46G/5.79G]
  Swp[                                                                                                        0K/0K]

    PID USER      PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command
2438214 root       20   0 1777M  1180     0 S  0.0  0.0  0:01.81 │  ├─ /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6001 -container-ip 172.18.0.6 -container-port 6001
2438659 root       20   0 1777M  1180     0 S  0.0  0.0  0:00.12 │  │  ├─ /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6001 -container-ip 172.18.0.6 -container-port 6001
2438658 root       20   0 1777M  1180     0 S  0.0  0.0  0:00.02 │  │  ├─ /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6001 -container-ip 172.18.0.6 -container-port 6001
2438657 root       20   0 1777M  1180     0 S  0.0  0.0  0:00.04 │  │  ├─ /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6001 -container-ip 172.18.0.6 -container-port 6001
2438656 root       20   0 1777M  1180     0 S  0.0  0.0  0:00.00 │  │  ├─ /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6001 -container-ip 172.18.0.6 -container-port 6001
2438655 root       20   0 1777M  1180     0 S  0.0  0.0  0:00.00 │  │  ├─ /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6001 -container-ip 172.18.0.6 -container-port 6001
2438648 root       20   0 1777M  1180     0 S  0.0  0.0  0:00.14 │  │  ├─ /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6001 -container-ip 172.18.0.6 -container-port 6001
2438647 root       20   0 1777M  1180     0 S  0.0  0.0  0:00.00 │  │  ├─ /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6001 -container-ip 172.18.0.6 -container-port 6001
2438646 root       20   0 1777M  1180     0 S  0.0  0.0  0:01.41 │  │  └─ /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6001 -container-ip 172.18.0.6 -container-port 6001

docker-pr is actually docker-proxy.

  1. list containers with IP

Let's list all docker containers and their IP, I'm trying to find that 172.18.0.6 one.

root@host:~# docker inspect -f '{{.Name}} - {{.NetworkSettings.IPAddress }}' $(docker ps -aq)
/coolify-db -
/coolify-redis -
…

Note, no line goes /<container_name> - 172.18.0.6

  1. kill the process

Okay, I'm way too scared to really restart my whole docker, as at least all the services are still running even if coolify is down, and I'd to keep them running if I can

kill 2438214

Oops, that killed some container? Getting internal server error on a hedgedoc container? Other services seem to work still and unaffected?
Probably still better than a restart of the whole docker engine service.
Which would be an alternative to try, if this kill step didn't help.

  1. upgrade script

I'll try the installer/updater script again:

root@host:~# curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
Welcome to Coolify Installer!
This script will install everything for you. Sit back and relax.
Source code: https://github.com/coollabsio/coolify/blob/main/scripts/install.sh

---------------------------------------------
| Operating System  | ubuntu 20.04
| Docker            | 27.0
| Coolify           | 4.0.0-beta.370
| Helper            | 1.0.4
| Realtime          | 1.0.5
---------------------------------------------

1. Installing required packages (curl, wget, git, jq, openssl).
2. Check OpenSSH server configuration.
 - OpenSSH server is installed.
 - SSH PermitRootLogin is enabled.
3. Check Docker Installation.
 - Docker is installed.
4. Check Docker Configuration.
 - Docker configuration is up to date.
5. Download required files from CDN.
6. Make backup of .env to .env-20241118-235139
7. Propagating .env with new values - if necessary.
8. Checking for SSH key for localhost access.
9. Installing Coolify (4.0.0-beta.370)
 - It could take a while based on your server's performance, network speed, stars, etc.
 - Please wait.
 - Until then, here's a joke for you:

Eight bytes walk into a bar.
The bartender asks, "Can I get you anything?"
"Yeah," reply the bytes.
"Make us a double."

 - Coolify installed successfully.
 - Waiting for 20 seconds for Coolify (database migrations) to be ready.
 - Until then, here's a joke for you:

"We messed up the keming again guys."


   ____                            _         _       _   _                 _
  / ___|___  _ __   __ _ _ __ __ _| |_ _   _| | __ _| |_(_) ___  _ __  ___| |
 | |   / _ \| '_ \ / _` | '__/ _` | __| | | | |/ _` | __| |/ _ \| '_ \/ __| |
 | |__| (_) | | | | (_| | | | (_| | |_| |_| | | (_| | |_| | (_) | | | \__ \_|
  \____\___/|_| |_|\__, |_|  \__,_|\__|\__,_|_|\__,_|\__|_|\___/|_| |_|___(_)
                   |___/


Your instance is ready to use!

You can access Coolify through your Public IP: http://161.97.121.189:8000

If your Public IP is not accessible, you can use the following Private IPs:

[LOTSA IP ADDRESSES]
http://321.321.321.321:8080
[LOTSA IP ADDRESSES]

WARNING: It is highly recommended to backup your Environment variables file (/data/coolify/source/.env) to a safe location, outside of this server (e.g. into a Password Manager).

@luckydonald
Copy link
Contributor

luckydonald commented Nov 18, 2024

Solution 1:

Follow #4253 (comment), which is in essence:

  1. Run
    curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
    twice.

Solution 2:

  1. Check your logs in /data/coolify/source
    • the upgrade-YYYY-MM-DD-HH-MM-SS.log ones.
  2. If it says … failed to bind port 0.0.0.0:6001 …, follow above [Bug]: cannot access self-hosted after upgrade v4.0.0-beta.367 #4253 (comment), which is in summary:
  3. Figure out the process which uses the port 6001 from above:
    sudo lsof -i :6001
    COMMAND       PID USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME
    docker-pr 2438214 root    4u  IPv4 2961781734      0t0  TCP *:x11-1 (LISTEN)
    • the PID (here 2438214, yours will be different) will be needed for the next step
  4. Kill the pid of the process on the port
    kill 2438214
  5. Run the installer again, it should work now
    curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
    • you should get Your instance is ready to use! and a bunch of URLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.
Projects
None yet
Development

No branches or pull requests

9 participants