mysql upgrade failure

20 views
Skip to first unread message

Francois Lachance

unread,
Jan 24, 2019, 5:30:27 PM1/24/19
to security-onion
Hello everyone!

I have a two node setup - one master and one heavy node.

Thursday is soup day! I had no problem running soup on the master node. I just ran soup on my heavy node and got a few error messages about mysql upgrade not being able to be completed.

Below is the output from soup starting at the banner abour mysql-server update:

###########################################################################
New mysql-server packages available. Stopping services for clean update.....done.
###########################################################################
Synchronizing state of mysql.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable mysql
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
Synchronizing state of mysql.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install disable mysql
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
Reading package lists...
Building dependency tree...
Reading state information...
securityonion-pfring-module is already the newest version (20121107-0ubuntu0securityonion31).
The following packages were automatically installed and are no longer required:
geoip-database-extra gir1.2-appindicator3-0.1 gir1.2-javascriptcoregtk-4.0
gir1.2-nma-1.0 gir1.2-timezonemap-1.0 gir1.2-webkit2-4.0 javascript-common
libjs-openlayers libtimezonemap-data libtimezonemap1 libwireshark8
libwiretap6 libwscodecs1 libwsutil7 linux-headers-4.15.0-29
linux-headers-4.15.0-32 linux-headers-4.15.0-33 linux-headers-4.15.0-36
linux-headers-4.15.0-38 linux-headers-4.15.0-39 linux-headers-4.15.0-42
linux-headers-4.15.0-42-generic linux-image-4.15.0-42-generic
linux-modules-4.15.0-29-generic linux-modules-4.15.0-32-generic
linux-modules-4.15.0-33-generic linux-modules-4.15.0-36-generic
linux-modules-4.15.0-38-generic linux-modules-4.15.0-39-generic
linux-modules-4.15.0-42-generic linux-modules-extra-4.15.0-42-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages were automatically installed and are no longer required:
geoip-database-extra gir1.2-appindicator3-0.1 gir1.2-javascriptcoregtk-4.0
gir1.2-nma-1.0 gir1.2-timezonemap-1.0 gir1.2-webkit2-4.0 javascript-common
libjs-openlayers libtimezonemap-data libtimezonemap1 libwireshark8
libwiretap6 libwscodecs1 libwsutil7 linux-headers-4.15.0-29
linux-headers-4.15.0-32 linux-headers-4.15.0-33 linux-headers-4.15.0-36
linux-headers-4.15.0-38 linux-headers-4.15.0-39 linux-headers-4.15.0-42
linux-headers-4.15.0-42-generic linux-image-4.15.0-42-generic
linux-modules-4.15.0-29-generic linux-modules-4.15.0-32-generic
linux-modules-4.15.0-33-generic linux-modules-4.15.0-36-generic
linux-modules-4.15.0-38-generic linux-modules-4.15.0-39-generic
linux-modules-4.15.0-42-generic linux-modules-extra-4.15.0-42-generic
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
apt apt-transport-https apt-utils libapt-inst2.0 libapt-pkg5.0
libmysqlclient20 libtiff5 libwireshark-data libwireshark11 libwiretap8
libwscodecs2 libwsutil9 mysql-client mysql-client-5.7 mysql-client-core-5.7
mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7
securityonion-sostat tshark unattended-upgrades wireshark wireshark-common
wireshark-gtk wireshark-qt
26 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 41.3 MB of archives.
After this operation, 507 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libapt-pkg5.0 amd64 1.2.29ubuntu0.1 [707 kB]
Get:2 http://ppa.launchpad.net/securityonion/stable/ubuntu xenial/main amd64 securityonion-sostat all 20120722-0ubuntu0securityonion116 [24.6 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libapt-inst2.0 amd64 1.2.29ubuntu0.1 [55.4 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 apt amd64 1.2.29ubuntu0.1 [1,042 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 apt-utils amd64 1.2.29ubuntu0.1 [197 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client-core-5.7 amd64 5.7.25-0ubuntu0.16.04.2 [6,673 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-common all 5.7.25-0ubuntu0.16.04.2 [15.5 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client-5.7 amd64 5.7.25-0ubuntu0.16.04.2 [1,726 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server-5.7 amd64 5.7.25-0ubuntu0.16.04.2 [2,623 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server-core-5.7 amd64 5.7.25-0ubuntu0.16.04.2 [7,272 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 apt-transport-https amd64 1.2.29ubuntu0.1 [26.1 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmysqlclient20 amd64 5.7.25-0ubuntu0.16.04.2 [813 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libtiff5 amd64 4.0.6-1ubuntu0.5 [149 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libwireshark-data all 2.6.6-1~ubuntu16.04.0 [1,401 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libwsutil9 amd64 2.6.6-1~ubuntu16.04.0 [55.7 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libwiretap8 amd64 2.6.6-1~ubuntu16.04.0 [175 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libwscodecs2 amd64 2.6.6-1~ubuntu16.04.0 [17.4 kB]
Get:18 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libwireshark11 amd64 2.6.6-1~ubuntu16.04.0 [13.5 MB]
Get:19 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client all 5.7.25-0ubuntu0.16.04.2 [10.0 kB]
Get:20 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server all 5.7.25-0ubuntu0.16.04.2 [10.8 kB]
Get:21 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 tshark amd64 2.6.6-1~ubuntu16.04.0 [132 kB]
Get:22 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 wireshark-gtk amd64 2.6.6-1~ubuntu16.04.0 [680 kB]
Get:23 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 wireshark-common amd64 2.6.6-1~ubuntu16.04.0 [388 kB]
Get:24 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 wireshark-qt amd64 2.6.6-1~ubuntu16.04.0 [3,516 kB]
Get:25 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 unattended-upgrades all 0.90ubuntu0.10 [32.3 kB]
Get:26 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 wireshark amd64 2.6.6-1~ubuntu16.04.0 [4,436 B]
Fetched 41.3 MB in 2s (15.7 MB/s)
(Reading database ... 294915 files and directories currently installed.)
Preparing to unpack .../libapt-pkg5.0_1.2.29ubuntu0.1_amd64.deb ...
Unpacking libapt-pkg5.0:amd64 (1.2.29ubuntu0.1) over (1.2.29) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libapt-pkg5.0:amd64 (1.2.29ubuntu0.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 294915 files and directories currently installed.)
Preparing to unpack .../libapt-inst2.0_1.2.29ubuntu0.1_amd64.deb ...
Unpacking libapt-inst2.0:amd64 (1.2.29ubuntu0.1) over (1.2.29) ...
Preparing to unpack .../apt_1.2.29ubuntu0.1_amd64.deb ...
Unpacking apt (1.2.29ubuntu0.1) over (1.2.29) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up apt (1.2.29ubuntu0.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 294915 files and directories currently installed.)
Preparing to unpack .../apt-utils_1.2.29ubuntu0.1_amd64.deb ...
Unpacking apt-utils (1.2.29ubuntu0.1) over (1.2.29) ...
Preparing to unpack .../mysql-client-core-5.7_5.7.25-0ubuntu0.16.04.2_amd64.deb ...
Unpacking mysql-client-core-5.7 (5.7.25-0ubuntu0.16.04.2) over (5.7.24-0ubuntu0.16.04.1) ...
Preparing to unpack .../mysql-common_5.7.25-0ubuntu0.16.04.2_all.deb ...
Unpacking mysql-common (5.7.25-0ubuntu0.16.04.2) over (5.7.24-0ubuntu0.16.04.1) ...
Preparing to unpack .../mysql-client-5.7_5.7.25-0ubuntu0.16.04.2_amd64.deb ...
Unpacking mysql-client-5.7 (5.7.25-0ubuntu0.16.04.2) over (5.7.24-0ubuntu0.16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up mysql-common (5.7.25-0ubuntu0.16.04.2) ...
(Reading database ... 294915 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.25-0ubuntu0.16.04.2_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.25-0ubuntu0.16.04.2) over (5.7.24-0ubuntu0.16.04.1) ...
Preparing to unpack .../mysql-server-core-5.7_5.7.25-0ubuntu0.16.04.2_amd64.deb ...
Unpacking mysql-server-core-5.7 (5.7.25-0ubuntu0.16.04.2) over (5.7.24-0ubuntu0.16.04.1) ...
Preparing to unpack .../apt-transport-https_1.2.29ubuntu0.1_amd64.deb ...
Unpacking apt-transport-https (1.2.29ubuntu0.1) over (1.2.29) ...
Preparing to unpack .../libmysqlclient20_5.7.25-0ubuntu0.16.04.2_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.25-0ubuntu0.16.04.2) over (5.7.24-0ubuntu0.16.04.1) ...
Preparing to unpack .../libtiff5_4.0.6-1ubuntu0.5_amd64.deb ...
Unpacking libtiff5:amd64 (4.0.6-1ubuntu0.5) over (4.0.6-1ubuntu0.4) ...
Preparing to unpack .../libwireshark-data_2.6.6-1~ubuntu16.04.0_all.deb ...
Unpacking libwireshark-data (2.6.6-1~ubuntu16.04.0) over (2.6.5-1~ubuntu16.04.0) ...
Preparing to unpack .../libwsutil9_2.6.6-1~ubuntu16.04.0_amd64.deb ...
Unpacking libwsutil9:amd64 (2.6.6-1~ubuntu16.04.0) over (2.6.5-1~ubuntu16.04.0) ...
Preparing to unpack .../libwiretap8_2.6.6-1~ubuntu16.04.0_amd64.deb ...
Unpacking libwiretap8:amd64 (2.6.6-1~ubuntu16.04.0) over (2.6.5-1~ubuntu16.04.0) ...
Preparing to unpack .../libwscodecs2_2.6.6-1~ubuntu16.04.0_amd64.deb ...
Unpacking libwscodecs2:amd64 (2.6.6-1~ubuntu16.04.0) over (2.6.5-1~ubuntu16.04.0) ...
Preparing to unpack .../libwireshark11_2.6.6-1~ubuntu16.04.0_amd64.deb ...
Unpacking libwireshark11:amd64 (2.6.6-1~ubuntu16.04.0) over (2.6.5-1~ubuntu16.04.0) ...
Preparing to unpack .../mysql-client_5.7.25-0ubuntu0.16.04.2_all.deb ...
Unpacking mysql-client (5.7.25-0ubuntu0.16.04.2) over (5.7.24-0ubuntu0.16.04.1) ...
Preparing to unpack .../mysql-server_5.7.25-0ubuntu0.16.04.2_all.deb ...
Unpacking mysql-server (5.7.25-0ubuntu0.16.04.2) over (5.7.24-0ubuntu0.16.04.1) ...
Preparing to unpack .../tshark_2.6.6-1~ubuntu16.04.0_amd64.deb ...
Unpacking tshark (2.6.6-1~ubuntu16.04.0) over (2.6.5-1~ubuntu16.04.0) ...
Preparing to unpack .../wireshark-gtk_2.6.6-1~ubuntu16.04.0_amd64.deb ...
Unpacking wireshark-gtk (2.6.6-1~ubuntu16.04.0) over (2.6.5-1~ubuntu16.04.0) ...
Preparing to unpack .../wireshark-common_2.6.6-1~ubuntu16.04.0_amd64.deb ...
Unpacking wireshark-common (2.6.6-1~ubuntu16.04.0) over (2.6.5-1~ubuntu16.04.0) ...
Preparing to unpack .../wireshark-qt_2.6.6-1~ubuntu16.04.0_amd64.deb ...
Unpacking wireshark-qt (2.6.6-1~ubuntu16.04.0) over (2.6.5-1~ubuntu16.04.0) ...
Preparing to unpack .../unattended-upgrades_0.90ubuntu0.10_all.deb ...
Unpacking unattended-upgrades (0.90ubuntu0.10) over (0.90ubuntu0.9) ...
Preparing to unpack .../wireshark_2.6.6-1~ubuntu16.04.0_amd64.deb ...
Unpacking wireshark (2.6.6-1~ubuntu16.04.0) over (2.6.5-1~ubuntu16.04.0) ...
Preparing to unpack .../securityonion-sostat_20120722-0ubuntu0securityonion116_all.deb ...
Unpacking securityonion-sostat (20120722-0ubuntu0securityonion116) over (20120722-0ubuntu0securityonion114) ...
Processing triggers for systemd (229-4ubuntu21.15) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.2) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Setting up libapt-inst2.0:amd64 (1.2.29ubuntu0.1) ...
Setting up apt-utils (1.2.29ubuntu0.1) ...
Setting up mysql-client-core-5.7 (5.7.25-0ubuntu0.16.04.2) ...
Setting up mysql-client-5.7 (5.7.25-0ubuntu0.16.04.2) ...
Setting up mysql-server-core-5.7 (5.7.25-0ubuntu0.16.04.2) ...
Setting up mysql-server-5.7 (5.7.25-0ubuntu0.16.04.2) ...
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up apt-transport-https (1.2.29ubuntu0.1) ...
Setting up libmysqlclient20:amd64 (5.7.25-0ubuntu0.16.04.2) ...
Setting up libtiff5:amd64 (4.0.6-1ubuntu0.5) ...
Setting up libwireshark-data (2.6.6-1~ubuntu16.04.0) ...
Setting up libwsutil9:amd64 (2.6.6-1~ubuntu16.04.0) ...
Setting up libwiretap8:amd64 (2.6.6-1~ubuntu16.04.0) ...
Setting up libwscodecs2:amd64 (2.6.6-1~ubuntu16.04.0) ...
Setting up libwireshark11:amd64 (2.6.6-1~ubuntu16.04.0) ...
Setting up mysql-client (5.7.25-0ubuntu0.16.04.2) ...
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Setting up wireshark-common (2.6.6-1~ubuntu16.04.0) ...
Setting up tshark (2.6.6-1~ubuntu16.04.0) ...
Setting up wireshark-gtk (2.6.6-1~ubuntu16.04.0) ...
Setting up wireshark-qt (2.6.6-1~ubuntu16.04.0) ...
Setting up unattended-upgrades (0.90ubuntu0.10) ...
Not replacing deleted config file /etc/apt/apt.conf.d/50unattended-upgrades
Setting up wireshark (2.6.6-1~ubuntu16.04.0) ...
Setting up securityonion-sostat (20120722-0ubuntu0securityonion116) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
###########################################################################
All updates have been installed.


I noticed that mysql is actually not running on the heavy node (should it?) but it is on the master node (/usr/sbin/mysqld process is running).

Everything is back up and appears to be running normally, so I am not sure if I'm chasing a ghost here.

Anyone else noticed that error? Any suggestions on how to dig into the cause of this problem?

Thanks!

Wes Lambert

unread,
Jan 24, 2019, 5:34:19 PM1/24/19
to securit...@googlegroups.com
Hi Francois,

You can disregard this error on the forward.heavy nodes, as mysql is not used.

You can also run the following to disable it if it is active.

sudo systemctl disable mysql


Thanks,
Wes

--
Follow Security Onion on Twitter!
https://twitter.com/securityonion
---
You received this message because you are subscribed to the Google Groups "security-onion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to security-onio...@googlegroups.com.
To post to this group, send email to securit...@googlegroups.com.
Visit this group at https://groups.google.com/group/security-onion.
For more options, visit https://groups.google.com/d/optout.


--

Doug Burks

unread,
Jan 25, 2019, 7:16:37 AM1/25/19
to securit...@googlegroups.com

Wes Lambert

unread,
Jan 25, 2019, 7:37:44 AM1/25/19
to securit...@googlegroups.com
Yes, my apologies, Francois.  I was not reading well enough and interpreted this as symptom of an upgrade, in which we typically ignore this error -- Doug's advice above should be more fitting.

Thanks,
Wes

Francois Lachance

unread,
Jan 25, 2019, 2:39:18 PM1/25/19
to security-onion
I ran the one-liner given in the wiki page and got the following results:

Synchronizing state of mysql.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable mysql
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

Is that the expected result?

Thanks

Doug Burks

unread,
Jan 26, 2019, 7:10:01 AM1/26/19
to securit...@googlegroups.com
No, that's not the expected result.  Per the error message, you'll want to determine what process has locked /var/lib/dpkg/lock-frontend.  What is the output of the following?
sudo lsof /var/lib/dpkg/lock*

Francois Lachance

unread,
Jan 28, 2019, 4:54:26 PM1/28/19
to security-onion
Your command came up empty. I ran the one-liner again and that time it performed an upgrade to mysql.

I assume that these two lines in the output are normal?

insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).

Thanks!

François

Doug Burks

unread,
Jan 28, 2019, 4:57:13 PM1/28/19
to securit...@googlegroups.com
Yes, those two lines should be fine.
Reply all
Reply to author
Forward
0 new messages