连接到MongoDB群集时出现问题[SSL错误]

时间:2018-11-02 19:11:57

标签: java mongodb asynchronous driver

我正在尝试通过Async 3.8.2驱动程序使用Java连接到我的MongoDB集群。

在本地主机上,除群集外,此方法均有效。

我的连接字符串是:“ mongodb + srv:// db:PASSWORD@database-focxd.mongodb.net/db?retryWrites = true”

我试图将&ssl=false放在最后,但这只会导致更多错误。

这是错误:

java.lang.UnsupportedOperationException: No SSL support in java.nio.channels.AsynchronousSocketChannel. For SSL support use com.mongodb.connection.netty.NettyStreamFactoryFactory
        at com.mongodb.connection.AsynchronousSocketChannelStreamFactory.<init>(AsynchronousSocketChannelStreamFactory.java:59) ~[?:?]
        at com.mongodb.connection.AsynchronousSocketChannelStreamFactory.<init>(AsynchronousSocketChannelStreamFactory.java:44) ~[?:?]
        at com.mongodb.async.client.MongoClients.getStreamFactory(MongoClients.java:226) ~[?:?]
        at com.mongodb.async.client.MongoClients.create(MongoClients.java:173) ~[?:?]
        at com.mongodb.async.client.MongoClients.create(MongoClients.java:133) ~[?:?]
        at com.mongodb.async.client.MongoClients.create(MongoClients.java:99) ~[?:?]
        at de.bytropical.horstblocks.plotholograms.database.MongoManager.<init>(MongoManager.java:28) ~[?:?]
        at de.bytropical.horstblocks.plotholograms.PlotHologram.onEnable(PlotHologram.java:62) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[server.jar:git-Spigot-2cf50f0-8166d17]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [server.jar:git-Spigot-2cf50f0-8166d17]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:403) [server.jar:git-Spigot-2cf50f0-8166d17]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:381) [server.jar:git-Spigot-2cf50f0-8166d17]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:330) [server.jar:git-Spigot-2cf50f0-8166d17]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.reload(CraftServer.java:752) [server.jar:git-Spigot-2cf50f0-8166d17]
        at org.bukkit.Bukkit.reload(Bukkit.java:525) [server.jar:git-Spigot-2cf50f0-8166d17]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:27) [server.jar:git-Spigot-2cf50f0-8166d17]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [server.jar:git-Spigot-2cf50f0-8166d17]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:648) [server.jar:git-Spigot-2cf50f0-8166d17]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchServerCommand(CraftServer.java:634) [server.jar:git-Spigot-2cf50f0-8166d17]
        at net.minecraft.server.v1_12_R1.DedicatedServer.aP(DedicatedServer.java:444) [server.jar:git-Spigot-2cf50f0-8166d17]
        at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:407) [server.jar:git-Spigot-2cf50f0-8166d17]
        at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [server.jar:git-Spigot-2cf50f0-8166d17]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [server.jar:git-Spigot-2cf50f0-8166d17]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]

0 个答案:

没有答案