[SOLVED] Backup fails to dump rh-mariadb105 database

What does the service status says (errors)?

Please delete the above post (as it contains the server’s hostname, which for security we want redacted)

 Redirecting to /bin/systemctl status rh-mariadb105-mariadb@nextcloud.service
    ● rh-mariadb105-mariadb@nextcloud.service - MariaDB 10.5 database server
       Loaded: loaded (/etc/systemd/system/rh-mariadb105-mariadb@.service; disabled; vendor preset: disabled)
      Drop-In: /etc/systemd/system/rh-mariadb105-mariadb@nextcloud.service.d
               └─nethserver.conf
       Active: failed (Result: exit-code) since Thu 2021-06-24 11:55:45 EDT; 3s ago
         Docs: man:mysqld(8)
               https://mariadb.com/kb/en/library/systemd/
      Process: 23090 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=1/FAILURE)
      Process: 23081 ExecStartPre=/usr/bin/scl enable $RH_MARIADB105_SCLS_ENABLED -- /usr/bin/scl_enabled rh-mariadb105 (code=exited, status=0/SUCCESS)

    Jun 24 11:55:45 network systemd[1]: Starting MariaDB 10.5 database server...
    Jun 24 11:55:45 network scl[23090]: Socket file /var/lib/mysql/mysql.sock exists.
    Jun 24 11:55:45 network scl[23090]: Is another MySQL daemon already running with the same unix socket?
    Jun 24 11:55:45 network scl[23090]: Please, stop the process using the socket /var/lib/mysql/mysql.s...vice.
    Jun 24 11:55:45 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited,...tus=1
    Jun 24 11:55:45 network systemd[1]: Failed to start MariaDB 10.5 database server.
    Jun 24 11:55:45 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
    Jun 24 11:55:45 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
    Hint: Some lines were ellipsized, use -l to show in full.

I’d think it should be set to use a different socket file. @stephdl?

1 Like

what is the issue please @danb35

The rh-mariadb105-mariadb@nextcloud service is failing to start, because it sees an existing /var/lib/mysql/mysql.sock (which I assume is from the “normal” mysql for the system). This seems to be causing a variety of brokenness as described further up-topic.

log are at /var/log/rh-mariadb105/nextcloud.log

pid and socket are at /var/run/rh-mariadb105-mariadb/

It should not interfere with mysql

systemctl restart rh-mariadb105-mariadb@nextcloud.service

Then check in /var/log/rh-mariadb105/nextcloud.log what is wrong

Perhaps, but look at the status output:

    Jun 24 11:55:45 network scl[23090]: Socket file /var/lib/mysql/mysql.sock exists.
    Jun 24 11:55:45 network scl[23090]: Is another MySQL daemon already running with the same unix socket?
    Jun 24 11:55:45 network scl[23090]: Please, stop the process using the socket /var/lib/mysql/mysql.s...vice.
    Jun 24 11:55:45 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited,...tus=1
    Jun 24 11:55:45 network systemd[1]: Failed to start MariaDB 10.5 database server.
1 Like

we need the log output, maybe also to reconfigure the service by the event, I can read that the author of the thread has commented some script lines

cat: /var/log/rh-mariadb105/nextcloud.log: No such file or directory

Restart the service please

I can’t restart the service. It fails to start, and there is no log generated. That folder exists, it’s just empty.

Reinstall

nethserver-nextcloud
nethserver-rh-mariadb105

yum reinstall nethserver-nextcloud nethserver-rh-mariadb105

No change. Everything is the same.

Did you attempt to downgrade nextcloud at some point? (just to know, don’t try it now)

No. I have not downgraded Nextcloud ever. Also the reinstall caused the Cron and Backup issue to reappear.

what is the output on your server .

[root@prometheus ~]# /opt/rh/rh-mariadb105/root/bin/mysqlshow --socket="/var/run/rh-mariadb105-mariadb/nextcloud-mysql.sock" 
+--------------------+
|     Databases      |
+--------------------+
| information_schema |
| mysql              |
| nextcloud          |
| performance_schema |
+--------------------+
[root@prometheus ~]# /opt/rh/rh-mariadb105/root/bin/mysql --socket="/var/run/rh-mariadb105-mariadb/nextcloud-mysql.sock" 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 146
Server version: 10.5.8-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
1 Like

@stephdl
Nextcloud/mariadb upgrade worked fine on my test server.
the rh-mariadb105-mariadb-server package has some reference to the default mysql.sock (that comes from upstream and could be fine):

-DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \

The errors above might come from providing the wrong socket or no socket at all (thus default, but have not checked the code to be sure).

Relevant code checking the socket and throwing the error (mysql-check-socket):

    # some process uses the socket file
    response=`@bindir@/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER --connect-timeout="${CHECKSOCKETTIMEOUT:-10}" ping 2>&1`
    if [ $? -eq 0 ] || echo "$response" | grep -q "Access denied for user" ; then
        echo "Is another MySQL daemon already running with the same unix socket?" >&2
        echo "Please, stop the process using the socket $socketfile or remove the file manually to start the service." >&2
        exit 1
    fi
[13:01] [network rh-mariadb105] # /opt/rh/rh-mariadb105/root/bin/mysqlshow --socket="/var/run/rh-mariadb105-mariadb/nextcloud-mysql.sock"
/opt/rh/rh-mariadb105/root/bin/mysqlshow: Can't connect to local MySQL server through socket '/var/run/rh-mariadb105-mariadb/nextcloud-mysql.sock' (2)
[13:04] [network rh-mariadb105] # /opt/rh/rh-mariadb105/root/bin/mysql --socket="/var/run/rh-mariadb105-mariadb/nextcloud-mysql.sock"
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/rh-mariadb105-mariadb/nextcloud-mysql.sock' (2)
[13:04] [network rh-mariadb105] #
1 Like