Menu

#5632 MariaDB plugin reports error when stopping MariaDB server

2.021
open
nobody
None
5
2023-08-15
2023-08-14
Hans Wurst
No

Hi,

pressing the "Stop MariaDB server" leads to an error message.

MariaDB is not running on your system - database list could not be retrieved.
MariaDB error message
The full MariaDB error message was : DBI connect failed : Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

From the command line I see that the MariaDB server is stopped successfully.

systemctl status mariadb
  Main PID: 64766 (code=exited, status=0/SUCCESS)
     Status: "MariaDB server is down"

Further I wonder about the error message about the missing file:

sudo systemctl start mariadb
ls /run/mysqld/
mysqld.pid  mysqld.sock
ls /var/run/mysqld/
mysqld.pid  mysqld.sock
sudo systemctl stop mariadb
ls /run/mysqld/
/var/run/mysqld/

From my point of view mariaDB has the correct behaviour. The file exists when the server is running and is gone when the server is stopped?

Can you confirm that this is a bug?

Cheers,
Hans

Discussion

  • Jamie Cameron

    Jamie Cameron - 2023-08-14

    The file isn't necessarily missing, it's just that the MariaDB server can't be connected to via it if it's not running.

    Can you restart MariaDB using Webmin?

     
  • Hans Wurst

    Hans Wurst - 2023-08-15

    From the behaviour everything is fine. By pressing the Stop button MariaDB is stopped, by pressing the Start button MariaDB is started. The correct frames are shown to me.

    I assume now that this message means: "MariaDB is not running on your system - database list could not be retrieved. " Everthing worked fine.

    This I wonder where it comes from: "MariaDB error message
    The full MariaDB error message was : DBI connect failed : Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)"

    But it reflects my understanding that a not running service won't have a sock file.

    Maybe the user communication should be reconsidered. To keep it simple:
    Gracefully shutdown MariaDB Database Server - would be enough for me and I got a feedback that the server is down.

    Cheers,
    Hans

     
  • Jamie Cameron

    Jamie Cameron - 2023-08-15

    Yeah the error messages comes from the database libraries that connect to MariaDB. The reason we show the full error is because in some cases the issue might be that Webmin is trying to connect to MariaDB using the wrong socket or port, even though it's actually up and running.

     

Log in to post a comment.