Page 1 of 1

502 Bad Gateway ngix

Posted: Fri Jun 22, 2018 8:31 am
by robert.ne13
i have changed the port of panel Vesta now at 9000 All seems to be ok but after a while the panel goes down and send this error
502 Bad Gateway ngix

Ngix log error:

Code: Select all

181.31.117.96 - - [22/Jun/2018:04:24:56 -0400] GET /js/i18n.js.php?1491697868 HTTP/1.1 "200" 989 "http://rn-hosting.com:9000/list/user/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.$
181.31.117.96 - - [22/Jun/2018:04:25:01 -0400] GET /list/web/ HTTP/1.1 "200" 3753 "http://rn-hosting.com:9000/list/user/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.3$
181.31.117.96 - - [22/Jun/2018:04:25:01 -0400] GET /js/i18n.js.php?1491697868 HTTP/1.1 "200" 989 "http://rn-hosting.com:9000/list/web/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.8$
181.31.117.96 - - [22/Jun/2018:04:25:04 -0400] GET /list/web-log/?domain=rn-hosting.com&type=access HTTP/1.1 "200" 2501 "http://rn-hosting.com:9000/list/web/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Ge$
181.31.117.96 - - [22/Jun/2018:04:25:04 -0400] GET /css/styles.min.css HTTP/1.1 "200" 12877 "http://rn-hosting.com:9000/list/web-log/?domain=rn-hosting.com&type=access" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTM$
181.31.117.96 - - [22/Jun/2018:04:25:04 -0400] GET /css/jquery-custom-dialogs.css HTTP/1.1 "200" 5833 "http://rn-hosting.com:9000/list/web-log/?domain=rn-hosting.com&type=access" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/53$
181.31.117.96 - - [22/Jun/2018:04:25:04 -0400] GET /js/jquery.cookie.js HTTP/1.1 "200" 1420 "http://rn-hosting.com:9000/list/web-log/?domain=rn-hosting.com&type=access" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTM$
181.31.117.96 - - [22/Jun/2018:04:25:04 -0400] GET /js/events.js HTTP/1.1 "200" 3586 "http://rn-hosting.com:9000/list/web-log/?domain=rn-hosting.com&type=access" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like$
181.31.117.96 - - [22/Jun/2018:04:25:04 -0400] GET /js/jquery-1.7.2.min.js HTTP/1.1 "200" 33639 "http://rn-hosting.com:9000/list/web-log/?domain=rn-hosting.com&type=access" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ($
181.31.117.96 - - [22/Jun/2018:04:25:05 -0400] GET /js/jquery-ui-1.8.20.custom.min.js HTTP/1.1 "200" 51586 "http://rn-hosting.com:9000/list/web-log/?domain=rn-hosting.com&type=access" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebK$
181.31.117.96 - - [22/Jun/2018:04:25:16 -0400] GET / HTTP/1.1 "302" 5 "http://rn-hosting.com:9000/list/web-log/?domain=rn-hosting.com&type=access" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/$
181.31.117.96 - - [22/Jun/2018:04:25:16 -0400] GET /list/user/ HTTP/1.1 "200" 3633 "http://rn-hosting.com:9000/list/web-log/?domain=rn-hosting.com&type=access" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like G$
181.31.117.96 - - [22/Jun/2018:04:25:17 -0400] GET /js/i18n.js.php?1491697868 HTTP/1.1 "200" 989 "http://rn-hosting.com:9000/list/user/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.$

what am i doing wrong
Thanks...

Re: 502 Bad Gateway ngix

Posted: Fri Jun 22, 2018 1:39 pm
by treatys
Since 21.6. I have the same problem. I guess it's not about the port itself, but there is something wrong in latest Vesta build.

I've reported this issue here: https://github.com/serghey-rodin/vesta/issues/1625

Re: 502 Bad Gateway ngix

Posted: Fri Jun 22, 2018 8:22 pm
by mehargags
I Can confirm this happens with me too..but only on Apache-less servers that have Nginx + PHP-FPM.

If I restart vesta service, it goes good but then the next day its crashed again. I guess may some cron job is doing this ?

I tried all default Cron Jobs for user admin... all went fine but after I ran

Code: Select all

sudo /usr/local/vesta/bin/v-update-user-stats
Vesta Panel threw 502.
I restarted service and tried it again... this time it did not crash. So can't really say it is because of some crons. I have separate cron logs enabled but can't see any error recorded.

/var/log/vesta/nginx-error.log gives

Code: Select all

[error] 95978#0: *25 connect() to unix:/var/run/vesta-php.sock failed (111: Connection refused) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: _, request: "GET /list/user/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/vesta-php.sock:", host: "IP:8908", referrer: "https://IP:8908/login/"
I am running it on port 8908 and not 8083


Reported the bug here too https://github.com/serghey-rodin/vesta/ ... -399570410

Re: 502 Bad Gateway ngix

Posted: Sat Jun 23, 2018 6:47 am
by robert.ne13
Ok here its my solution i have opened firewall on port 9000 is that i'm using for vestacp on ip 127.0.0.1 and restart all server

Code: Select all

sudo reboot
and now are +16hs working fine without going down

Re: 502 Bad Gateway ngix

Posted: Mon Jun 25, 2018 7:45 pm
by joni
Confirmed, I have it on CentOS..

Re: 502 Bad Gateway ngix

Posted: Mon Jun 25, 2018 7:49 pm
by imperio
We already know about the problem

Re: 502 Bad Gateway ngix

Posted: Fri Jun 29, 2018 2:12 pm
by imperio
Try to this commands for fix

Code: Select all

apt-get update
apt-get upgrade
rm -f /var/run/vesta-php.sock
service vesta restart

Re: 502 Bad Gateway ngix

Posted: Mon Sep 24, 2018 1:47 pm
by compiz
imperio wrote:
Fri Jun 29, 2018 2:12 pm
Try to this commands for fix

Code: Select all

apt-get update
apt-get upgrade
rm -f /var/run/vesta-php.sock
service vesta restart
this didn't fix it for me, Ubuntu 18.04 fresh installation

Re: 502 Bad Gateway ngix

Posted: Fri Oct 12, 2018 8:44 pm
by ivansmo
imperio wrote:
Fri Jun 29, 2018 2:12 pm
Try to this commands for fix

Code: Select all

apt-get update
apt-get upgrade
rm -f /var/run/vesta-php.sock
service vesta restart
This worked for me, only with yum command on CentOS7
yum update

Thanks a lot...

well now, after restarting Vesta service I have 502 Bad Gateway msg again. This I can see on terminal
Image

Any help??

Edit:

I have deleted rm -R /run/log/journal/*
restarted system, and now Vesta works again