Author Topic: 502 Bad Gateway  (Read 4030 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
502 Bad Gateway
« on: September 28, 2020, 08:58:47 PM »
Hello,

I have an issue with one site on my server (502 Bad Gateway)

I have tried these commands:

Code: [Select]
sh /scripts/restart_cwpsrv
systemctl restart cwp-phpfpm
systemctl restart cwpsrv-phpfpm
sh /scripts/update_cwp

/usr/local/cwp/php71/bin/php -v
PHP 7.2.30 (cli) (built: Apr 29 2020 02:29:42) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.3.9, Copyright (c) 2002-2019, by ionCube Ltd.

systemctl status cwp-phpfpm
● cwp-phpfpm.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/cwp-phpfpm.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2020-09-28 23:29:22 +03; 8min ago
 Main PID: 1090386 (php-fpm)
   CGroup: /system.slice/cwp-phpfpm.service
           └─1090386 php-fpm: master process (/usr/local/cwp/php71/etc/php-fpm.conf)

Sep 28 23:29:22 uoitc.edu.iq systemd[1]: Started The PHP FastCGI Process Manager.

I have tried to removed Mod Security and disabled it for that user

When I checked the logs I found these errors:

Code: [Select]
[28-Sep-2020 23:38:01] WARNING: [pool cwpsrv] child 1093390 said into stderr: "ERROR: [pool cwpsrv] failed to set rlimit_files for this pool. Please check your system limits or decrease rlimit_files. setrlimit(RLIMIT_NOFILE, 131072): Operation not permitted (1)"

PHP Warning:  file_get_contents(/usr/local/apache/modsecurity-cwaf/rules/rules.dat): failed to open stream: No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0

sh: line 0: cd: /usr/local/apache/modsecurity-cwaf/rules: No such file or directory
sh: line 0: cd: /usr/local/apache/modsecurity-cwaf/rules: No such file or directory

[28-Sep-2020 23:37:18] WARNING: [pool cwpsrv] child 1091701, script '/usr/local/cwpsrv/htdocs/admin/admin/loader_ajax.php' (request: "POST /admin/loader_ajax.php?ajax=mod_security") executing too slow (5.859887 sec), logging

[28-Sep-2020 23:36:34] WARNING: [pool cwpsrv] child 1091701 said into stderr: "NOTICE: PHP message: PHP Notice:  Undefined index: sEcho in /usr/local/cwpsrv/htdocs/resources/admin/addons/ajax/ajax_mod_security.php on line 0"

Can anyone help me with tis issue?

I'm using Nginx + Varnish + Apache PHP-FPM Performances as a webserver

Thanks.

Offline
*****
Re: 502 Bad Gateway
« Reply #1 on: October 03, 2020, 10:04:27 AM »
Hi, why do you checking CWP if you have a problem with a website? Do not understand...
First of all, you have to check the website log file in /usr/local/apache/domlogs/ . There too many reasons for the 502 error, I guess you use PHP-FPM which stopped. Try to change it to apache+nginx+php-cgi (for example) via WebServer Domain Conf in CWPadmin, WebServer Settings
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services