Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-36998

New warning appears in journalctl mariadb

    XMLWordPrintable

Details

    Description

      When we bootstrap or restart a Galera node a new warning appears in the output of journalctl:

      mariadb.service: Referenced but unset environment variable evaluates to an empty string: MYSQLD_OPTS, _WSREP_NEW_CLUSTER

      It looks like this warning is a sign for a bug or non clean code somewhere...

      11.8.2-MariaDB-ubu2204-log

      root@tn2:~# systemctl start mariadb
      root@tn2:~# systemctl status mariadb
      ● mariadb.service - MariaDB 11.8.2 database server
      Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: enabled)
      Drop-In: /etc/systemd/system/mariadb.service.d
      └─migrated-from-my.cnf-settings.conf
      Active: active (running) since Thu 2025-06-12 13:31:34 CEST; 7min ago
      Docs: man:mariadbd(8)
      https://mariadb.com/kb/en/library/systemd/
      Process: 521591 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
      Process: 521599 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && echo _>
      Process: 523764 ExecStartPost=/bin/rm -f /run/mysqld/wsrep-start-position (code=exited, status=0/SUCCESS)
      Process: 523766 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
      Main PID: 522444 (mariadbd)
      Status: "WSREP state transfer (role joiner) completed."
      Tasks: 20 (limit: 124884)
      Memory: 143.9M (peak: 144.7M)
      CPU: 1min 15.028s
      CGroup: /system.slice/mariadb.service
      └─522444 /usr/sbin/mariadbd --wsrep_start_position=1a4836fe-46c2-11f0-9e4d-5248ccbd91d1:630691
      journalctl -xeu mariadb
      Jun 12 13:31:34 tn2 mariadbd[522444]: 2025-06-12 13:31:34 1 [Note] WSREP: Server oli synced with group
      Jun 12 13:31:34 tn2 mariadbd[522444]: 2025-06-12 13:31:34 1 [Note] WSREP: Server status change joined -> synced
      Jun 12 13:31:34 tn2 mariadbd[522444]: 2025-06-12 13:31:34 1 [Note] WSREP: Synchronized with group, ready for connections
      Jun 12 13:31:34 tn2 mariadbd[522444]: 2025-06-12 13:31:34 1 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
      Jun 12 13:31:34 tn2 systemd[1]: Started mariadb.service - MariaDB 11.8.2 database server.
      Jun 12 13:31:34 tn2 /etc/mysql/debian-start[523768]: Upgrading MariaDB tables if necessary.
      Jun 12 13:31:34 tn2 /etc/mysql/debian-start[523787]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables
      Jun 12 13:37:28 tn2 mariadbd[522444]: 2025-06-12 13:37:28 0 [Note] WSREP: Member 0.0 (tn0) desyncs itself from group
      Jun 12 13:37:34 tn2 mariadbd[522444]: 2025-06-12 13:37:34 0 [Note] WSREP: Member 0.0 (tn0) resyncs itself to group.
      Jun 12 13:37:34 tn2 mariadbd[522444]: 2025-06-12 13:37:34 0 [Note] WSREP: Member 0.0 (tn0) synced with group.

      root@tn2:~# journalctl -xeu mariadb
      Jun 12 13:31:22 tn2 systemd[1]: Starting mariadb.service - MariaDB 11.8.2 database server...
      Jun 12 13:31:26 tn2 sh[521608]: WSREP: Recovered position 1a4836fe-46c2-11f0-9e4d-5248ccbd91d1:630691
      Jun 12 13:31:26 tn2 (mariadbd)[522444]: mariadb.service: Referenced but unset environment variable evaluates to an empty string: MYSQLD_OPTS, _WSREP_NEW_CLUSTER
      Jun 12 13:31:26 tn2 mariadbd[522444]: 2025-06-12 13:31:26 0 [Note] slave_connections_needed_for_purge changed to 0 because of Galera. Change it to 1 or higher if this Galera node is also Master in a normal replication setup

      A similar message we get after a bootstrap:

      root@tn2:~# journalctl -xeu mariadb
      Jun 12 14:07:47 tn0 systemd[1]: Starting mariadb.service - MariaDB 11.8.2 database server...
      Jun 12 14:07:48 tn0 sh[398956]: WSREP: Recovered position 1a4836fe-46c2-11f0-9e4d-5248ccbd91d1:641578
      Jun 12 14:07:48 tn0 (mariadbd)[399053]: mariadb.service: Referenced but unset environment variable evaluates to an empty string: MYSQLD_OPTS
      Jun 12 14:07:48 tn0 mariadbd[399053]: 2025-06-12 14:07:48 0 [Note] slave_connections_needed_for_purge changed to 0 because of Galera. Change it to 1 or higher if this Galera node is also Master in a normal>

      No problems seen so far.

      Attachments

        Activity

          People

            danblack Daniel Black
            oli Oli Sennhauser
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.