Page 1 of 1

Error 502, bad gateway.

Posted: Mon Sep 11, 2017 10:56 am
by Totte
Hi, recently I've been getting error 502 from CloudFlare. My server has been running just fine for over 3 years and this problem appeared out of nowhere. It's been almost 2 weeks now and I can't figure it out. It even went to the point where I installed the server entirely, still getting the same problem.

My nginx error.log is empty.
Apache looks more or less like this

Code: Select all

Sep 10 13:50:53.886376 2017] [:notice] [pid 6463] mod_ruid2/0.9.8 enabled
[Sun Sep 10 13:50:53.888285 2017] [mpm_prefork:notice] [pid 6463] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming no$
[Sun Sep 10 13:50:53.888304 2017] [core:notice] [pid 6463] AH00094: Command line: '/usr/sbin/apache2'
[Sun Sep 10 13:50:54.164527 2017] [mpm_prefork:notice] [pid 6463] AH00171: Graceful restart requested, doing restart
[Sun Sep 10 13:50:54.271159 2017] [:notice] [pid 6463] mod_ruid2/0.9.8 enabled
[Sun Sep 10 13:50:54.272956 2017] [mpm_prefork:notice] [pid 6463] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming no$
[Sun Sep 10 13:50:54.272976 2017] [core:notice] [pid 6463] AH00094: Command line: '/usr/sbin/apache2'

Re: Error 502, bad gateway.

Posted: Tue Sep 12, 2017 8:46 am
by skurudo
What's about domains error logs?
top / htop - what's about memory/cpu/hdd ?

Re: Error 502, bad gateway.

Posted: Tue Sep 12, 2017 11:15 am
by Totte
skurudo wrote:What's about domains error logs?
top / htop - what's about memory/cpu/hdd ?
Mem/CPU/HDD looks all fine both in htop and running HP's system health check thing.

So I found another nginx log inside the Vesta folder.

Code: Select all

7/09/09 17:27:20 [error] 5464#0: *549 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: HTTP_CLIENT_IP in /usr/local/vesta/web/inc/main.php on line 14
PHP message: PHP Notice:  Undefined index: HTTP_X_FORWARDED_FOR in /usr/local/vesta/web/inc/main.php on line 14
PHP message: PHP Notice:  Undefined index: HTTP_X_FORWARDED in /usr/local/vesta/web/inc/main.php on line 14
PHP message: PHP Notice:  Undefined index: HTTP_FORWARDED_FOR in /usr/local/vesta/web/inc/main.php on line 14
PHP message: PHP Notice:  Undefined index: HTTP_FORWARDED in /usr/local/vesta/web/inc/main.php on line 14" while reading response header from upstream, client: 83.255.X.X, server: _, request$
2017/09/10 13:45:16 [error] 5464#0: *763 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: HTTP_CLIENT_IP in /usr/local/vesta/web/inc/main.php on line 14
PHP message: PHP Notice:  Undefined index: HTTP_X_FORWARDED_FOR in /usr/local/vesta/web/inc/main.php on line 14
PHP message: PHP Notice:  Undefined index: HTTP_X_FORWARDED in /usr/local/vesta/web/inc/main.php on line 14
PHP message: PHP Notice:  Undefined index: HTTP_FORWARDED_FOR in /usr/local/vesta/web/inc/main.php on line 14
My /var/log/nginx/domains/ folder is empty tho, or is there another location for domain logs?

Re: Error 502, bad gateway.

Posted: Fri Sep 15, 2017 6:46 am
by Totte
Someone may close the thread. Solved it by changing to Virtualmin.