LuckPerms

LuckPerms

41.4k Downloads

MySQL Problem

AleXutzZu opened this issue ยท 5 comments

commented

When I try connecting LuckPerms to MySQL database an error occurs, I've asked for support from my database provider and they said nothing is wrong and I should ask LuckPerms

[11:34:47 INFO]: [LuckPerms] Enabling LuckPerms v4.0.103
[11:34:47 INFO]:                __        __   ___  __         __
[11:34:47 INFO]:     |    |  | /  ` |__/ |__) |__  |__)  |\/| /__`
[11:34:47 INFO]:     |___ \__/ \__, |  \ |    |___ |  \  |  | .__/
[11:34:47 INFO]:
[11:34:47 INFO]:   Loading version v4.0.103 on Bukkit - CraftBukkit
[11:34:47 INFO]:   Running on server version git-TacoSpigot-"c98afce0" (MC: 1.8.8) - 1.8.8-R0.2-SNAPSHOT
[11:34:47 INFO]:
[11:34:47 INFO]: [LP] Loading configuration...
[11:34:48 INFO]: [LP] Identified the following dependencies: [MYSQL_DRIVER, HIKARI]
[11:34:48 INFO]: [LP] Loading storage provider... [MYSQL]
[11:34:48 INFO]: luckperms - Starting...
[11:34:48 INFO]: luckperms - Start completed.
[11:34:53 INFO]: [LuckPerms] [ERROR] Error occurred whilst initialising the database.
[11:34:53 WARN]: java.sql.SQLTransientConnectionException: luckperms - Connection is not available, request timed out after 5006ms.
[11:34:53 WARN]:        at me.lucko.luckperms.lib.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:666)
[11:34:53 WARN]:        at me.lucko.luckperms.lib.hikari.pool.HikariPool.getConnection(HikariPool.java:182)
[11:34:53 WARN]:        at me.lucko.luckperms.lib.hikari.pool.HikariPool.getConnection(HikariPool.java:147)
[11:34:53 WARN]:        at me.lucko.luckperms.lib.hikari.HikariDataSource.getConnection(HikariDataSource.java:85)
[11:34:53 WARN]:        at me.lucko.luckperms.common.storage.dao.sql.connection.hikari.HikariConnectionFactory.getConnection(HikariConnectionFactory.java:141)
[11:34:53 WARN]:        at me.lucko.luckperms.common.storage.dao.sql.SqlDao.tableExists(SqlDao.java:146)
[11:34:53 WARN]:        at me.lucko.luckperms.common.storage.dao.sql.SqlDao.init(SqlDao.java:164)
[11:34:53 WARN]:        at me.lucko.luckperms.common.storage.AbstractStorage.init(AbstractStorage.java:119)
[11:34:53 WARN]:        at me.lucko.luckperms.common.storage.wrappings.PhasedStorage.init(PhasedStorage.java:82)
[11:34:53 WARN]:        at me.lucko.luckperms.common.storage.wrappings.BufferedOutputStorage.init(BufferedOutputStorage.java:196)
[11:34:53 WARN]:        at me.lucko.luckperms.common.storage.StorageFactory.getInstance(StorageFactory.java:114)
[11:34:53 WARN]:        at me.lucko.luckperms.bukkit.LPBukkitPlugin.enable(LPBukkitPlugin.java:219)
[11:34:53 WARN]:        at me.lucko.luckperms.bukkit.LPBukkitPlugin.onEnable(LPBukkitPlugin.java:178)
[11:34:53 WARN]:        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321)
[11:34:53 WARN]:        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332)
[11:34:53 WARN]:        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404)
[11:34:53 WARN]:        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:359)
[11:34:53 WARN]:        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:318)
[11:34:53 WARN]:        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:203)
[11:34:53 WARN]:        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563)
[11:34:53 WARN]:        at java.lang.Thread.run(Thread.java:748)
[11:34:53 INFO]: [LP] Loading messaging service... [BUNGEE]
[11:34:54 INFO]: [LP] Loading internal permission managers...
[11:34:54 INFO]: [LP] Performing initial data load...
commented

The driver is unable to establish a connection with your MySQL server. It has nothing to do with LuckPerms. Your provider is either mistaken or lying to you.

There are some things you can try here:

https://github.com/lucko/LuckPerms/wiki/FAQ#luckperms-cannot-connect-to-my-mysql-server

commented

@AleXutzZu This line shows what the actual issue is;
[11:34:53 WARN]: java.sql.SQLTransientConnectionException: luckperms - Connection is not available, request timed out after 5006ms.

That states that it could not connect with the given details (in LP config), and it kept on trying for 5006ms (5.006 seconds)

For it to try for 5 seconds I'd say your provider is screwing around with you or you need to check the db details.

If the latter is correct then your provider needs stop bullshitting you.

commented

@spannerman79 That's caused because in my luckperms settings the connection-timeout: is set to
5000 # 5 seconds which is the default

commented

Right, but that's still a full 5 seconds that it hasn't been able to establish a connection in. (it should take a split second to establish)

commented

That's caused because in my luckperms settings the connection-timeout: is set to
5000 # 5 seconds which is the default

When I did have my MySQL server located elsewhere there was ~190ms ping from the mc servers to the location where I had the MySQL server setup and running.

So even if you were/are doing the same and using what I use to do lets work it out;

On average it was a 190 - 230ms ping overhead.
Processing time lets say 50ms
Server overload (mc server) give it another 50ms (server running at 10 TPS - shouldn't ever get to that stage but lets do worse case)

So total time is 290 - 330ms. Well within the 5000 ms time out set by default.

When logging my MySQL connections performing auth checks MySQL does them in fractions of a second. < 0.5ms easily.