WHM cannot communicate with MySQL
We have inherited an old installation of cpanel, it has WHM 56.0 (build 51) on it. The ultimate goal is to migrate all of the domains to a different more recent version on a newer OS, but that is going to require resources that aren't in place yet and won't be for a while.
Our immediate task is to simply update the website. They have a "testing" WordPress website working on another server, and need to migrate its data to this one. It SHOULD be as simple as making a backup of the current server data, moving the old public_html directory aside, and then importing the new website and its databases.
But it's failing. After clicking on Databases->MySQL Databases there is a long delay, and the next screen says:
The MySQL server is currently offline.
(!) Mysql::initcache() failed: Timeout: Alarm
The old websites and such are in working order -- including all the myriad WordPress and so on. This means that MySQL IS indeed running and doing all its database things. It's just that we can't get the WHM to communicate with it.
I've also been doing some other troubleshooting, looking at other advice posted elsewhere in these forums. This is also failing hard. I'm currently attempting to run a "/usr/local/cpanel/scripts/upcp" and it too is not finishing, stalling here:
with this being the last thing showing in the error log when THAT is sitting there waiting to finish:
[2017-08-16 10:09:37 -0400] warn [cpanel] Cpanel::Wrap::send_cpwrapd_request The adminbin "cpmysql"Cpanel"DBCACHE"cpmysql"Cpanel"DBCACHE"
Cpanel::Wrap::send_cpwrapd_request("namespace", "Cpanel", "module", "cpmysql", "function", "DBCACHE", "data", "", "action", ...) called at /usr/local/cpanel/Cpanel/AdminBin.pm line 59
Cpanel::AdminBin::adminrun("cpmysql", "DBCACHE", "") called at cpanel.pl line 2767
cpanel::cpanel::domysql("initcache", ARRAY(0xc48c7b0)) called at cpanel.pl line 2079
eval {...} called at cpanel.pl line 2079
cpanel::cpanel::_api1("Mysql", "mysql", "initcache()", "initcache", ARRAY(0xc48c7b0), "safe_html_encode") called at /usr/local/cpanel/Cpanel/Template/Plugin/Api1.pm line 94
eval {...} called at /usr/local/cpanel/Cpanel/Template/Plugin/Api1.pm line 94
Cpanel::Template::Plugin::Api1::_api1_exec(0, "Mysql", "initcache", ARRAY(0xc48c7b0)) called at /usr/local/cpanel/Cpanel/Template/Plugin/Api1.pm line 46
Cpanel::Template::Plugin::Api1::_captured_api1_exec("Mysql", "initcache", ARRAY(0xc48c7b0)) called at /usr/local/cpanel/base/frontend/x3/sql/index.auto.tmpl line 5
eval {...} called at /usr/local/cpanel/base/frontend/x3/sql/index.auto.tmpl line 5
eval {...} called at /usr/local/cpanel/base/frontend/x3/sql/index.auto.tmpl line 16
Template::Provider::__ANON__(Template::Context=HASH(0xc488a8c)) called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template/Document.pm line 163
eval {...} called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template/Document.pm line 161
Template::Document::process(Template::Document=HASH(0xc48deec), Template::Context=HASH(0xc488a8c)) called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template/Context.pm line 351
eval {...} called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template/Context.pm line 321
Template::Context::process(Template::Context=HASH(0xc488a8c), Template::Document=HASH(0xc48deec)) called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template/Service.pm line 94
eval {...} called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template/Service.pm line 91
Template::Service::process(Template::Service=HASH(0xc488758), "/usr/local/cpanel/base/frontend/x3/sql/index.auto.tmpl", HASH(0xc479048)) called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template.pm line 66
Template::process(Template=HASH(0xc4884c4), "/usr/local/cpanel/base/frontend/x3/sql/index.auto.tmpl", HASH(0xc479048), SCALAR(0x980e294)) called at /usr/local/cpanel/Cpanel/Template.pm line 435
Cpanel::Template::process_template("cpanel", HASH(0xc479048), HASH(0xc479034)) called at cpanel.pl line 1206
cpanel::cpanel::cptt_exectag("/usr/local/cpanel/base/frontend/x3/sql/index.auto.tmpl", 1) called at cpanel.pl line 5197
cpanel::cpanel::run_standard_mode() called at cpanel.pl line 862
cpanel::cpanel::script("cpanel::cpanel", "./frontend/x3/sql/index.html") called at cpanel.pl line 332
[2017-08-16 10:09:37 -0400] warn [cpanel] Cpanel::Wrap::send_cpwrapd_request error: namespace=[Cpanel] module=[cpmysql] function=[DBCACHE]: set error in context mysql: statusmsg=[The adminbin "cpmysql"Cpanel"DBCACHE"
Cpanel::Wrap::send_cpwrapd_request("namespace", "Cpanel", "module", "cpmysql", "function", "DBCACHE", "data", "", "action", ...) called at /usr/local/cpanel/Cpanel/AdminBin.pm line 59
Cpanel::AdminBin::adminrun("cpmysql", "DBCACHE", "") called at cpanel.pl line 2767
cpanel::cpanel::domysql("initcache", ARRAY(0xc48c7b0)) called at cpanel.pl line 2079
eval {...} called at cpanel.pl line 2079
cpanel::cpanel::_api1("Mysql", "mysql", "initcache()", "initcache", ARRAY(0xc48c7b0), "safe_html_encode") called at /usr/local/cpanel/Cpanel/Template/Plugin/Api1.pm line 94
eval {...} called at /usr/local/cpanel/Cpanel/Template/Plugin/Api1.pm line 94
Cpanel::Template::Plugin::Api1::_api1_exec(0, "Mysql", "initcache", ARRAY(0xc48c7b0)) called at /usr/local/cpanel/Cpanel/Template/Plugin/Api1.pm line 46
Cpanel::Template::Plugin::Api1::_captured_api1_exec("Mysql", "initcache", ARRAY(0xc48c7b0)) called at /usr/local/cpanel/base/frontend/x3/sql/index.auto.tmpl line 5
eval {...} called at /usr/local/cpanel/base/frontend/x3/sql/index.auto.tmpl line 5
eval {...} called at /usr/local/cpanel/base/frontend/x3/sql/index.auto.tmpl line 16
Template::Provider::__ANON__(Template::Context=HASH(0xc488a8c)) called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template/Document.pm line 163
eval {...} called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template/Document.pm line 161
Template::Document::process(Template::Document=HASH(0xc48deec), Template::Context=HASH(0xc488a8c)) called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template/Context.pm line 351
eval {...} called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template/Context.pm line 321
Template::Context::process(Template::Context=HASH(0xc488a8c), Template::Document=HASH(0xc48deec)) called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template/Service.pm line 94
eval {...} called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template/Service.pm line 91
Template::Service::process(Template::Service=HASH(0xc488758), "/usr/local/cpanel/base/frontend/x3/sql/index.auto.tmpl", HASH(0xc479048)) called at /usr/local/cpanel/3rdparty/perl/522/lib/perl5/cpanel_lib/i386-linux-64int/Template.pm line 66
Template::process(Template=HASH(0xc4884c4), "/usr/local/cpanel/base/frontend/x3/sql/index.auto.tmpl", HASH(0xc479048), SCALAR(0x980e294)) called at /usr/local/cpanel/Cpanel/Template.pm line 435
Cpanel::Template::process_template("cpanel", HASH(0xc479048), HASH(0xc479034)) called at cpanel.pl line 1206
cpanel::cpanel::cptt_exectag("/usr/local/cpanel/base/frontend/x3/sql/index.auto.tmpl", 1) called at cpanel.pl line 5197
cpanel::cpanel::run_standard_mode() called at cpanel.pl line 862
cpanel::cpanel::script("cpanel::cpanel", "./frontend/x3/sql/index.html") called at cpanel.pl line 332
[2017-08-16 10:09:37 -0400] warn [Mysql::initcache] Encountered error in Mysql::initcache: Mysql::initcache() failed: Timeout: AlarmI've also been doing some other troubleshooting, looking at other advice posted elsewhere in these forums. This is also failing hard. I'm currently attempting to run a "/usr/local/cpanel/scripts/upcp" and it too is not finishing, stalling here:
[2017-08-16 08:56:11 -0400] 60% complete
[2017-08-16 08:56:11 -0400] Processing: Cleaning up mailbox trash
[2017-08-16 08:56:11 -0400] - Processing command `/usr/local/cpanel/scripts/dovecot_auto_expunge_trash`
[2017-08-16 08:56:11 -0400] 61% complete
[2017-08-16 08:56:11 -0400] Checking MySQL Versionwith this being the last thing showing in the error log when THAT is sitting there waiting to finish:
[2017-08-16 10:14:08 -0400] info [checkccompiler] /root/.cpanel/datastore/Cpanel::Sys::Compiler::test_compile_gcc
[2017-08-16 10:14:41 -0400] info [cleanquotas] Checking for orphaned quotas...
[2017-08-16 10:14:41 -0400] info [cleanquotas] Done.
[2017-08-16 10:14:41 -0400] info [autorepair] Successfully verified signature for cpanel (key types: release).
[2017-08-16 10:14:42 -0400] info [-] Successfully verified signature for cpanel (key types: release).
[2017-08-16 10:14:42 -0400] info [-] Successfully verified signature for cpanel (key types: release).
[2017-08-16 10:14:42 -0400] info [-] Successfully verified signature for cpanel (key types: release).
[2017-08-16 10:14:42 -0400] info [-] Successfully verified signature for cpanel (key types: release).
[2017-08-16 10:14:44 -0400] info [-] Successfully verified signature for cpanel (key types: release).
[2017-08-16 10:14:44 -0400] info [-] Successfully verified signature for cpanel (key types: release).
[2017-08-16 10:14:45 -0400] info [purge_modsec_log] Purged stale records from modsec database.
[2017-08-16 10:14:46 -0400] info [rebuild_sprites] File "/usr/local/cpanel/base/frontend/x3mail/branding/crimson_smoke/bottom_bg.gif" has 783 x 23 dimensions with 18009 pixels.
This is exceeding 8192 pixels and color palette issue may be expected when its associated sprite file is used:
"/usr/local/cpanel/base/frontend/x3mail/branding/crimson_smoke/heading_sprites_bg_snap_to_smallest_width.png".
[2017-08-16 10:14:47 -0400] info [rebuild_sprites] File "/usr/local/cpanel/base/frontend/x3mail/branding/the_beach/bottom_bg.gif" has 783 x 23 dimensions with 18009 pixels.
This is exceeding 8192 pixels and color palette issue may be expected when its associated sprite file is used:
"/usr/local/cpanel/base/frontend/x3mail/branding/the_beach/heading_sprites_bg_snap_to_smallest_width.png".
[2017-08-16 10:14:48 -0400] info [rebuild_sprites] File "/usr/local/cpanel/base/frontend/x3mail/branding/motor_city/bg.gif" has 400 x 400 dimensions with 160000 pixels.
This is exceeding 8192 pixels and color palette issue may be expected when its associated sprite file is used:
"/usr/local/cpanel/base/frontend/x3mail/branding/motor_city/ui_sprites_bg_snap_to_smallest_width.png".
[2017-08-16 10:14:50 -0400] info [rebuild_sprites] File "/usr/local/cpanel/base/frontend/x3/branding/crimson_smoke/bottom_bg.gif" has 783 x 23 dimensions with 18009 pixels.
This is exceeding 8192 pixels and color palette issue may be expected when its associated sprite file is used:
"/usr/local/cpanel/base/frontend/x3/branding/crimson_smoke/heading_sprites_bg_snap_to_smallest_width.png".
[2017-08-16 10:14:53 -0400] info [rebuild_sprites] File "/usr/local/cpanel/base/frontend/x3/branding/the_beach/bottom_bg.gif" has 783 x 23 dimensions with 18009 pixels.
This is exceeding 8192 pixels and color palette issue may be expected when its associated sprite file is used:
"/usr/local/cpanel/base/frontend/x3/branding/the_beach/heading_sprites_bg_snap_to_smallest_width.png".
[2017-08-16 10:14:54 -0400] info [rebuild_sprites] File "/usr/local/cpanel/base/frontend/x3/branding/motor_city/bg.gif" has 400 x 400 dimensions with 160000 pixels.
This is exceeding 8192 pixels and color palette issue may be expected when its associated sprite file is used:
"/usr/local/cpanel/base/frontend/x3/branding/motor_city/ui_sprites_bg_snap_to_smallest_width.png".
[2017-08-16 10:15:11 -0400] info _archive_maintenance] Email archiving is disabled per Tweak Settings.
[2017-08-16 10:15:13 -0400] info [setup_modsec_db] Initialized ModSecurity"
" database.
[2017-08-16 10:15:13 -0400] info [modsec_vendor] You do not have ModSecurity installed. There is no work to do.-
Encountered error in Mysql::initcache: Mysql::initcache() failed: Timeout: Alarm
Hello, Can you try disabling the "Use INFORMATION_SCHEMA to acquire MySQL disk usage" option under the "SQL" tab in "WHM >> Tweak Settings" and verify if accessing the MySQL Databases option in cPanel continues to issue an error message? Thank you.0 -
Can you try disabling the "Use INFORMATION_SCHEMA to acquire MySQL disk usage" option under the "SQL" tab in "WHM >> Tweak Settings" and verify if accessing the MySQL Databases option in cPanel continues to issue an error message?
That was one of the many suggestions from these forums. At first it was complaining about an upgrade in progress, which was apparently running (and stalled). Even after a reboot the error message for THAT didn't go away, until I figured out that I had to rename the /usr/local/cpanel/upgrade_in_progress.txt file. After doing that, I retried the Tweak Settings above, and "Use INFORMATION_SCHEMA to aquire MySQL disk usage" is set to "Off". This did NOT allow me to access the MySQL databases via WHM, the same timeout issue is still occurring.0 -
Hello, Could you open a support ticket using the link in my signature so we can take a closer look? Thank you. 0 -
I'm not going to fully declare this "solved" yet, at least not until staff has gotten in later today to complete their own work. The problem was apparently a "too many chefs" sysadmin problem. Somebody unknown had taken it upon themselves to firewall tcp port 3306 to only allow a specific /24 subnet, but had not also explicitly allowed 127.0.0.1 The symptoms then were that the first command line would work, but not the second (which would just time out): mysql -u root -hlocalhost -p mysql -u root -h127.0.0.1 -p
The difference being that with mysql, the service interprets "localhost" as communication via a filesystem socket, and "127.0.0.1" as tcp to 3306. Unlike MOST services, for mysql "localhost" and "127.0.0.1" are NOT equivalent and interchangeable. The solution then was to explicitly allow 127.0.0.1; the easiest way being to simply delete that last "REJECT" rule and append the new entries:/sbin/iptables -D INPUT -p tcp --dport 3306 -j REJECT /sbin/iptables -A INPUT -p tcp --dport 3306 -s 127.0.0.1 -j ACCEPT /sbin/iptables -A INPUT -p tcp --dport 3306 -j REJECT0
Please sign in to leave a comment.
Comments
4 comments