awumii / EpicGuard

🛡 Bot protection system for Minecraft servers. | Outdated, use: https://github.com/4drian3d/EpicGuard
GNU General Public License v3.0
93 stars 22 forks source link

error with server start #140

Closed t4ba closed 2 years ago

t4ba commented 2 years ago

11:48:15 ERROR: [EpicGuard] An error occurred in EpicGuard! 11:48:15 ERROR: [EpicGuard] > Details: Could not save data to the SQL database (save-task) 11:48:15 ERROR: [EpicGuard] > Platform: git-Purpur-1427 (MC: 1.17.1) 11:48:15 ERROR: [EpicGuard] > Stacktrace:

java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. at me.xneox.epicguard.libs.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696) ~[EpicGuardPaper-7.1.1.jar:?] at me.xneox.epicguard.libs.hikari.pool.HikariPool.getConnection(HikariPool.java:181) ~[EpicGuardPaper-7.1.1.jar:?] at me.xneox.epicguard.libs.hikari.pool.HikariPool.getConnection(HikariPool.java:146) ~[EpicGuardPaper-7.1.1.jar:?] at me.xneox.epicguard.libs.hikari.HikariDataSource.getConnection(HikariDataSource.java:100) ~[EpicGuardPaper-7.1.1.jar:?] at me.xneox.epicguard.core.storage.Database.save(Database.java:75) ~[EpicGuardPaper-7.1.1.jar:?] at me.xneox.epicguard.core.task.DataSaveTask.run(DataSaveTask.java:30) ~[EpicGuardPaper-7.1.1.jar:?] at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.17.1.jar:git-Purpur-1427] at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[patched_1.17.1.jar:git-Purpur-1427] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.17.1.jar:git-Purpur-1427] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?]

Slddev commented 2 years ago

Can confirm. This is happening to me aswell.

awumii commented 2 years ago

I have fixed an issue with NullPointerException on startup, but the logs provided by @T4B999 point at an issue with connecting to the database (timeout after 30s), which i cannot reproduce on my local MariaDB database.

Slddev commented 2 years ago

I have fixed an issue with NullPointerException on startup, but the logs provided by @T4B999 point at an issue with connecting to the database (timeout after 30s), which i cannot reproduce on my local MariaDB database.

I have not set a database in my config, but it is still saying that error about the database.

t4ba commented 2 years ago

same here dude

awumii commented 2 years ago

I can't reproduce this issue on the latest build. Tried a clean install with the default config (SQLite) and with a MariaDB database, both start up without errors...

Slddev commented 2 years ago

I can't reproduce this issue on the latest build. Tried a clean install with the default config (SQLite) and with a MariaDB database, both start up without errors...

It didn't actually happen at startup for me, It happened at a random interval.

(Probably when it tries to automatically save data into the local database)

4drian3d commented 2 years ago

A similar error with the database happens to me after upgrading to version 7.1.1

23.11 09:03:09 [Server] ERROR Exception in task DataSaveTask[epicGuard=me.xneox.epicguard.core.EpicGuard@52786f03] by plugin EpicGuard
23.11 09:03:09 [Server] INFO java.lang.NullPointerException: Cannot invoke "me.xneox.epicguard.libs.hikari.HikariDataSource.getConnection()" because "this.source" is null
23.11 09:03:09 [Server] INFO at me.xneox.epicguard.core.storage.Database.save(Database.java:74) ~[?:?]
23.11 09:03:09 [Server] INFO at me.xneox.epicguard.core.task.DataSaveTask.run(DataSaveTask.java:30) ~[?:?]
23.11 09:03:09 [Server] INFO at com.velocitypowered.proxy.scheduler.VelocityScheduler$VelocityTask.lambda$run$1(VelocityScheduler.java:203) ~[velocity-3.0.2-12.jar:3.1.0-SNAPSHOT (git-111d14c3-b91)]
23.11 09:03:09 [Server] INFO at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135) ~[?:?]
23.11 09:03:09 [Server] INFO at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
23.11 09:03:09 [Server] INFO at java.lang.Thread.run(Thread.java:831) [?:?]
23.11 09:07:29 [Host] ---------@gmail.com ran command: guard
23.11 09:07:29 [Server] INFO You are running EpicGuard v7.1.1 on ProxyVersion{name='Velocity', vendor='Velocity Contributors', version='3.1.0-SNAPSHOT (git-111d14c3-b91)'}
awumii commented 2 years ago

Found the issue, should be fixed now in 7.1.2

t4ba commented 2 years ago

thank you, dude :)

Slddev commented 2 years ago

Close the issue @T4B999