Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
10.1.26
-
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.2 (stretch)
Release: 9.2
Codename: stretch
Description
Under Debian Stretch, the MariaDB server comes with the mariadb service unit:
- /lib/systemd/system/mariadb.service
The mysql and mysqld service units are also provided as aliases (alternative names):
- /etc/systemd/system/mysql.service (symlink to /lib/systemd/system/mariadb.service)
- /etc/systemd/system/mysqld.service (symlink to /lib/systemd/system/mariadb.service)
In our environment we have a cron task that is responsible to renew our let's encrypt SSL certificates. That cron task check that the mysql service is running prior doing anything else and exit if the service is not running. We execute the following command to check the service:
systemctl is-active mysql
|
Lately, one of our certificate has not been renewed. After some investigation, we have found that the command above report the mysql service as inactive while it is active. However, the same command on the mariadb service unit report the service as active.
Executing the systemctl status mysql command seem to solve the problem because when re-running the systemctl is-active mysql command just after, the service is reported as active. That is really a weird issue.
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Labels | o |
Description |
Under Debian Stretch, the MariaDB server comes with the *mariadb* service unit:
* /lib/systemd/system/mariadb.service The *mysql* and *mysqld* service units are also provided as aliases (alternative names): * /etc/systemd/system/mysql.service (symlink to /lib/systemd/system/mariadb.service) * /etc/systemd/system/mysqld.service (symlink to /lib/systemd/system/mariadb.service) In our environment we have a cron task that is responsible to renew our let's encrypt SSL certificates. That cron task check that the *mysql* service is running prior doing anything else and exit if the service is not running. We execute the following command to check the service: {code:bash} systemctl is-active mysql {code} Lately, one of our certificate has not been renewed. After some investigation, we have found that the command above report the *mysql* service as inactive while it is active. This seem to occurs after a while and cannot be reproduced easily. However, the same command on the *mariadb* service unit report the service as active. Executing the *systemctl status mysql* command seem to solve the problem because when re-running the the *systemctl is-active mysql* command just after, the service is reported as active. That is really a weird issue. |
Under Debian Stretch, the MariaDB server comes with the *mariadb* service unit:
* /lib/systemd/system/mariadb.service The *mysql* and *mysqld* service units are also provided as aliases (alternative names): * /etc/systemd/system/mysql.service (symlink to /lib/systemd/system/mariadb.service) * /etc/systemd/system/mysqld.service (symlink to /lib/systemd/system/mariadb.service) In our environment we have a cron task that is responsible to renew our let's encrypt SSL certificates. That cron task check that the *mysql* service is running prior doing anything else and exit if the service is not running. We execute the following command to check the service: {code:bash} systemctl is-active mysql {code} Lately, one of our certificate has not been renewed. After some investigation, we have found that the command above report the *mysql* service as inactive while it is active. This seem to occurs after a while and cannot be reproduced easily. However, the same command on the *mariadb* service unit report the service as active. Executing the *systemctl status mysql* command seem to solve the problem because when re-running the *systemctl is-active mysql* command just after, the service is reported as active. That is really a weird issue. |
Labels | o |
Labels | need_feedback |
Labels | need_feedback |
Fix Version/s | 10.1 [ 16100 ] | |
Assignee | Ondřej Surý [ oerdnj ] |
Description |
Under Debian Stretch, the MariaDB server comes with the *mariadb* service unit:
* /lib/systemd/system/mariadb.service The *mysql* and *mysqld* service units are also provided as aliases (alternative names): * /etc/systemd/system/mysql.service (symlink to /lib/systemd/system/mariadb.service) * /etc/systemd/system/mysqld.service (symlink to /lib/systemd/system/mariadb.service) In our environment we have a cron task that is responsible to renew our let's encrypt SSL certificates. That cron task check that the *mysql* service is running prior doing anything else and exit if the service is not running. We execute the following command to check the service: {code:bash} systemctl is-active mysql {code} Lately, one of our certificate has not been renewed. After some investigation, we have found that the command above report the *mysql* service as inactive while it is active. This seem to occurs after a while and cannot be reproduced easily. However, the same command on the *mariadb* service unit report the service as active. Executing the *systemctl status mysql* command seem to solve the problem because when re-running the *systemctl is-active mysql* command just after, the service is reported as active. That is really a weird issue. |
Under Debian Stretch, the MariaDB server comes with the *mariadb* service unit:
* /lib/systemd/system/mariadb.service The *mysql* and *mysqld* service units are also provided as aliases (alternative names): * /etc/systemd/system/mysql.service (symlink to /lib/systemd/system/mariadb.service) * /etc/systemd/system/mysqld.service (symlink to /lib/systemd/system/mariadb.service) In our environment we have a cron task that is responsible to renew our let's encrypt SSL certificates. That cron task check that the *mysql* service is running prior doing anything else and exit if the service is not running. We execute the following command to check the service: {code:bash} systemctl is-active mysql {code} Lately, one of our certificate has not been renewed. After some investigation, we have found that the command above report the *mysql* service as inactive while it is active. However, the same command on the *mariadb* service unit report the service as active. Executing the *systemctl status mysql* command seem to solve the problem because when re-running the *systemctl is-active mysql* command just after, the service is reported as active. That is really a weird issue. |
Labels | systemd |
Assignee | Ondřej Surý [ oerdnj ] | Axel Schwenke [ axel ] |
Fix Version/s | N/A [ 14700 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Resolution | Won't Fix [ 2 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 84864 ] | MariaDB v4 [ 153560 ] |
The issue can be reproduced has follows:
1. Start the mariadb service:
root@srv01:~# systemctl start mariadb
2. Check that the service is running:
root@srv01:~# systemctl status mariadb
● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2018-01-14 22:07:30 UTC; 20s ago
Process: 17865 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 17862 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
Process: 17644 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exit
Process: 17640 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 17637 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 17834 (mysqld)
Status: "Taking your SQL requests now..."
Tasks: 29 (limit: 4915)
CGroup: /system.slice/mariadb.service
└─17834 /usr/sbin/mysqld
Jan 14 22:07:27 srv01 systemd[1]: Starting MariaDB database server...
Jan 14 22:07:28 srv01 mysqld[17834]: 2018-01-14 22:07:28 140228024779328 [Note] /usr/sbin/mysqld (mysqld 10.1.26-MariaDB-0+deb9u1) starting as process 17834 ...
Jan 14 22:07:30 srv01 systemd[1]: Started MariaDB database server.
3. Enable the mariadb service unit. This is what our installation script is doing to ensure that the service is enabled. Basicallyn it resolves the aliased mysql unit to the real mariadb.service unit and enable it):
root@srv01:~# systemctl enable mariadb
4. Check status of aliased service units:
root@srv01:~# systemctl is-active mysql mysqld
inactive
inactive
As you can see, both are reported as inactive while we expect them reported as active.
Now the weird part:
5. Check terce status of aliased units:
root@srv01:~# systemctl status mysql mysqld
● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2018-01-14 22:07:30 UTC; 4min 18s ago
Main PID: 17834 (mysqld)
Status: "Taking your SQL requests now..."
CGroup: /system.slice/mariadb.service
└─17834 /usr/sbin/mysqld
Jan 14 22:07:27 srv01 systemd[1]: Starting MariaDB database server...
Jan 14 22:07:28 srv01 mysqld[17834]: 2018-01-14 22:07:28 140228024779328 [Note] /usr/sbin/mysqld (mysqld 10.1.26-MariaDB-0+deb9u1) starting as process 17834 ...
Jan 14 22:07:30 srv01 systemd[1]: Started MariaDB database server.
● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2018-01-14 22:07:30 UTC; 4min 18s ago
Main PID: 17834 (mysqld)
Status: "Taking your SQL requests now..."
CGroup: /system.slice/mariadb.service
└─17834 /usr/sbin/mysqld
Jan 14 22:07:27 srv01 systemd[1]: Starting MariaDB database server...
Jan 14 22:07:28 srv01 mysqld[17834]: 2018-01-14 22:07:28 140228024779328 [Note] /usr/sbin/mysqld (mysqld 10.1.26-MariaDB-0+deb9u1) starting as process 17834 ...
Jan 14 22:07:30 srv01 systemd[1]: Started MariaDB database server.
So here both are showed as active (running)
6. Again, check status of aliased units:
root@srv01:~# systemctl is-active mysql mysqld
active
active