java - Websockets on Ubuntu 16.04 - Ask Ubuntu
i trying create discord bot, , requires being able connect websocket, however, whenever attempt connect websocket through java code, times out, when run on personal pc, works fine.
error:
java.lang.runtimeexception: java.net.connectexception: connection timed out @ net.dv8tion.jda.requests.websocketclient.connect(websocketclient.java:199) @ net.dv8tion.jda.requests.websocketclient.<init>(websocketclient.java:81) @ net.dv8tion.jda.entities.impl.jdaimpl.login(jdaimpl.java:132) @ net.dv8tion.jda.jdabuilder.buildasync(jdabuilder.java:291) @ net.dv8tion.jda.jdabuilder.buildblocking(jdabuilder.java:312) @ me.swedz.pb.main$1.run(main.java:29) @ org.bukkit.craftbukkit.v1_8_r3.scheduler.crafttask.run(crafttask.java:71) @ org.bukkit.craftbukkit.v1_8_r3.scheduler.craftasynctask.run(craftasynctask.java:53) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) @ java.lang.thread.run(thread.java:745) caused by: java.net.connectexception: connection timed out @ java.net.plainsocketimpl.socketconnect(native method) @ java.net.abstractplainsocketimpl.doconnect(abstractplainsocketimpl.java:350) @ java.net.abstractplainsocketimpl.connecttoaddress(abstractplainsocketimpl.java:206) @ java.net.abstractplainsocketimpl.connect(abstractplainsocketimpl.java:188) @ java.net.sockssocketimpl.connect(sockssocketimpl.java:392) @ java.net.socket.connect(socket.java:589) @ sun.security.ssl.sslsocketimpl.connect(sslsocketimpl.java:668) @ com.neovisionaries.ws.client.websocketfactory.createdirectrawsocket(websocketfactory.java:653) @ com.neovisionaries.ws.client.websocketfactory.createrawsocket(websocketfactory.java:578) @ com.neovisionaries.ws.client.websocketfactory.createsocket(websocketfactory.java:510) @ com.neovisionaries.ws.client.websocketfactory.createsocket(websocketfactory.java:490) @ com.neovisionaries.ws.client.websocketfactory.createsocket(websocketfactory.java:272) @ com.neovisionaries.ws.client.websocketfactory.createsocket(websocketfactory.java:228) @ net.dv8tion.jda.requests.websocketclient.connect(websocketclient.java:191) ... 10 more
main class: http://pastebin.com/raw/gkag2dad
this code meant run on minecraft server, onenable() , ondisable() methods there that. (as option use bukkitrunnable)
edit: have discovered occurs sometimes...
Comments
Post a Comment