I did ip change in hestia many time before with no issue. But this time even I am not sure if it is related to ip change, two asp.net sites throws 500 error.
And in logs
nginx connect() failed (111: Connection refused) while connecting to upstream, client:
If I roll back to ip backup with older ip, they run fine.
The error message would suggest that you’re running nginx as a proxy in front of Apache, and that apache has not started somehow. What info do these commands give you?
root@sunucu:~# systemctl status apache2
â—Ź apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-10-25 12:35:05 +03; 20h ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 447 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 681 (apache2)
Tasks: 56 (limit: 4915)
Memory: 31.9M
CGroup: /system.slice/apache2.service
├─681 /usr/sbin/apache2 -k start
├─682 /usr/sbin/apache2 -k start
├─684 /usr/sbin/apache2 -k start
└─685 /usr/sbin/apache2 -k start
Oct 25 12:35:04 sunucu.grandnode.tk systemd[1]: Starting The Apache HTTP Server...
Oct 25 12:35:05 sunucu.grandnode.tk systemd[1]: Started The Apache HTTP Server.
I am totally stucked for two days. I can give you ssh if you want to check. There are two asp.net core sites. One with ports 5000,5001 and 2nd 5002,5003
And they were just running fine before ip change.
OK, the apache thing was a false trail, so we can ignore that. You didn’t mention you’d written your own templates which were connecting to different proxies on ports 5000 and 5001.
So what nginx is saying is basically it can’t connect to the server running on http://127.0.0.1:5000 and/or https://127.0.0.1:5001
If you’re on the command line, do you get some output when you try to connect with curl eg.
curl -I http://127.0.0.1:5000/
This should just show you the headers.
Also, what output do you get from
ss -tln
This should show listening TCP sockets on your machine.
No definitely not apache related. So you can’t connect to the asp app’s server with curl … that tells me that nginx is telling the truth, and the problem lies upstream i.e. with your app’s kestrel server.
the 127.0.0.1:5000 in the ss output confirms the URL you’re trying to connect to is OK.
So I’d be looking in your asp app / kestrel logs for the answers …
I can not believe it is mongodb releated. I had an incorrect setting in there. Once it is fixed then all fine.
Nginx logs of course could not tell about it. Next time I will first check web app logs