LuckPerms

LuckPerms

41.4k Downloads

MYSQL Connection

Xalinova opened this issue ยท 2 comments

commented

Description

Hello!

I've followed instructions with setting up a MYSQL on my 2 servers and my proxy bungee.

This is the message on my Hub server with /lp info

17.03 00:56:53 [Multicraft] Xalinova ran command: lp info
17.03 00:56:58 [Server] luckperms-command-executor/WARN luckperms-hikari - Failed to validate connection me.lucko.luckperms.lib.mysql.cj.jdbc.ConnectionImpl@4b189af7 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] Running LuckPerms v5.4.40 by Luck.
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] - Platform: Bukkit
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] - Server Brand: CraftBukkit
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] - Server Version:
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] 3673-Spigot-41150f3-703575f (MC: 1.19.4) - 1.19.4-R0.1-SNAPSHOT
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] - Storage:
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] Type: MySQL
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] Connected: false
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] - Extensions:
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] None
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] - Messaging: PluginMessage
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] - Instance:
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] Static contexts: (server=hub)
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] Online Players: 1 (1 unique)
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] Uptime: 28m 14s
17.03 00:56:58 [Server] luckperms-command-executor/INFO [LP] Local Data: 1 users, 14 groups, 0 tracks

This is the message on my Survival server:

17.03 00:58:59 [Multicraft] Xalinova ran command: lp info
17.03 00:58:59 [Server] INFO [LP] Running LuckPerms v5.4.40 by Luck.
17.03 00:58:59 [Server] INFO [LP] - Platform: Bukkit
17.03 00:58:59 [Server] INFO [LP] - Server Brand: Paper
17.03 00:58:59 [Server] INFO [LP] - Server Version:
17.03 00:58:59 [Server] INFO [LP] git-Paper-450 (MC: 1.19.4) - 1.19.4-R0.1-SNAPSHOT
17.03 00:58:59 [Server] INFO [LP] - Storage:
17.03 00:58:59 [Server] INFO [LP] Type: MySQL
17.03 00:58:59 [Server] INFO [LP] Ping: 394ms
17.03 00:58:59 [Server] INFO [LP] Connected: true
17.03 00:58:59 [Server] INFO [LP] - Extensions:
17.03 00:58:59 [Server] INFO [LP] None
17.03 00:58:59 [Server] INFO [LP] - Messaging: PluginMessage
17.03 00:58:59 [Server] INFO [LP] - Instance:
17.03 00:58:59 [Server] INFO [LP] Static contexts: (server=vanilla)
17.03 00:58:59 [Server] INFO [LP] Online Players: 0 (0 unique)
17.03 00:58:59 [Server] INFO [LP] Uptime: 30m 43s
17.03 00:58:59 [Server] INFO [LP] Local Data: 0 users, 14 groups, 0 tracks

My Hub server is Spigot, and my Survival server is Paper. I hope this isn't an issue or should I make Hub Paper as well? Please someone help!

Reproduction Steps

Find a solution

Expected Behaviour

Find a solution

Server Details

Spigot_1.19.4

LuckPerms Version

v5.4.40

Logs and Configs

No response

Extra Details

No response

commented

I am getting the same or very similar issue. I believe ours is due to the database closing the connection and LuckPerms not realizing or being informed. I think the errors are related in ConnectionImpl so I decided to post it here instead of making a new issue.

[04:29:03 WARN]: [me.lucko.luckperms.lib.hikari.pool.PoolBase] luckperms-hikari - Failed to validate connection me.lucko.luckperms.lib.mysql.cj.jdbc.ConnectionImpl@a0be5bf (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
[04:29:03 WARN]: java.sql.SQLTransientConnectionException: luckperms-hikari - Connection is not available, request timed out after 5081ms.
[04:29:03 WARN]: at me.lucko.luckperms.lib.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696)
[04:29:03 WARN]: at me.lucko.luckperms.lib.hikari.pool.HikariPool.getConnection(HikariPool.java:197)
[04:29:03 WARN]: at me.lucko.luckperms.lib.hikari.pool.HikariPool.getConnection(HikariPool.java:162)
[04:29:03 WARN]: at me.lucko.luckperms.lib.hikari.HikariDataSource.getConnection(HikariDataSource.java:100)
[04:29:03 WARN]: at me.lucko.luckperms.common.storage.implementation.sql.connection.hikari.HikariConnectionFactory.getConnection(HikariConnectionFactory.java:174)
[04:29:03 WARN]: at me.lucko.luckperms.common.messaging.sql.SqlMessenger.getConnection(SqlMessenger.java:85)
[04:29:03 WARN]: at me.lucko.luckperms.common.messaging.sql.AbstractSqlMessenger.pollMessages(AbstractSqlMessenger.java:115)
[04:29:03 WARN]: at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
[04:29:03 WARN]: at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
[04:29:03 WARN]: at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
[04:29:03 WARN]: at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
[04:29:03 WARN]: at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
[04:29:03 WARN]: at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

[04:29:03 WARN]: Caused by: java.sql.SQLNonTransientConnectionException: No operations allowed after connection closed.
[04:29:03 WARN]: at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
[04:29:03 WARN]: at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
[04:29:03 WARN]: at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
[04:29:03 WARN]: at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
[04:29:03 WARN]: at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
[04:29:03 WARN]: at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:73)
[04:29:03 WARN]: at me.lucko.luckperms.lib.mysql.cj.jdbc.ConnectionImpl.setNetworkTimeout(ConnectionImpl.java:2495)
[04:29:03 WARN]: at me.lucko.luckperms.lib.hikari.pool.PoolBase.setNetworkTimeout(PoolBase.java:566)
[04:29:03 WARN]: at me.lucko.luckperms.lib.hikari.pool.PoolBase.isConnectionAlive(PoolBase.java:173)
[04:29:03 WARN]: at me.lucko.luckperms.lib.hikari.pool.HikariPool.getConnection(HikariPool.java:186)
[04:29:03 WARN]: ... 11 more

[04:29:03 WARN]: Caused by: me.lucko.luckperms.lib.mysql.cj.exceptions.ConnectionIsClosedException: No operations allowed after connection closed.
[04:29:03 WARN]: at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[04:29:03 WARN]: at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
[04:29:03 WARN]: at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[04:29:03 WARN]: at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
[04:29:03 WARN]: at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
[04:29:03 WARN]: at me.lucko.luckperms.lib.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
[04:29:03 WARN]: at me.lucko.luckperms.lib.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
[04:29:03 WARN]: at me.lucko.luckperms.lib.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
[04:29:03 WARN]: at me.lucko.luckperms.lib.mysql.cj.NativeSession.checkClosed(NativeSession.java:1171)
[04:29:03 WARN]: at me.lucko.luckperms.lib.mysql.cj.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:573)
[04:29:03 WARN]: at me.lucko.luckperms.lib.mysql.cj.jdbc.ConnectionImpl.setNetworkTimeout(ConnectionImpl.java:2491)
[04:29:03 WARN]: ... 14 more

commented

See this wiki page explaining how to solve this problem.