Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: cronnin on March 14, 2020, 06:16:01 PM

Title: Firewall problem
Post by: cronnin on March 14, 2020, 06:16:01 PM
Every now and then websites can't connect to DB, and I can't even get CWP login screen. Bunch of lines with php and mysql errors pop up. When I manage to get inside CWP I find Firewall off, and can't turn it on.

Dashbord says that Firewall is disabled, but when I try to Enable Firewall, message says csd and lfd are not disabled!
What's going on here?

Title: Re: Firewall problem
Post by: ejsolutions on March 14, 2020, 07:15:44 PM
Quote
Bunch of lines with php and mysql errors pop up
This is as useful as a chocolate teacup! Read the error messages and digest.

Not aimed specifically at you:

There has been a bug with the way CWP reports a disabled CSF, from the very first time I used this panel.
To add salt to the wound, they appeared to have removed the official CSF GUI from the menu - version 0.9.8.951 freshly installed today.
The latest release has a number of errors during installation too, so not properly tested/debugged.

If you've done a 'csf -e' and 'systemctl status lfd' shows running, then take those to be the correct answers, rather than the (bug ridden, typo driven) GUI.
Title: Re: Firewall problem
Post by: Sandeep on March 15, 2020, 09:11:52 AM
try this commands one by one :
csf -x
csf -e
Title: Re: Firewall problem
Post by: cronnin on March 15, 2020, 04:36:57 PM
Commands work, but it happens often. It seems like if I don't get it resolved in a couple of days, mysql goes wild, and I have problem logging into CWP, while websites are down (WP: Error connecting to database).

Is there a way to prevent this?
Title: Re: Firewall problem
Post by: Sandeep on March 15, 2020, 07:58:13 PM
it not normal behaviour, probably you've OOM
Title: Re: Firewall problem
Post by: cronnin on March 17, 2020, 12:25:09 AM
Ok, here is the message. It showed up after logging into CWP, situation resolved itself and everything started working.


Code: [Select]
Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0


Trying to start mysql server, please wait!
Try to restart CentOS Web Panel with command: sh /scripts/restart_cwpsrv

**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf


Warning: mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Could not connect: