The “Mysql” failed with an error: Can't use an undefined value as a HASH reference at /usr/local/cpanel/Cpanel/Pkgacct/Components/Mysql.pm line 119

Bdzzld

Well-Known Member
Apr 3, 2004
412
5
168
Hello,

Has something changed to the way cPanel backups account, because as of the end of November cPanel backup responds with the following error on one of our cPanel servers:

Code:
...
[2019-12-12 02:25:08 +0100] Copying Mail files....[2019-12-12 02:25:08 +0100] Done
[2019-12-12 02:25:08 +0100] Copying proftpd file....[2019-12-12 02:25:08 +0100] Done
[2019-12-12 02:25:08 +0100] Copy userdata...[2019-12-12 02:25:08 +0100] Done
[2019-12-12 02:25:08 +0100] Copy custom virtualhost templates...[2019-12-12 02:25:08 +0100] Done
[2019-12-12 02:25:08 +0100] Copying mailman lists and archives....Done copying mailman lists and archives.
[2019-12-12 02:25:08 +0100] Copying homedir.............
Skipping access-logs
Skipping .cpanel/datastore
Skipping .cpanel/caches

[2019-12-12 02:25:10 +0100] Done
[2019-12-12 02:25:10 +0100] Performing “Mysql” component....
Load watching suspended due to SIGUSR1
[2019-12-12 02:25:10 +0100] Determining mysql dbs...Error while connecting to MySQL: (XID aw6w5u) The system failed to connect to the “MySQL” database “mysql” because of an error: CR_CONNECTION_ERROR (Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2))
Error while connecting to MySQL: (XID aw6w5u) The system failed to connect to the “MySQL” database “mysql” because of an error: CR_CONNECTION_ERROR (Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)) at /usr/local/cpanel/Cpanel/Mysql/Basic.pm line 391.
    ...caught at /usr/local/cpanel/Cpanel/Pkgacct/Components/Mysql.pm line 112.
Load watching resumed due to SIGUSR2
[2019-12-12 02:25:10 +0100] The “Mysql” failed with an error: Can't use an undefined value as a HASH reference at /usr/local/cpanel/Cpanel/Pkgacct/Components/Mysql.pm line 119.
[2019-12-12 02:25:10 +0100] Completed “Mysql” component.
[2019-12-12 02:25:10 +0100] Performing “MysqlRemoteNotes” component....
[2019-12-12 02:25:10 +0100] Completed “MysqlRemoteNotes” component.
[2019-12-12 02:25:10 +0100] Copying cpuser file.......[2019-12-12 02:25:10 +0100] Done
[2019-12-12 02:25:10 +0100] Copying crontab file.......[2019-12-12 02:25:10 +0100] Done
[2019-12-12 02:25:10 +0100] Performing “Quota” component....
[2019-12-12 02:25:10 +0100] Completed “Quota” component.
[2019-12-12 02:25:10 +0100] Performing “Integration” component....

...
The error occurs random and is not specific to one of the accounts being backupped.

Thanking you in advance.
 
  • Like
Reactions: el_zat

cPJeremy

Technical Analyst
Staff member
Feb 13, 2019
58
3
83
Houston TX
cPanel Access Level
Root Administrator
Hello, Bdzzld!

I am sorry to hear that your facing this issue. During the recent updates for cPanel, there should have been no major changes to how the backups handle MySQL databases.

I was reviewing the output you provided and to me it seems to be suggesting that the MySQL service is down or is restarting at some point during the backup process. I apologize for any inconvenience but this may be hard to diagnose only based on the output.

Would you be willing to open a ticket with our support team using the link in my signature? Our team can assist you directly and update the thread once we determine what was the cause of this.

Thank you!
 

Bdzzld

Well-Known Member
Apr 3, 2004
412
5
168
@cPJeremy: Forementioned problem seems to have been automatically resolved. Tonight's scheduled backup did not respond with the error for the very first time in weeks.
 

sneader

Well-Known Member
Aug 21, 2003
1,195
68
178
La Crosse, WI
cPanel Access Level
Root Administrator
We've had this happen 7 times since November 2019 on one particular server. Forcing a new backup always works, but is not a great solution. Is this something you still want a ticket on, or ?

-Scott
 

foxmedo

Well-Known Member
Apr 21, 2014
50
1
58
cPanel Access Level
Root Administrator
Hello,

we are facing to the same problem it's not daily problem and there for exemple we have the problem today 04/07 before was 12/06, 09/06, 06/06 and 30/05, 29/05, 26/05

is there any suggestion ?