"cPanel & WHM update failure in upcp script" MySQL 5.7 Community Server yum issue

mvandemar

Well-Known Member
Jun 17, 2006
161
43
178
Just received my third email in a row on 3 different servers, all 3 having the exact same issue:

Code:
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] ================================================================================
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]  Package                      Arch    Version          Repository          Size
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] ================================================================================
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] Updating:
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]  mysql-community-client       x86_64  5.7.37-1.el7     mysql57-community   25 M
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]  mysql-community-common       x86_64  5.7.37-1.el7     mysql57-community  311 k
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]  mysql-community-devel        x86_64  5.7.37-1.el7     mysql57-community  3.9 M
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]  mysql-community-libs         x86_64  5.7.37-1.el7     mysql57-community  2.4 M
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]  mysql-community-libs-compat  x86_64  5.7.37-1.el7     mysql57-community  1.2 M
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]  mysql-community-server       x86_64  5.7.37-1.el7     mysql57-community  174 M
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] Transaction Summary
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] ================================================================================
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] Upgrade  6 Packages
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] Total download size: 207 M
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] Downloading packages:
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] warning:
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] /var/cache/yum/x86_64/7/mysql57-community/packages/mysql-community-common-5.7.37-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] Public key for mysql-community-common-5.7.37-1.el7.x86_64.rpm is not installed
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] --------------------------------------------------------------------------------
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] Total                                              221 MB/s | 207 MB  00:00     
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] Retrieving key from http://repo.mysql.com/RPM-GPG-KEY-mysql
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] The GPG keys listed for the "MySQL 5.7 Community Server" repository are already installed but they are not correct for this package.
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] Check that the correct key URLs are configured for this repository.
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]  Failing package is: mysql-community-libs-compat-5.7.37-1.el7.x86_64
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]  GPG Keys are configured as: http://repo.mysql.com/RPM-GPG-KEY-mysql
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] (XID jtrfe8) “/usr/bin/yum” reported error code “1” when it ended:
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] checkyum version 22.3  (excludes: bind-chroot)
[2022-01-18 00:54:14 +0000] E    [/usr/local/cpanel/scripts/rpmup] The “/usr/local/cpanel/scripts/rpmup” command (process 19766) reported error number 1 when it ended.
Any idea what's up with this?

-Michael
 

swbrains

Well-Known Member
Sep 13, 2006
262
37
178
I received the same email during tonight's update with the same update log contents as you; in particular, the same failure:
Code:
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] The GPG keys listed for the "MySQL 5.7 Community Server" repository are already installed but they are not correct for this package.
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup] Check that the correct key URLs are configured for this repository.
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]  Failing package is: mysql-community-libs-compat-5.7.37-1.el7.x86_64
[2022-01-18 00:54:14 +0000]      [/usr/local/cpanel/scripts/rpmup]  GPG Keys are configured as: http://repo.mysql.com/RPM-GPG-KEY-mysql
 

andrew.n

Well-Known Member
Jun 9, 2020
875
325
63
EU
cPanel Access Level
Root Administrator

jsar

Registered
Jan 18, 2022
1
0
0
Canada
cPanel Access Level
Root Administrator
Same problem here. I did what @andrew.n suggested and problem seems to be solved.

To be more specific, I didn't update the gpgkey line in the /etc/yum.repos.d/. That's because this line seems to be a path to an internal file and not a url.

Instead, I got the content of the file here: https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 and pasted it inside the actual file here: /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
 

cPanelAnthony

Administrator
Staff member
Oct 18, 2021
1,046
111
118
Houston, TX
cPanel Access Level
Root Administrator

Bramus

Member
Jan 27, 2014
8
0
51
cPanel Access Level
Root Administrator
On one server the fix described above worked fine:

Code:
/scripts/autorepair mysql_gpg_key
/usr/local/cpanel/scripts/upcp
---

One server was pretty stubborn though. For whatever reason it was looking for a file named RPM-GPG-KEY-mysql-2022-2022 (note the double -2022 suffix).

Code:
cat /var/cpanel/updatelogs/update.25405.379489493.1639234214.log | grep "GPG-KEY"
[2022-01-24 13:59:44 +0100]      [/usr/local/cpanel/scripts/rpmup] GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022-2022"
[2022-01-24 13:59:44 +0100]      [/usr/local/cpanel/scripts/rpmup] Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022-2022
Fixed that by manually copying RPM-GPG-KEY-mysql-2022 to RPM-GPG-KEY-mysql-2022-2022:

Code:
cp /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022 /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022-2022
With that in place, running /usr/local/cpanel/scripts/upcp worked fine again.
 

ahmadrusli

Member
Jan 24, 2022
10
1
1
Indonesia
cPanel Access Level
Root Administrator
I just installed using GCP.
already successful logged whm with root.
but mysql not running.

error message:

The MySQL/MariaDB server is not currently running. If this is not intentional, you may experience problems with your upgrade.

i tried using ssh:
mysql -v
the results:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

i tried :
/scripts/autorepair mysql_gpg_key
result: autofix is done.

i tried:
/usr/local/cpanel/scripts/upcp
result:
Code:
[2022-01-24 21:51:05 +0700]   [*] Evaluating if system can autoupgrade MySQL 5.5 to MySQL 5.7...
[2022-01-24 21:51:05 +0700]   [!] Unable to autoupgrade: "mysql-version" is not configured properly in /var/cpanel/cpanel.config
[2022-01-24 21:51:05 +0700] E The install encountered a fatal error: (XID f2q7p9) The system failed to determine the “mysqld” version.
=> Log closed Mon Jan 24 21:51:05 2022
[2022-01-24 21:51:05 +0700]   17% complete
[2022-01-24 21:51:05 +0700] E Running `/usr/local/cpanel/scripts/updatenow --upcp --log=/var/cpanel/updatelogs/update.3712.403315.1643031829.log` failed, exited with code 2 (signal = 0)
=> Log closed Mon Jan 24 21:51:05 2022
now, i can not start mysql. if i tried install again with GCP, i think the problem will the same.

auto fixer must loaded before GCP deploy new instance? how can we do that?

thank you
 

mvandemar

Well-Known Member
Jun 17, 2006
161
43
178
@mvandemar could you try the steps in this article?

Anthony, sorry for the late reply. The last issue with the gpp keys seems to have been on the 18th, so I am assuming they resolved the problem and rolled out the fix. I was getting unrelated errors on the 20th and 21st due to 500 - Internal Server Errors on all of the repository mirrors, but for the past few days it looks like upcp has run successfully across the board. Thank you for your help.

-Michael
 

ahmadrusli

Member
Jan 24, 2022
10
1
1
Indonesia
cPanel Access Level
Root Administrator
@ahmadrusli - can you check the cPanel install log to see if there are any errors there about MySQL? That is located at /var/log/cpanel-install.log and could help narrow down the issue.
yes, i will see it.
but for now, when i Upgrade to Latest Version via whm.
these are the error:

Code:
----------------------------------------------------------------------------------------------------
=> Log opened from cPanel Update (upcp) - Slave (1768) at Wed Jan 26 20:07:18 2022
[2022-01-26 20:07:18 +0700]   Detected cron=0 (manual flag passed on command line)
[2022-01-26 20:07:19 +0700]   Running Standardized hooks
[2022-01-26 20:07:19 +0700]   mtime on upcp is 1637001952 (Tue Nov 16 01:45:52 2021)
----------------------------------------------------------------------------------------------------
=> Log opened from /usr/local/cpanel/scripts/updatenow (1770) at Wed Jan 26 20:07:20 2022
[2022-01-26 20:07:20 +0700]   Running version '11.100.0.4' of updatenow.
[2022-01-26 20:07:20 +0700]   Retrieved public key from vendor: cpanel, category: release, url: https://securedownloads.cpanel.net/cPanelPublicKey.asc
[2022-01-26 20:07:21 +0700]   Retrieved public key from vendor: cpanel, category: development, url: https://securedownloads.cpanel.net/cPanelDevelopmentKey.asc
[2022-01-26 20:07:21 +0700]   Detected version '11.100.0.4' from version file.
[2022-01-26 20:07:21 +0700]   Target version set to '11.100.0.7'
[2022-01-26 20:07:21 +0700]   Switching to version 11.100.0.7 of updatenow to determine if we can reach that version without failure.
[2022-01-26 20:07:21 +0700]   Retrieving and staging /cpanelsync/11.100.0.7/cpanel/scripts/updatenow.static.bz2
[2022-01-26 20:07:21 +0700]   Using mirror '69.73.140.17' for host 'httpupdate.cpanel.net'.
[2022-01-26 20:07:22 +0700]   Using mirror '103.163.139.122' for host 'httpupdate.cpanel.net'.
[2022-01-26 20:07:22 +0700]   Become an updatenow.static for version: 11.100.0.7
=> Log closed Wed Jan 26 20:07:22 2022
----------------------------------------------------------------------------------------------------
=> Log opened from /usr/local/cpanel/scripts/updatenow.static-cpanelsync (1770) at Wed Jan 26 20:07:23 2022
[2022-01-26 20:07:23 +0700]   Running version '11.100.0.7' of updatenow.
[2022-01-26 20:07:23 +0700]   Detected version '11.100.0.4' from version file.
[2022-01-26 20:07:23 +0700]   Target version set to '11.100.0.7'
[2022-01-26 20:07:23 +0700]   Checking license
[2022-01-26 20:07:24 +0700]   License file check complete
[2022-01-26 20:07:24 +0700]   glibc-2.17-325.el7_9.x86_64
[2022-01-26 20:07:24 +0700]   Testing if rpm_is_working RPM is installed
[2022-01-26 20:07:24 +0700]   Testing if it's possible to install a simple RPM
[2022-01-26 20:07:24 +0700]   Preparing...                          ########################################
[2022-01-26 20:07:24 +0700]   Updating / installing...
[2022-01-26 20:07:24 +0700]   rpm_is_working-1.0-0                  ########################################
[2022-01-26 20:07:24 +0700]   [*] Evaluating if system can autoupgrade MySQL 5.5 to MySQL 5.7...
[2022-01-26 20:07:24 +0700]   [!] Unable to autoupgrade: "mysql-version" is not configured properly in /var/cpanel/cpanel.config
[2022-01-26 20:07:24 +0700] E The install encountered a fatal error: (XID qdp7wc) The system failed to determine the “mysqld” version.
=> Log closed Wed Jan 26 20:07:24 2022
[2022-01-26 20:07:24 +0700] E Running `/usr/local/cpanel/scripts/updatenow --upcp --log=/var/cpanel/updatelogs/update.1768.8962.1643202348.log` failed, exited with code 2 (signal = 0)
=> Log closed Wed Jan 26 20:07:24 2022

this is fresh installation, via gcp on 2022-01-24 (19:28:17) .
i saw Change Log for 100.0.7 Entry: 2022-01-20 Fixed case CPANEL-39775: Update MySQL GPG Key url for 2022.
i think this patch not work when i installed on 24 january 2022. so my mysql not working.

but i just saw gcp change log Last updated today: 26/01/2022.
hopefully this patch work in this update.

but, is there any suggestion what i do for now?

thank you very much.