Backup error NS7

NethServer Version: NethServer release 7.9.2009 (final)
Module: BackUp/GLPI

Hello everyone. I’ve been using an NS7 server for years without problems, and I’m getting the following error when performing a backup.
I’ve also noticed that I can’t access GLPI.
Any help, please?

This is the backup error:

Jul 13 21:55:35 server esmith::event[58096]: mysqldump: Got error: 2002: "Can't connect to local MySQL server through socket '/run/rh-mariadb105-mariadb/glpi-mysql.sock' (2)" when trying to connect
Jul 13 21:55:35 server esmith::event[58096]: Action: /etc/e-smith/events/pre-backup-data/S60nethserver-glpi-10-latest-rh-mariadb105-dump-database FAILED: 2 [0.050717]

Thank you all and greetings

It seems the glpi database isn’t started.

Does it help to reconfigure glpi?

signal-event nethserver-glpi-update

NethServer 7 is EOL so it’s time to think about an upgrade/migration, see NethServer 7 migration — NS8 documentation

1 Like

Hi Markus! Thanks for your help
rh-mariadb105-mariadb@glpi is disabled. When I try to enable show this:

Error

dns.service_action_error

If I copy the command:

echo '{"action":"enable","name":"rh-mariadb105-mariadb@glpi"}' | /usr/bin/setsid /usr/bin/sudo /usr/libexec/nethserver/api/system-services/update | jq

And the log:


Failed to start MariaDB 10.5 database server.

|CODE_FILE|src/core/job.c|
| --- | --- |
|CODE_FUNCTION|job_log_status_message|
|CODE_LINE|774|
|MESSAGE_ID|be02cf6855d2428ba40df7e9d022f03d|
|PRIORITY|3|
|RESULT|failed|
|SYSLOG_FACILITY|3|
|SYSLOG_IDENTIFIER|systemd|
|UNIT|rh-mariadb105-mariadb@glpi.service|
|_BOOT_ID|58dfbd5615d441d586662f33261ba95d|
|_CAP_EFFECTIVE|1fffffffff|
|_CMDLINE|/usr/lib/systemd/systemd --switched-root --system --deserialize 22|
|_COMM|systemd|
|_EXE|/usr/lib/systemd/systemd|
|_GID|0|
|_HOSTNAME|xxx.xxxx.xx|
|_MACHINE_ID|2bda58d94ddc46ea912a0b719f7ceaef|
|_PID|1|
|_SOURCE_REALTIME_TIMESTAMP|1752439861432725|
|_SYSTEMD_CGROUP|/|
|_TRANSPORT|journal|
|_UID|0|
|__CURSOR|s=c020fce8723549cba3df423961792e35;i=1efdfd;b=58dfbd5615d441d586662f33261ba95d;m=43240a507db;t=639d5b36e52f5;x=9211d3af13844eda|
|__MONOTONIC_TIMESTAMP|4613879433179|
|__REALTIME_TIMESTAMP|1752439861433077|

MariaDB status:

* rh-mariadb105-mariadb@glpi.service - MariaDB 10.5 database server
   Loaded: loaded (/etc/systemd/system/rh-mariadb105-mariadb@.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/rh-mariadb105-mariadb@glpi.service.d
           `-nethserver.conf
   Active: activating (start-pre) since Sun 2025-07-13 22:54:57 CEST; 274ms ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 16844 ExecStartPost=/usr/bin/scl enable $RH_MARIADB105_SCLS_ENABLED -- /opt/rh/rh-mariadb105/root/usr/libexec/mysql-check-upgrade --defaults-group-suffix=.%I (code=exited, status=0/SUCCESS)
  Process: 16815 ExecStart=/opt/rh/rh-mariadb105/root/usr/libexec/mysqld-scl-helper enable $RH_MARIADB105_SCLS_ENABLED -- /opt/rh/rh-mariadb105/root/usr/libexec/mysqld --defaults-group-suffix=.%I --basedir=/opt/rh/rh-mariadb105/root/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER (code=killed, signal=SEGV)
  Process: 17161 ExecStartPre=/usr/bin/scl enable $RH_MARIADB105_SCLS_ENABLED -- /opt/rh/rh-mariadb105/root/usr/libexec/mysql-check-socket --defaults-group-suffix=.%I (code=exited, status=0/SUCCESS)
  Process: 17153 ExecStartPre=/usr/bin/scl enable $RH_MARIADB105_SCLS_ENABLED -- /usr/bin/scl_enabled rh-mariadb105 (code=exited, status=0/SUCCESS)
 Main PID: 16815 (code=killed, signal=SEGV);         : 17204 (scl)
   CGroup: /system.slice/system-rh\x2dmariadb105\x2dmariadb.slice/rh-mariadb105-mariadb@glpi.service
           `-control
             |-17204 /usr/bin/scl enable rh-mariadb105 -- /opt/rh/rh-mariadb105/root/usr/libexec/mysql-prepare-db-dir --defaults-group-suffix=.glpi rh-mariadb105-mariadb@glpi.service
             |-17207 /bin/bash /var/tmp/sclhyJvgB
             |-17210 /bin/sh /opt/rh/rh-mariadb105/root/usr/libexec/mysql-prepare-db-dir --defaults-group-suffix=.glpi rh-mariadb105-mariadb@glpi.service
             `-17246 dirname /var/log/rh-mariadb105/glpi.log

Jul 13 22:54:57 xxxx.xxx.xxsystemd[1]: Stopped MariaDB 10.5 database server.
Jul 13 22:54:57 xxxx.xxx.xxsystemd[1]: Starting MariaDB 10.5 database server...
Jul 13 22:54:57 xxxx.xxx.xxscl[17161]: Socket file /run/rh-mariadb105-mariadb/glpi-mysql.sock exists.
Jul 13 22:54:57 xxxx.xxx.xxscl[17161]: No process is using /run/rh-mariadb105-mariadb/glpi-mysql.sock, which means it is a garbage, so it will be removed automatically.

It seems mariadb started. Is glpi reachable?

Are there errors in /var/log/rh-mariadb105/glpi.log?

Does it help to remove /run/rh-mariadb105-mariadb/glpi-mysql.sock so it can be recreated?

1 Like

Are there errors in /var/log/rh-mariadb105/glpi.log?

Does it help to remove /run/rh-mariadb105-mariadb/glpi-mysql.sock so it can be recreated?

I’m going to try it
EDIT: No, got same error

It could be a hardware issue. I don’t think it’s a bug in mysqld as there were no updates and it seems to have worked before.

From the logs:

This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

Did you already try to reboot the server?

1 Like

Did you already try to reboot the server?
Yes, with no luck.

How can I reinstall safely GLPI 10 Latest? I don’t mind to lose database and start again
Thanks for your help anyway

I think I posted the wrong command:

signal-event nethserver-glpi-10-latest-update

I need to check but I think you need to remove the database manually so it will be recreated at reinstall.

1 Like

I think I posted the wrong command:

Yes, don’t worry, I used the correct command.

I need to check but I think you need to remove the database manually so it will be recreated at reinstall.

Of course, wen you can. Too late.
Good night

1 Like

Check database access:

/opt/rh/rh-mariadb105/root/bin/mysql --socket="/var/run/rh-mariadb105-mariadb/glpi-mysql.sock" -D glpi -e "show tables;"

Remove GLPI database:

/opt/rh/rh-mariadb105/root/bin/mysql --socket="/var/run/rh-mariadb105-mariadb/glpi-mysql.sock" -e "drop database glpi;"

Reconfigure GLPI and create new database:

signal-event nethserver-glpi-10-latest-update

If it doesn’t help you could try to remove the DB and reinstall glpi:

/opt/rh/rh-mariadb105/root/bin/mysql --socket="/var/run/rh-mariadb105-mariadb/glpi-mysql.sock" -e "drop database glpi;"
yum reinstall nethserver-glpi-10-latest

Docs: glpi-latest [NethServer & NethSecurity]

1 Like

It shows me the tables correctly

When I type the command, this is the result:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/rh-mariadb105-mariadb/glpi-mysql.sock' (111)

That’s strange because both commands access the same database.

Are you root? Could it be that mariadb is in a restart loop?

Please recheck the mariadb service status:

[root@neth ~]# systemctl status rh-mariadb105-mariadb@glpi -l
● rh-mariadb105-mariadb@glpi.service - MariaDB 10.5 database server
   Loaded: loaded (/etc/systemd/system/rh-mariadb105-mariadb@.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/rh-mariadb105-mariadb@glpi.service.d
           └─nethserver.conf
   Active: active (running) since Mon 2025-07-14 09:23:34 CEST; 4h 12min ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 17059 (mysqld)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/system-rh\x2dmariadb105\x2dmariadb.slice/rh-mariadb105-mariadb@glpi.service
           └─17059 /opt/rh/rh-mariadb105/root/usr/libexec/mysqld --defaults-group-suffix=.glpi --basedir=/opt/rh/rh-mariadb105/root/usr

Jul 14 09:23:34 neth.cmb.local systemd[1]: Starting MariaDB 10.5 database server...
Jul 14 09:23:34 neth.cmb.local scl[17014]: Database MariaDB is probably initialized in /var/opt/rh/rh-mariadb105/lib/mysql-glpi already, nothing is done.
Jul 14 09:23:34 neth.cmb.local scl[17014]: If this is not the case, make sure the /var/opt/rh/rh-mariadb105/lib/mysql-glpi is empty before running mysql-prepare-db-dir.
Jul 14 09:23:34 neth.cmb.local mysqld-scl-helper[17059]: 2025-07-14  9:23:34 0 [Note] /opt/rh/rh-mariadb105/root/usr/libexec/mysqld (mysqld 10.5.16-MariaDB) starting as process 17059 ...
Jul 14 09:23:34 neth.cmb.local systemd[1]: Started MariaDB 10.5 database server.

EDIT:

You could delete the DB from the filesystem…

rm -rf /var/opt/rh/rh-mariadb105/lib/mysql-glpi/glpi

…and try to recreate it using

signal-event nethserver-glpi-10-latest-update
1 Like

That’s strange because both commands access the same database

Yes, it’s strange

Are you root? Could it be that mariadb is in a restart loop?

Yes, I’m logged in like root user

Please recheck the mariadb service status

[root@server ~]# systemctl status rh-mariadb105-mariadb@glpi -l
● rh-mariadb105-mariadb@glpi.service - MariaDB 10.5 database server
   Loaded: loaded (/etc/systemd/system/rh-mariadb105-mariadb@.service; enabled;                                                                                                              vendor preset: disabled)
  Drop-In: /etc/systemd/system/rh-mariadb105-mariadb@glpi.service.d
           └─nethserver.conf
   Active: activating (auto-restart) (Result: signal) since Mon 2025-07-14 13:44                                                                                                             :38 CEST; 2s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 4122 ExecStartPost=/usr/bin/scl enable $RH_MARIADB105_SCLS_ENABLED --                                                                                                              /opt/rh/rh-mariadb105/root/usr/libexec/mysql-check-upgrade --defaults-group-suf                                                                                                             fix=.%I (code=exited, status=0/SUCCESS)
  Process: 4097 ExecStart=/opt/rh/rh-mariadb105/root/usr/libexec/mysqld-scl-help                                                                                                             er enable $RH_MARIADB105_SCLS_ENABLED -- /opt/rh/rh-mariadb105/root/usr/libexec/                                                                                                             mysqld --defaults-group-suffix=.%I --basedir=/opt/rh/rh-mariadb105/root/usr $MYS                                                                                                             QLD_OPTS $_WSREP_NEW_CLUSTER (code=killed, signal=SEGV)
  Process: 4048 ExecStartPre=/usr/bin/scl enable $RH_MARIADB105_SCLS_ENABLED --                                                                                                              /opt/rh/rh-mariadb105/root/usr/libexec/mysql-prepare-db-dir --defaults-group-suf                                                                                                             fix=.%I %n (code=exited, status=0/SUCCESS)
  Process: 4012 ExecStartPre=/usr/bin/scl enable $RH_MARIADB105_SCLS_ENABLED --                                                                                                              /opt/rh/rh-mariadb105/root/usr/libexec/mysql-check-socket --defaults-group-suffi                                                                                                             x=.%I (code=exited, status=0/SUCCESS)
  Process: 4005 ExecStartPre=/usr/bin/scl enable $RH_MARIADB105_SCLS_ENABLED --                                                                                                              /usr/bin/scl_enabled rh-mariadb105 (code=exited, status=0/SUCCESS)
 Main PID: 4097 (code=killed, signal=SEGV)
   Status: "Taking your SQL requests now..."

Jul 14 13:44:38 my.server.com systemd[1]: Failed to start MariaDB 10.5 databa                                                                                                             se server.
Jul 14 13:44:38 my.server.com systemd[1]: Unit rh-mariadb105-mariadb@glpi.ser                                                                                                             vice entered failed state.
Jul 14 13:44:38 my.server.com systemd[1]: rh-mariadb105-mariadb@glpi.service                                                                                                              failed.

EDIT

You could delete the DB from the filesystem…

rm -rf /var/opt/rh/rh-mariadb105/lib/mysql-glpi/glpi

It has deleted database

…and try to recreate it using

signal-event nethserver-glpi-10-latest-update

Ououou! That it’s man! Many many thanks Markus!

1 Like

Mariadb seems to auto-restart, that would explain why the db isn’t reachable sometimes.

1 Like