[SOLVED] Backup fails to dump rh-mariadb105 database

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
[root@prometheus ~]# systemctl | grep mariadb
  rh-mariadb105-mariadb@nextcloud.service                                                     loaded active running   MariaDB 10.5 database server
  system-rh\x2dmariadb105\x2dmariadb.slice                                                    loaded active active    system-rh\x2dmariadb105\x2dmariadb.slice
[root@prometheus ~]# systemctl | grep rh-
  rh-mariadb105-mariadb@nextcloud.service                                                     loaded active running   MariaDB 10.5 database server
  rh-php72-php-fpm.service                                                                    loaded active running   The PHP FastCGI Process Manager
  rh-php73-php-fpm.service                                                                    loaded active running   The PHP FastCGI Process Manager
[root@prometheus ~]# systemctl | grep mysql
  mysqld.service

This is what my instance of those commands shows:

[13:08] [network rh-mariadb105] #  systemctl | grep mariadb
● rh-mariadb105-mariadb@nextcloud.service                                                             loaded failed failed    MariaDB 10.5 database server
  system-rh\x2dmariadb105\x2dmariadb.slice                                                            loaded active active    system-rh\x2dmariadb105\x2dmariadb.slice
[13:08] [network rh-mariadb105] # systemctl | grep rh-
● rh-mariadb105-mariadb@nextcloud.service                                                             loaded failed failed    MariaDB 10.5 database server
  rh-php72-php-fpm.service                                                                            loaded active running   The PHP FastCGI Process Manager
  rh-php73-php-fpm.service                                                                            loaded active running   The PHP FastCGI Process Manager
[13:09] [network rh-mariadb105] #   rh-mariadb105-mariadb@nextcloud.service
-bash: rh-mariadb105-mariadb@nextcloud.service: command not found
[13:09] [network rh-mariadb105] # systemctl | grep mysql
  mysqld.service                                                                                      loaded active running   MariaDB database server
[13:09] [network rh-mariadb105] #

systemctl daemon-reload
systemctl restart rh-mariadb105-mariadb@nextcloud.service
journalctl -u rh-mariadb105-mariadb@nextcloud.service

[13:14] [network rh-mariadb105] # systemctl daemon-reload
[13:14] [network rh-mariadb105] # systemctl restart rh-mariadb105-mariadb@nextcloud.service
Job for rh-mariadb105-mariadb@nextcloud.service failed because the control process exited with error code. See "systemctl status rh-mariadb105-mariadb@nextcloud.service" and "journalctl -xe" for details.
[13:14] [network rh-mariadb105] # journalctl -u rh-mariadb105-mariadb@nextcloud.service
-- Logs begin at Wed 2021-06-23 13:35:57 EDT, end at Thu 2021-06-24 13:14:43 EDT. --
Jun 23 23:12:50 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 23 23:12:50 network scl[42047]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 23 23:12:50 network scl[42047]: Is another MySQL daemon already running with the same unix socket?
Jun 23 23:12:50 network scl[42047]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or r
Jun 23 23:12:50 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 23 23:12:50 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 23 23:12:50 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 23 23:12:50 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
Jun 23 23:13:26 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 23 23:13:26 network scl[42856]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 23 23:13:26 network scl[42856]: Is another MySQL daemon already running with the same unix socket?
Jun 23 23:13:26 network scl[42856]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or r
Jun 23 23:13:26 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 23 23:13:26 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 23 23:13:26 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 23 23:13:26 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
Jun 23 23:14:56 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 23 23:14:56 network scl[16461]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 23 23:14:56 network scl[16461]: Is another MySQL daemon already running with the same unix socket?
Jun 23 23:14:56 network scl[16461]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or r
Jun 23 23:14:56 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 23 23:14:56 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 23 23:14:56 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 23 23:14:56 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
Jun 24 00:06:09 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 24 00:06:09 network scl[9005]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 24 00:06:09 network scl[9005]: Is another MySQL daemon already running with the same unix socket?
Jun 24 00:06:09 network scl[9005]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or re
Jun 24 00:06:09 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 24 00:06:09 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 24 00:06:09 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 24 00:06:09 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
Jun 24 00:06:21 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 24 00:06:21 network scl[9329]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 24 00:06:21 network scl[9329]: Is another MySQL daemon already running with the same unix socket?
Jun 24 00:06:21 network scl[9329]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or re
Jun 24 00:06:21 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 24 00:06:21 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 24 00:06:21 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 24 00:06:21 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
Jun 24 00:09:15 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 24 00:09:16 network scl[14363]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 24 00:09:16 network scl[14363]: Is another MySQL daemon already running with the same unix socket?
Jun 24 00:09:16 network scl[14363]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or r
Jun 24 00:09:16 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 24 00:09:16 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 24 00:09:16 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 24 00:09:16 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
Jun 24 00:10:05 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 24 00:10:05 network scl[36027]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 24 00:10:05 network scl[36027]: Is another MySQL daemon already running with the same unix socket?
Jun 24 00:10:05 network scl[36027]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or r
Jun 24 00:10:05 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 24 00:10:05 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 24 00:10:05 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 24 00:10:05 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
Jun 24 00:14:47 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 24 00:14:47 network scl[43156]: Initializing MariaDB database
Jun 24 00:14:50 network scl[43156]: Two all-privilege accounts were created.
Jun 24 00:14:50 network scl[43156]: One is root@localhost, it has no password, but you need to
Jun 24 00:14:50 network scl[43156]: be system 'root' user to connect. Use, for example, sudo mysql
Jun 24 00:14:50 network scl[43156]: The second is mysql@localhost, it has no password either, but
Jun 24 00:14:50 network scl[43156]: you need to be the system 'mysql' user to connect.
Jun 24 00:14:50 network scl[43156]: After connecting you can set the password, if you would need to be
Jun 24 00:14:50 network scl[43156]: able to connect as any of these users with a password and without sudo
Jun 24 00:14:50 network scl[43156]: See the MariaDB Knowledgebase at https://mariadb.com/kb or the
Jun 24 00:14:50 network scl[43156]: MySQL manual for more instructions.
Jun 24 00:14:50 network scl[43156]: Please report any problems at https://mariadb.org/jira
Jun 24 00:14:50 network scl[43156]: The latest information about MariaDB is available at https://mariadb.org
Jun 24 00:14:50 network scl[43156]: You can find additional information about the MySQL part at:
Jun 24 00:14:50 network scl[43156]: https://dev.mysql.com
Jun 24 00:14:50 network scl[43156]: Consider joining MariaDB's strong and vibrant community:
Jun 24 00:14:50 network scl[43156]: https://mariadb.org/get-involved/
Jun 24 00:14:50 network mysqld-scl-helper[43412]: 2021-06-24  0:14:50 0 [Note] /opt/rh/rh-mariadb105/root/us
Jun 24 00:14:50 network systemd[1]: Started MariaDB 10.5 database server.
Jun 24 00:15:20 network systemd[1]: Stopping MariaDB 10.5 database server...
Jun 24 00:15:21 network systemd[1]: Stopped MariaDB 10.5 database server.
Jun 24 00:17:07 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 24 00:17:07 network scl[20100]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 24 00:17:07 network scl[20100]: Is another MySQL daemon already running with the same unix socket?
Jun 24 00:17:07 network scl[20100]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or r
Jun 24 00:17:07 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 24 00:17:07 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 24 00:17:07 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 24 00:17:07 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
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.sock or r
Jun 24 11:55:45 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
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.
Jun 24 12:37:11 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 24 12:37:11 network scl[31556]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 24 12:37:11 network scl[31556]: Is another MySQL daemon already running with the same unix socket?
Jun 24 12:37:11 network scl[31556]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or r
Jun 24 12:37:11 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 24 12:37:11 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 24 12:37:11 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 24 12:37:11 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
Jun 24 12:37:15 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 24 12:37:16 network scl[31710]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 24 12:37:16 network scl[31710]: Is another MySQL daemon already running with the same unix socket?
Jun 24 12:37:16 network scl[31710]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or r
Jun 24 12:37:16 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 24 12:37:16 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 24 12:37:16 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 24 12:37:16 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
Jun 24 12:50:55 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 24 12:50:55 network scl[4372]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 24 12:50:55 network scl[4372]: Is another MySQL daemon already running with the same unix socket?
Jun 24 12:50:55 network scl[4372]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or re
Jun 24 12:50:55 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 24 12:50:55 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 24 12:50:55 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 24 12:50:55 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
Jun 24 12:51:00 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 24 12:51:00 network scl[6021]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 24 12:51:01 network scl[6021]: Is another MySQL daemon already running with the same unix socket?
Jun 24 12:51:01 network scl[6021]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or re
Jun 24 12:51:01 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 24 12:51:01 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 24 12:51:01 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 24 12:51:01 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
Jun 24 12:51:36 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 24 12:51:36 network scl[24877]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 24 12:51:36 network scl[24877]: Is another MySQL daemon already running with the same unix socket?
Jun 24 12:51:36 network scl[24877]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or r
Jun 24 12:51:36 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 24 12:51:36 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 24 12:51:36 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 24 12:51:36 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.
Jun 24 13:14:43 network systemd[1]: Starting MariaDB 10.5 database server...
Jun 24 13:14:43 network scl[9746]: Socket file /var/lib/mysql/mysql.sock exists.
Jun 24 13:14:43 network scl[9746]: Is another MySQL daemon already running with the same unix socket?
Jun 24 13:14:43 network scl[9746]: Please, stop the process using the socket /var/lib/mysql/mysql.sock or re
Jun 24 13:14:43 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service: control process exited, code=ex
Jun 24 13:14:43 network systemd[1]: Failed to start MariaDB 10.5 database server.
Jun 24 13:14:43 network systemd[1]: Unit rh-mariadb105-mariadb@nextcloud.service entered failed state.
Jun 24 13:14:43 network systemd[1]: rh-mariadb105-mariadb@nextcloud.service failed.