mysql-server-5.7 upgrade failed

41 views
Skip to first unread message

Tom D'Andrea

unread,
Apr 24, 2020, 5:10:12 PM4/24/20
to security-onion
Hello,
soup upgrade seemed to choke on the mysql upgrade.  Any help would be greatly appreciated.

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
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages were automatically installed and are no longer required:
  libgoogle-perftools4 libtcmalloc-minimal4 linux-headers-4.15.0-58
  linux-headers-4.15.0-74 linux-headers-4.4.0-173
  linux-headers-4.4.0-173-generic linux-modules-4.15.0-58-generic
  linux-modules-4.15.0-74-generic
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
  distro-info-data
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 4,674 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 distro-info-data all 0.28ubuntu0.14 [4,674 B]
Fetched 4,674 B in 0s (26.0 kB/s)
(Reading database ... 282018 files and directories currently installed.)
Preparing to unpack .../distro-info-data_0.28ubuntu0.14_all.deb ...
Unpacking distro-info-data (0.28ubuntu0.14) over (0.28ubuntu0.13) ...
Setting up mysql-server-5.7 (5.7.29-0ubuntu0.16.04.1) ...
Job for mysql.service canceled.
invoke-rc.d: initscript mysql, action "stop" failed.
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
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
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 distro-info-data (0.28ubuntu0.14) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)


Thanks,
Tom

Tom D'Andrea

unread,
Apr 25, 2020, 12:43:18 PM4/25/20
to security-onion
From sostat:

=========================================================================
Sguil Uncategorized Events
=========================================================================
ERROR 1317 (70100) at line 1: Query execution was interrupted

=========================================================================
Sguil events summary for yesterday
=========================================================================
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

=========================================================================
Top 50 All time Sguil Events
=========================================================================
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Wes Lambert

unread,
Apr 27, 2020, 8:15:44 AM4/27/20
to securit...@googlegroups.com
Are you able to start MySQL?

sudo service mysql start

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 view this discussion on the web visit https://groups.google.com/d/msgid/security-onion/e98d80db-42fd-4601-b5a3-40b3fb10d6c7%40googlegroups.com.


--

Tom D'Andrea

unread,
Apr 27, 2020, 10:23:14 AM4/27/20
to security-onion
Looks like mysql is running however no receiving the following:

soadmin@dcc0corp0sob01:~$ more /var/log/nsm/securityonion/sguild.log
Executing: /usr/bin/sguild -c /etc/nsm/securityonion/sguild.conf -a /etc/nsm/securityonion/autocat.conf -g /etc/nsm/securityonion/sguild.queries -A /etc/nsm/securityonion/sguild.access -C /etc/nsm/securityon
ion/certs
2020-04-27 14:15:32 pid(13701)  Loading access list: /etc/nsm/securityonion/sguild.access
2020-04-27 14:15:32 pid(13701)  Sensor access list set to ALLOW ANY.
2020-04-27 14:15:32 pid(13701)  Client access list set to ALLOW ANY.
2020-04-27 14:15:32 pid(13701)  Email Configuration:
2020-04-27 14:15:32 pid(13701)    Config file: /etc/sguild/sguild.email
2020-04-27 14:15:32 pid(13701)    Enabled: No
2020-04-27 14:15:32 pid(13701)  Connecting to localhost on 3306 as sguil
2020-04-27 14:15:32 pid(13701)  MySQL Version: version 5.7.29-0ubuntu0.16.04.1-log
2020-04-27 14:15:32 pid(13701)  SguilDB Version: 0.14
2020-04-27 14:15:32 pid(13701)  Creating event MERGE table.
2020-04-27 14:15:32 pid(13701)  Creating tcphdr MERGE table.
2020-04-27 14:15:32 pid(13701)  Creating udphdr MERGE table.
2020-04-27 14:15:32 pid(13701)  Creating icmphdr MERGE table.
2020-04-27 14:15:32
*************************************************************

                          ERROR: You appear to be using an old version of the
 sguil database schema that does not support the MERGE tables
 Please use the migrate_event.tcl script and see the CHANGES
 document for more information

. Table data returned status => data {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist}
 *************************************************************

SGUILD: Exiting...


On Friday, April 24, 2020 at 5:10:12 PM UTC-4, Tom D'Andrea wrote:

Wes Lambert

unread,
Apr 27, 2020, 11:34:21 AM4/27/20
to securit...@googlegroups.com
How old was the original installation? 

--
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.

Tom D'Andrea

unread,
Apr 27, 2020, 11:43:45 AM4/27/20
to security-onion
A year - tops


On Friday, April 24, 2020 at 5:10:12 PM UTC-4, Tom D'Andrea wrote:

Tom D'Andrea

unread,
Apr 27, 2020, 1:13:50 PM4/27/20
to security-onion
The mysql error.log

/var/log/mysql# more error.log
2020-04-27T13:58:57.667314Z 0 [Note] Giving 6 client threads a chance to die gracefully
2020-04-27T13:58:57.667362Z 0 [Note] Shutting down slave threads
2020-04-27T13:58:59.667431Z 0 [Note] Forcefully disconnecting 1 remaining clients
2020-04-27T13:58:59.667450Z 0 [Warning] /usr/sbin/mysqld: Forcing close of thread 4  user: 'sguil'

2020-04-27T13:58:59.667479Z 0 [Note] Event Scheduler: Purging the queue. 0 events
2020-04-27T14:08:58.078107Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-04-27T14:08:58.078150Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2020-04-27T14:08:58.079471Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.29-0ubuntu0.16.04.1-log) starting as process 11264 ...
2020-04-27T14:08:58.083480Z 0 [Note] InnoDB: PUNCH HOLE support available
2020-04-27T14:08:58.083505Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-04-27T14:08:58.083509Z 0 [Note] InnoDB: Uses event mutexes
2020-04-27T14:08:58.083512Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-04-27T14:08:58.083515Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2020-04-27T14:08:58.083518Z 0 [Note] InnoDB: Using Linux native AIO
2020-04-27T14:08:58.083703Z 0 [Note] InnoDB: Number of pools: 1
2020-04-27T14:08:58.083791Z 0 [Note] InnoDB: Using CPU crc32 instructions
2020-04-27T14:08:58.085049Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-04-27T14:08:58.091664Z 0 [Note] InnoDB: Completed initialization of buffer pool
2020-04-27T14:08:58.093393Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-04-27T14:08:58.104767Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2020-04-27T14:08:58.105741Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 1152013864
2020-04-27T14:08:58.105750Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 1152013873
2020-04-27T14:08:58.105754Z 0 [Note] InnoDB: Database was not shutdown normally!
2020-04-27T14:08:58.105757Z 0 [Note] InnoDB: Starting crash recovery.
2020-04-27T14:08:58.222713Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-04-27T14:08:58.222733Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-04-27T14:08:58.222767Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-04-27T14:08:58.242746Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-04-27T14:08:58.243478Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2020-04-27T14:08:58.243488Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2020-04-27T14:08:58.243812Z 0 [Note] InnoDB: 5.7.29 started; log sequence number 1152013873
2020-04-27T14:08:58.243993Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-04-27T14:08:58.244082Z 0 [Note] Plugin 'FEDERATED' is disabled.
2020-04-27T14:08:58.246032Z 0 [Note] InnoDB: Buffer pool(s) load completed at 200427 14:08:58
2020-04-27T14:08:58.249204Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2020-04-27T14:08:58.249215Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2020-04-27T14:08:58.249780Z 0 [Warning] CA certificate ca.pem is self signed.
2020-04-27T14:08:58.249817Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2020-04-27T14:08:58.249869Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2020-04-27T14:08:58.249877Z 0 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
2020-04-27T14:08:58.249895Z 0 [Note] Server socket created on IP: '127.0.0.1'.
2020-04-27T14:08:58.255496Z 0 [Note] Event Scheduler: Loaded 0 events
2020-04-27T14:08:58.255625Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.29-0ubuntu0.16.04.1-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
2020-04-27T14:08:58.910973Z 2 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2020-04-27T16:06:17.697699Z 216 [ERROR] /usr/sbin/mysqld: Incorrect key file for table './securityonion_db/event_xxxxxxx@002dens160_20200415.MYI'; try to repair it
2020-04-27T16:24:00.380646Z 12 [Note] Aborted connection 12 to db: 'securityonion_db' user: 'sguil' host: 'localhost' (Got an error reading communication packets)




On Friday, April 24, 2020 at 5:10:12 PM UTC-4, Tom D'Andrea wrote:

Wes Lambert

unread,
Apr 28, 2020, 7:39:33 AM4/28/20
to securit...@googlegroups.com
Tom,

From your sguild logs:

ERROR: You appear to be using an old version of the
 sguil database schema that does not support the MERGE tables
 Please use the migrate_event.tcl script and see the CHANGES
 document for more information

You may want to try the following:

/usr/lib/sguild/sql_scripts/migrate_event.tcl  

And see the following:


Last, have you manually set a password for the mysql root user, or was that error message from you trying to login?

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.
Reply all
Reply to author
Forward
0 new messages