MySQL upgrade left Zammad stuck


  • Used Zammad version: 5.0.3-1643716628.f44a1a2b.focal
  • Used Zammad installation type: package
  • Operating system: Ubuntu 20.04
  • Browser + version: any

Expected behavior:

  • Zammad retries failed connection

Actual behavior:

  • Zammad stopped working

Steps to reproduce the behavior:

  • Configure unattended-upgrades to install security upgrades automatically
  • Wait for a mysql-server upgrade

Here some logs of what happened:

  • /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
2022-02-04 06:58:03,779 INFO Starting unattended upgrades script
2022-02-04 06:58:03,780 INFO Allowed origins are: o=Ubuntu,a=focal, o=Ubuntu,a=focal-security, o=UbuntuESMApps,a=focal-apps-security, o=UbuntuESM,a=focal-infra-security
2022-02-04 06:58:03,780 INFO Initial blacklist:
2022-02-04 06:58:03,780 INFO Initial whitelist (not strict):
2022-02-04 06:58:07,267 INFO Packages that will be upgraded: libmysqlclient21 mysql-client-8.0 mysql-client-core-8.0 mysql-server mysql-server-8.0 mysql-server-core-8.0
2022-02-04 06:58:07,268 INFO Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
2022-02-04 06:59:23,174 INFO All upgrades installed
  • /var/log/mysql/error.log (please note times are -1h)
2022-02-04T05:58:18.199313Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version
: 8.0.27-0ubuntu0.20.04.1).
2022-02-04T05:58:20.386215Z 0 [Warning] [MY-010909] [Server] /usr/sbin/mysqld: Forcing close of thread 1361920  user: 'zammad'.
2022-02-04T05:58:20.386340Z 0 [Warning] [MY-010909] [Server] /usr/sbin/mysqld: Forcing close of thread 1361936  user: 'zammad'.
2022-02-04T05:58:20.386421Z 0 [Warning] [MY-010909] [Server] /usr/sbin/mysqld: Forcing close of thread 1361928  user: 'zammad'.
2022-02-04T05:58:42.981473Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.27-0ubuntu0.20.04.1)  (Ubuntu).
2022-02-04T07:54:41.372397Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.28-0ubuntu0.20.04.3) starting as process 481599
2022-02-04T07:54:41.396109Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-02-04T07:54:41.664655Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-02-04T07:54:42.042709Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-02-04T07:54:42.042762Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-02-04T07:54:42.107547Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2022-02-04T07:54:42.107624Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.28-0ubuntu0.20.04.3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu).
  • /var/log/zammad/production.log
I, [2022-02-04T06:58:21.496556 #28372-174680]  INFO -- : 2022-02-04T06:58:21+0100: [Worker(host:proxy pid:28372)] Error while reserving job: Mysql2::Error::ConnectionError: Lost connection to MySQL server during query
I, [2022-02-04T08:01:40.046939 #28353-1642260]  INFO -- : Started GET "/" for at 2022-02-04 08:01:40 +0100
F, [2022-02-04T08:01:40.081812 #28353-1642260] FATAL -- :
[2bb9ad44-1116-4dee-88e0-02f826c6907a] ActiveRecord::StatementInvalid (Mysql2::Error::ConnectionError: Lost connection to MySQL server during query):
[2bb9ad44-1116-4dee-88e0-02f826c6907a] config/initializers/db_preferences.rb:14:in `block in <main>'
[2bb9ad44-1116-4dee-88e0-02f826c6907a] app/models/setting.rb:104:in `load'
[2bb9ad44-1116-4dee-88e0-02f826c6907a] app/models/setting.rb:55:in `get'
[2bb9ad44-1116-4dee-88e0-02f826c6907a] lib/omniauth/saml_database.rb:8:in `initialize'

The two errors above were repeated until Zammad has been restarted, then everything went back to normal.

I do agree that Zammad should be more stable in those situations.
Could you please create a bug report at GitHub - zammad/zammad: Zammad is a web based open source helpdesk/customer support system and reference this thread?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.