Failed to validate connection ,Communications link failure
vlian5 opened this issue ยท 3 comments
[14:39:26 INFO]: [LP] Running LuckPerms v5.0.78 by Luck.
[14:39:26 INFO]: [LP] - Platform: Bukkit
[14:39:26 INFO]: [LP] - Server Brand: Paper
[14:39:26 INFO]: [LP] - Server Version:
[14:39:26 INFO]: [LP] - git-Paper-112 (MC: 1.15.2) - 1.15.2-R0.1-SNAPSHOT
[14:39:26 INFO]: [LP] - Storage:
[14:39:26 INFO]: [LP] - Type: MySQL
[14:39:26 INFO]: [LP] - Ping: 92ms
[14:39:26 INFO]: [LP] - Connected: true
[14:39:26 INFO]: [LP] - Messaging: Sql
[14:39:26 INFO]: [LP] - Instance:
[14:39:26 INFO]: [LP] - Static contexts: server=mcssvip
[14:39:26 INFO]: [LP] - Online Players: 0 (0 unique)
[14:39:26 INFO]: [LP] - Uptime: 5m 29s
[14:39:26 INFO]: [LP] - Local Data: 0 users, 1 groups, 0 tracks
maximum-lifetime= 180000
wait_timeout=1814400
Separate mysql database
[14:33:56 INFO]: [LuckPerms] Enabling LuckPerms v5.0.78
[14:33:56 INFO]: __
[14:33:56 INFO]: | |__) LuckPerms v5.0.78
[14:33:56 INFO]: |___ | Running on Bukkit - Paper
[14:33:56 INFO]:
[14:33:56 INFO]: [LuckPerms] Loading configuration...
[14:33:57 INFO]: [LuckPerms] Loading storage provider... [MYSQL]
[14:33:57 WARN]: [me.lucko.luckperms.lib.hikari.HikariConfig] luckperms-hikari - idleTimeout is close to or more than maxLifetime, disabling it.
[14:33:57 INFO]: [me.lucko.luckperms.lib.hikari.HikariDataSource] luckperms-hikari - Starting...
[14:33:57 INFO]: [me.lucko.luckperms.lib.hikari.HikariDataSource] luckperms-hikari - Start completed.
[14:34:04 INFO]: [LuckPerms] Loading messaging service... [SQL]
[14:34:06 INFO]: [LuckPerms] Loading internal permission managers...
[14:34:06 INFO]: [LuckPerms] Performing initial data load...
[14:34:08 INFO]: [LuckPerms] Successfully enabled. (took 11817ms)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: [me.lucko.luckperms.lib.hikari.pool.PoolBase] luckperms-hikari - Failed to validate connection me.lucko.luckperms.lib.mysql.jdbc.JDBC4Connection@b2ed74e (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
[13:55:40] [luckperms-scheduler-worker-6/WARN]: java.sql.SQLTransientConnectionException: luckperms-hikari - Connection is not available, request timed out after 5017ms.
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:697)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.hikari.pool.HikariPool.getConnection(HikariPool.java:196)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.hikari.pool.HikariPool.getConnection(HikariPool.java:161)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.hikari.HikariDataSource.getConnection(HikariDataSource.java:100)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.common.storage.implementation.sql.connection.hikari.HikariConnectionFactory.getConnection(HikariConnectionFactory.java:131)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.common.messaging.sql.SqlMessenger.getConnection(SqlMessenger.java:85)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.common.messaging.sql.AbstractSqlMessenger.pollMessages(AbstractSqlMessenger.java:96)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.common.plugin.scheduler.AbstractJavaScheduler$ErrorReportingRunnable.run(AbstractJavaScheduler.java:118)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at java.lang.Thread.run(Unknown Source)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: Caused by: me.lucko.luckperms.lib.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at java.lang.reflect.Constructor.newInstance(Unknown Source)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.mysql.jdbc.Util.handleNewInstance(Util.java:425)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.mysql.jdbc.Util.getInstance(Util.java:408)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1182)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1177)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.mysql.jdbc.ConnectionImpl.setNetworkTimeout(ConnectionImpl.java:5464)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.hikari.pool.PoolBase.setNetworkTimeout(PoolBase.java:552)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.hikari.pool.PoolBase.isConnectionAlive(PoolBase.java:168)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: at me.lucko.luckperms.lib.hikari.pool.HikariPool.getConnection(HikariPool.java:185)
[13:55:40] [luckperms-scheduler-worker-6/WARN]: ... 9 more
[13:56:29] [luckperms-scheduler-worker-3/WARN]: [me.lucko.luckperms.lib.hikari.pool.ProxyConnection] luckperms-hikari - Connection me.lucko.luckperms.lib.mysql.jdbc.JDBC4Connection@3ce53f45 marked as broken because of SQLSTATE(08S01), ErrorCode(0)
me.lucko.luckperms.lib.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 114 milliseconds ago. The last packet sent successfully to the server was 114 milliseconds ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_241]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_241]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_241]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_241]
at me.lucko.luckperms.lib.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[?:?]
at me.lucko.luckperms.lib.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990) ~[?:?]
at me.lucko.luckperms.lib.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3517) ~[?:?]
at me.lucko.luckperms.lib.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3417) ~[?:?]
at me.lucko.luckperms.lib.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3860) ~[?:?]
at me.lucko.luckperms.lib.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524) ~[?:?]
at me.lucko.luckperms.lib.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1281) ~[?:?]
at me.lucko.luckperms.lib.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:787) ~[?:?]
at me.lucko.luckperms.lib.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2020) ~[?:?]
at me.lucko.luckperms.lib.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52) ~[?:?]
at me.lucko.luckperms.lib.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java) ~[?:?]
at me.lucko.luckperms.common.messaging.sql.AbstractSqlMessenger.pollMessages(AbstractSqlMessenger.java:99) ~[?:?]
at me.lucko.luckperms.common.plugin.scheduler.AbstractJavaScheduler$ErrorReportingRunnable.run(AbstractJavaScheduler.java:118) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_241]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_241]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
Caused by: java.net.SocketException: Network is unreachable: recv failed
at java.net.SocketInputStream.socketRead0(Native Method) ~[?:1.8.0_241]
at java.net.SocketInputStream.socketRead(Unknown Source) ~[?:1.8.0_241]
at java.net.SocketInputStream.read(Unknown Source) ~[?:1.8.0_241]
at java.net.SocketInputStream.read(Unknown Source) ~[?:1.8.0_241]
at me.lucko.luckperms.lib.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:101) ~[?:?]
at me.lucko.luckperms.lib.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:144) ~[?:?]
at me.lucko.luckperms.lib.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:174) ~[?:?]
at me.lucko.luckperms.lib.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2966) ~[?:?]
at me.lucko.luckperms.lib.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3427) ~[?:?]
... 13 more
[13:56:29] [luckperms-scheduler-worker-3/WARN]: me.lucko.luckperms.lib.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
From the logs above I extracted two Important messages.
No operations allowed after connection closed.
Connection@3ce53f45 marked as broken because of SQLSTATE(08S01)
It seems that either you set the database connection timeout value too low or the connection reaches the max limit that your database allows. Which results in a connection forced closed.
Check you DB with following SQL
SHOW VARIABLES LIKE '%timeout%';
SHOW VARIABLES LIKE '%max_connections%';
SHOW STATUS LIKE '%connection%';
Secondly, wrong configuration of firewall may also break your DB connection.
At last, a little suggestion.
DON'T ask question without providing config file of your plugin when you are not certain what happened to your server.
USE gist or other pastebin service. It wont take you much time.