New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Anacron job for updates fails to Update Server Packages

Started by Hardoman, December 06, 2020, 04:42:36 PM

Previous topic - Next topic

Hardoman

Daily in the Anacron job 'cron.daily' (/etc/cron.daily/cwp:) I have the errors in the output:


######################
Update Server Packages
######################
error: rpmdb: BDB0113 Thread/process 7861/140498072618816 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 - (-30973)
error: cannot open Packages database in /var/lib/rpm

...

Error: rpmdb open failed
error: rpmdb: BDB0113 Thread/process 7861/140498072618816 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 - (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:


I've checked RPM packages and they seem to be healthy

# /usr/lib/rpm/rpmdb_verify /var/lib/rpm/Packages
BDB5105 Verification of /var/lib/rpm/Packages succeeded.


This continues for a week while I didn't do any changes to the server.

Before that for 2 weeks there was anoter error in the job output which is now replaced with a new one:

######################
Update Server Packages
######################
TERM environment variable not set.
Redirecting to /bin/systemctl restart cwpsrv.service
Redirecting to /bin/systemctl restart cwp-phpfpm.service
Redirecting to /bin/systemctl reload cwpsrv.service
Redirecting to /bin/systemctl reload cwp-phpfpm.service
PHP Warning: Error while sending QUERY packet. PID=8349 in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php(0) : eval()'d code on line 57
PHP Fatal error: Uncaught Error: Call to undefined function mysql_error() in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php(0) : eval()'d code:57
Stack trace:
#0 /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php(0): unknown()
#1 {main}
  thrown in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php(0) : eval()'d code on line 57

Date which backup script is using: 2020-11-28 00:30:36


and before that there was another one (continued for months):

######################
Update Server Packages
######################
Redirecting to /bin/systemctl restart cwpsrv.service
PHP Warning: Error while sending QUERY packet. PID=11462 in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP Warning: mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
Redirecting to /bin/systemctl restart httpd.service
PHP Warning: Error while sending QUERY packet. PID=11462 in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0
Redirecting to /bin/systemctl reload httpd.service
Redirecting to /bin/systemctl reload nginx.service
Redirecting to /bin/systemctl reload httpd.service

Date which backup script is using: 2020-11-12 00:41:49


Please help to get rid of these errors.

Hardoman

#1
Anyone?

Support team, can you look at it please?


Hardoman


Hardoman

OK, for
error: rpmdb
it was RPM indeed corrupted.

I have installed completely a new CentOS server and in the very first cron logs I see the same as one of the issue reported above:

######################
Update Server Packages
######################
Redirecting to /bin/systemctl restart cwpsrv.service
Redirecting to /bin/systemctl restart cwp-phpfpm.service
Redirecting to /bin/systemctl reload cwpsrv.service
Redirecting to /bin/systemctl reload cwp-phpfpm.service
PHP Warning:  Error while sending QUERY packet. PID=23143 in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php(0) : eval()'d code on line 57
PHP Fatal error:  Uncaught Error: Call to undefined function mysql_error() in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php(0) : eval()'d code:57
Stack trace:
#0 /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php(0): unknown()
#1 {main}
  thrown in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php(0) : eval()'d code on line 57

Date which backup script is using: 2021-01-19 00:50:42


I don't want to open a paid support ticket as it's not an issue for me but it's a bug that should be addressed by developers.

@Sandeep
please have a look

studio4host

VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.