diamond-rip / Eden

The best free 1.8 1v1 practice plugin - Offers tons of premium features!
GNU General Public License v3.0
112 stars 35 forks source link

Troubles with getting MongoDB to work #422

Closed notkirb closed 1 year ago

notkirb commented 1 year ago

I set up a MongoDB server on my host. I am using Pterodactyl Panel on the host to run the Minecraft servers. I am not familiar with MongoDB, so help is much appreciated. Thanks!

Here is my current Mongo part of the config.yml:

mongo:
  ## This option should be ALWAYS true. Unless you want to test specific stuff without modifying the database
  ## If it is disabled, player stats will not be loaded and saved
  enabled: true
  uri-mode: false
  normal:
    host: 172.17.0.1
    port: 27017
    auth:
      enabled: false
      username: ''
      password: ''
  uri:
    database: Practice
    connection-string: mongodb://127.0.0.1:27017/Eden

When I join the server I get stuck at this screen for a while then console throws an error image

org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[patched_1.8.8.jar:git-PaperSpigot-445]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) [patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.PlayerList.onPlayerJoin(PlayerList.java:314) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.PlayerList.a(PlayerList.java:173) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.LoginListener.b(LoginListener.java:144) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.LoginListener.c(LoginListener.java:54) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.NetworkManager.a(NetworkManager.java:231) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.ServerConnection.c(ServerConnection.java:148) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:875) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616) [patched_1.8.8.jar:git-PaperSpigot-445]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
Caused by: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=172.17.0.1:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]
        at com.mongodb.internal.connection.BaseCluster.getDescription(BaseCluster.java:184) ~[?:?]
        at com.mongodb.internal.connection.SingleServerCluster.getDescription(SingleServerCluster.java:46) ~[?:?]
        at com.mongodb.client.internal.MongoClientDelegate.getConnectedClusterDescription(MongoClientDelegate.java:143) ~[?:?]
        at com.mongodb.client.internal.MongoClientDelegate.createClientSession(MongoClientDelegate.java:100) ~[?:?]
        at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.getClientSession(MongoClientDelegate.java:285) ~[?:?]
        at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:177) ~[?:?]
        at com.mongodb.client.internal.FindIterableImpl.first(FindIterableImpl.java:213) ~[?:?]
        at rip.diamond.practice.profile.PlayerProfile.load(PlayerProfile.java:192) ~[?:?]
        at rip.diamond.practice.profile.listener.ProfileListener.onJoin(ProfileListener.java:56) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_312]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_312]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_312]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_312]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:300) ~[patched_1.8.8.jar:git-PaperSpigot-445]
        ... 15 more
serumanooo commented 1 year ago

I set up a MongoDB server on my host. I am using Pterodactyl Panel on the host to run the Minecraft servers. I am not familiar with MongoDB, so help is much appreciated. Thanks!

Here is my current Mongo part of the config.yml:

mongo:
  ## This option should be ALWAYS true. Unless you want to test specific stuff without modifying the database
  ## If it is disabled, player stats will not be loaded and saved
  enabled: true
  uri-mode: false
  normal:
    host: 172.17.0.1
    port: 27017
    auth:
      enabled: false
      username: ''
      password: ''
  uri:
    database: Practice
    connection-string: mongodb://127.0.0.1:27017/Eden

When I join the server I get stuck at this screen for a while then console throws an error image

org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[patched_1.8.8.jar:git-PaperSpigot-445]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) [patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.PlayerList.onPlayerJoin(PlayerList.java:314) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.PlayerList.a(PlayerList.java:173) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.LoginListener.b(LoginListener.java:144) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.LoginListener.c(LoginListener.java:54) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.NetworkManager.a(NetworkManager.java:231) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.ServerConnection.c(ServerConnection.java:148) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:875) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616) [patched_1.8.8.jar:git-PaperSpigot-445]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
Caused by: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=172.17.0.1:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]
        at com.mongodb.internal.connection.BaseCluster.getDescription(BaseCluster.java:184) ~[?:?]
        at com.mongodb.internal.connection.SingleServerCluster.getDescription(SingleServerCluster.java:46) ~[?:?]
        at com.mongodb.client.internal.MongoClientDelegate.getConnectedClusterDescription(MongoClientDelegate.java:143) ~[?:?]
        at com.mongodb.client.internal.MongoClientDelegate.createClientSession(MongoClientDelegate.java:100) ~[?:?]
        at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.getClientSession(MongoClientDelegate.java:285) ~[?:?]
        at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:177) ~[?:?]
        at com.mongodb.client.internal.FindIterableImpl.first(FindIterableImpl.java:213) ~[?:?]
        at rip.diamond.practice.profile.PlayerProfile.load(PlayerProfile.java:192) ~[?:?]
        at rip.diamond.practice.profile.listener.ProfileListener.onJoin(ProfileListener.java:56) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_312]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_312]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_312]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_312]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:300) ~[patched_1.8.8.jar:git-PaperSpigot-445]
        ... 15 more

i think youre using a local mongodb database, create a free one at the official website of mongodb, dont use a local one

notkirb commented 1 year ago

i made a database on the official website and added it through uri mode in the config but now im getting a new erroe:

[02:55:48 INFO]: [Eden] Enabling Eden v1.1.21-BETA-f01a288
[02:55:48 WARN]: SLF4J not found on the classpath.  Logging is disabled for the 'org.mongodb.driver' component
[02:55:48 ERROR]: Error occurred while enabling Eden v1.1.21-BETA-f01a288 (Is it up to date?)
java.lang.NullPointerException: null
        at rip.diamond.practice.util.cuboid.Cuboid.<init>(Cuboid.java:37) ~[?:?]
        at rip.diamond.practice.arenas.ArenaDetail.copyChunk(ArenaDetail.java:54) ~[?:?]
        at rip.diamond.practice.arenas.Arena.lambda$init$6(Arena.java:194) ~[?:?]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_312]
        at rip.diamond.practice.arenas.Arena.lambda$init$7(Arena.java:186) ~[?:?]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_312]
        at rip.diamond.practice.arenas.Arena.init(Arena.java:165) ~[?:?]
        at rip.diamond.practice.Eden.loadGeneral(Eden.java:227) ~[?:?]
        at rip.diamond.practice.Eden.onEnable(Eden.java:113) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:359) [patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:318) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:408) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:372) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:327) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:267) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [patched_1.8.8.jar:git-PaperSpigot-445]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
[02:55:48 INFO]: [Eden] Disabling Eden v1.1.21-BETA-f01a288
notkirb commented 1 year ago

i did something and now its doing the same thing as before

Chromaah commented 1 year ago

i have no problems so i dont think this is an eden issue, probably some misconfiguration on your side.

notkirb commented 1 year ago

heres the mongo part of my config again, i did censor some things on here for security purposes


mongo:
  ## This option should be ALWAYS true. Unless you want to test specific stuff without modifying the database
  ## If it is disabled, player stats will not be loaded and saved
  enabled: true
  uri-mode: true
  normal:
    host: 172.16.0.1
    port: 27017
    auth:
      enabled: false
      username: ''
      password: ''
  uri:
    database: Practice
    connection-string: mongodb+srv://<username>:<password>@<subdomain>.mongodb.net/
serumanooo commented 1 year ago

Try enabling auth and put your username and password of your database access

Zatrex12345 commented 1 year ago

if this not working dm me on discord my discord name : 7modyxd

Zatrex12345 commented 1 year ago

i will give you mongodb

serumanooo commented 1 year ago

Try enabling auth and put your username and password of your database access

also, do this: image image add your server ip address here

GoodestEnglish commented 1 year ago

The first error in your console means your mongodb config is wrong. Maybe wrong username/password? Local mongodb works, I've tested it personally.

i made a database on the official website and added it through uri mode in the config but now im getting a new erroe:

[02:55:48 INFO]: [Eden] Enabling Eden v1.1.21-BETA-f01a288
[02:55:48 WARN]: SLF4J not found on the classpath.  Logging is disabled for the 'org.mongodb.driver' component
[02:55:48 ERROR]: Error occurred while enabling Eden v1.1.21-BETA-f01a288 (Is it up to date?)
java.lang.NullPointerException: null
        at rip.diamond.practice.util.cuboid.Cuboid.<init>(Cuboid.java:37) ~[?:?]
        at rip.diamond.practice.arenas.ArenaDetail.copyChunk(ArenaDetail.java:54) ~[?:?]
        at rip.diamond.practice.arenas.Arena.lambda$init$6(Arena.java:194) ~[?:?]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_312]
        at rip.diamond.practice.arenas.Arena.lambda$init$7(Arena.java:186) ~[?:?]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_312]
        at rip.diamond.practice.arenas.Arena.init(Arena.java:165) ~[?:?]
        at rip.diamond.practice.Eden.loadGeneral(Eden.java:227) ~[?:?]
        at rip.diamond.practice.Eden.onEnable(Eden.java:113) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:359) [patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:318) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:408) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:372) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:327) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:267) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [patched_1.8.8.jar:git-PaperSpigot-445]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
[02:55:48 INFO]: [Eden] Disabling Eden v1.1.21-BETA-f01a288

This one means you have a misconfigurated arena. Maybe you didn't fully finish setup your arena but you saved it after?

notkirb commented 1 year ago

Thank you so much for all the advice, I'm currently not home for a few days but I will try these when I get back home. Again, thanks!