Author Topic: Unable to login or update CWP  (Read 22417 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Unable to login or update CWP
« on: July 15, 2019, 09:29:02 AM »
I am unable to login as admin in my cwp also unable to update.

Code: [Select]
[root@server ~]# sh /scripts/update_cwp


====================================================
============= CentOS Web Panel Cron ================
====================================================


###########################
Firewall Flush Daily Blocks
###########################


######################
Update Server Packages
######################
PHP Warning:  mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Warning:  mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Warning:  mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0
PHP Warning:  mysqli_select_db() expects parameter 1 to be mysqli, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0
Could not select database root_cwp[root@server ~]#

Offline
*****
Re: Unable to login or update CWP
« Reply #1 on: July 16, 2019, 08:31:41 AM »
seems like you've changed the mysql root password or deleted root_cwp database

Offline
*
Re: Unable to login or update CWP
« Reply #2 on: July 16, 2019, 06:20:13 PM »
seems like you've changed the mysql root password or deleted root_cwp database
I am sure I did no such thing but still let's say it happened by mistake by one of my team members. How can it be fixed?

Offline
*****
Re: Unable to login or update CWP
« Reply #3 on: July 16, 2019, 08:12:20 PM »
Execute the following:
Code: [Select]
sh /scripts/mysql_pwd_reset


Yes, the error continues, please execute the following and show your output here, and I will be able to help you
Code: [Select]
sh /scripts/check_api
sh /scripts/cwpsrv_rebuild_user_conf

Offline
*
Re: Unable to login or update CWP
« Reply #4 on: July 17, 2019, 07:10:34 AM »
Execute the following:
Code: [Select]
sh /scripts/mysql_pwd_reset


Yes, the error continues, please execute the following and show your output here, and I will be able to help you
Code: [Select]
sh /scripts/check_api
sh /scripts/cwpsrv_rebuild_user_conf

here are the outputs

Code: [Select]
sh /scripts/mysql_pwd_reset
Code: [Select]
Please confirm MySQL root password reset. Continue? (y/N): y
Shutting down any mysql processes...
Stopping mysqld (via systemctl):                           [  OK  ]
mysqld: no process found
Resetting password... hold on
ERROR 1146 (42S02) at line 1: Table 'mysql.user' doesn't exist
Cleaning up...
Stopping mysqld (via systemctl):                           [  OK  ]
Killed mysqld(12643) with signal 15
Starting mysqld (via systemctl):  Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
                                                           [FAILED]
 ERROR! MariaDB is not running

Password reset has been completed

New MySQL root password: [removed password]

Remember to store this password safely!

Code: [Select]
[root@server ~]# sh /scripts/check_api
User API port 2302 check: OK
Oauth query check: FAILED
User API folder check: OK
External API port 2304 check: OK
External API files and htaccess : FAILED
CSF Firewall status check: DISABLED

Code: [Select]
[root@server ~]# sh /scripts/cwpsrv_rebuild_user_conf
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")
Redirecting to /bin/systemctl reload cwpsrv.service
Redirecting to /bin/systemctl reload cwp-phpfpm.service

Offline
***
Re: Unable to login or update CWP
« Reply #5 on: July 19, 2019, 10:22:38 PM »
I am unable to login as admin in my cwp also unable to update.

Code: [Select]
[root@server ~]# sh /scripts/update_cwp


====================================================
============= CentOS Web Panel Cron ================
====================================================


###########################
Firewall Flush Daily Blocks
###########################


######################
Update Server Packages
######################
PHP Warning:  mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Warning:  mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Warning:  mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0
PHP Warning:  mysqli_select_db() expects parameter 1 to be mysqli, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0
Could not select database root_cwp[root@server ~]#

I suspect, just like everyone else, you have an old version of cwp.  Once your cwp version is outdated by "x" amount of revisions, your admin page will not load AND you will not be able to update from shell.  One thing that you should do for sure is turn off CSF and try to update.  You might get lucky.  But I dont think so.