Skip to content
Tickwise
ErrorDatabasesSIG-DB-001

Database unreachable (MySQL: Communications link failure / MariaDB: Socket fail to connect)

Platforms
Paper · Purpur · Velocity · single server
Verified
Verified
Confidence
Confidence 90%

What it looks like in the log

Any one of these lines is enough. The agent matches them locally, on your server.

logs/latest.log
  • [WARN] Communications link failure
  • The last packet successfully received from the server was
  • [WARN] Socket fail to connect to

Symptoms

  • A plugin cannot open a connection to MySQL/MariaDB: permissions, economy and bans fail to load
  • In the log: “Communications link failure … The driver has not received any packets from the server” or “Socket fail to connect to …”

Cause

The JDBC driver could not establish a TCP connection to the database server: the MySQL/MariaDB service is stopped, the host/port is wrong, or the network/firewall is blocking the connection.

Possible causes

  • The MySQL/MariaDB server is stopped, restarting or has crashed (Connection refused)
  • Wrong database host or port in the plugin config (a typo, localhost instead of the address of the database container/host)
  • A firewall, the database's bind-address or the hosting network does not allow connections from this server (connect timed out / No route to host)
  • The database hostname fails to resolve (UnknownHostException)

How to fixLow risk

  1. Look at the end of the message in the evidence: Connection refused — nothing is listening on that address; connect timed out / No route to host — network or firewall; UnknownHostException — DNS.
  2. Check that the database service is running (hosting panel, systemctl status mysql/mariadb, the database container).
  3. Compare the host and port in the plugin config (e.g. storage-method/data.address in plugins/LuckPerms/config.yml) with the actual database address; inside a container, localhost is the container itself, not the host.
  4. If the database is on another server, check the database's bind-address and the firewall rules for this Minecraft server's IP.
  5. The password never ends up in the evidence; do not publish the whole plugin config when asking for help.

Translated from the Russian original; log lines are quoted verbatim.

Sources