servertap-io / servertap

ServerTap is a REST API for Bukkit/Spigot/Paper Minecraft servers
https://servertap.io
MIT License
226 stars 57 forks source link

plugin turn red when i change the port #241

Closed RegaRyu closed 11 months ago

RegaRyu commented 1 year ago

plugin disable when i change port in config and restart the server. i use hosting server.

Velyn-N commented 1 year ago

Are there Warnings, Errors or Exceptions in the Server Logs, especially around ServerTaps starting messages? Can you send your config (at least the part about the port configuration)?

RegaRyu commented 1 year ago

no warning on server logs i cant fine about servertap thing in there, and this plugin not even have reload command dat make user must restart the server for changing anything in config.

i just change the port : port: 25560 debug: false useKeyAuth: true key: 'change_me' normalizeMessages: true

RegaRyu commented 1 year ago

i found it :

[10:25:59] [Server thread/INFO]: [ServerTap] Enabling ServerTap v0.5.3 [10:25:59] [Server thread/INFO]: [ServerTap] Hooked economy provider: EssentialsX Economy [10:25:59] [Server thread/WARN]: [ServerTap] AUTH KEY IS SET TO DEFAULT "change_me" [10:25:59] [Server thread/WARN]: [ServerTap] CHANGE THE key IN THE config.yml FILE [10:25:59] [Server thread/WARN]: [ServerTap] FAILURE TO CHANGE THE KEY MAY RESULT IN SERVER COMPROMISE [10:25:59] [Server thread/WARN]: [ServerTap] TLS is not enabled. [10:25:59] [Server thread/INFO]: [ServerTap] Enabling CORS for * [10:25:59] [Server thread/WARN]: [ServerTap] Loaded class org.slf4j.impl.StaticLoggerBinder from DiscordSRV v1.26.2 which is not a depend or softdepend of this plugin. [10:25:59] [Server thread/INFO]: [io.javalin.Javalin] Starting Javalin ... [10:25:59] [Server thread/INFO]: [org.eclipse.jetty.server.Server] jetty-11.0.14; built: 2023-02-22T23:41:48.575Z; git: 4601fe8dd805ce75b69c64466c115a162586641b; jvm 17.0.8+7 [10:25:59] [Server thread/ERROR]: [io.javalin.Javalin] Failed to start Javalin [10:25:59] [Server thread/INFO]: [io.javalin.Javalin] Stopping Javalin ... [10:25:59] [Server thread/INFO]: [org.eclipse.jetty.server.Server] Stopped Server@349dac7{STOPPING}[11.0.14,sto=0] [10:25:59] [Server thread/INFO]: [io.javalin.Javalin] Javalin has stopped [10:25:59] [Server thread/ERROR]: Error occurred while enabling ServerTap v0.5.3 (Is it up to date?) io.javalin.util.JavalinBindException: Port already in use. Make sure no other process is using port 25560 and try again. at io.javalin.Javalin.start(Javalin.java:182) ~[ServerTap-0.5.3.jar:?] at io.javalin.Javalin.start(Javalin.java:148) ~[ServerTap-0.5.3.jar:?] at io.servertap.PluginEntrypoint.onEnable(PluginEntrypoint.java:219) ~[ServerTap-0.5.3.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:371) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:544) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugin(CraftServer.java:578) ~[paper-1.19.3.jar:git-Paper-399] at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugins(CraftServer.java:492) ~[paper-1.19.3.jar:git-Paper-399] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:274) ~[paper-1.19.3.jar:git-Paper-399] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.19.3.jar:git-Paper-399] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.19.3.jar:git-Paper-399] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:25560 at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344) ~[ServerTap-0.5.3.jar:?] at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304) ~[ServerTap-0.5.3.jar:?] at org.eclipse.jetty.server.Server.lambda$doStart$0(Server.java:402) ~[ServerTap-0.5.3.jar:?] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?] at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?] at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992) ~[?:?] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?] at org.eclipse.jetty.server.Server.doStart(Server.java:398) ~[ServerTap-0.5.3.jar:?] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[ServerTap-0.5.3.jar:?] at io.javalin.jetty.JettyServer.start(JettyServer.kt:74) ~[ServerTap-0.5.3.jar:?] at io.javalin.Javalin.start(Javalin.java:171) ~[ServerTap-0.5.3.jar:?] ... 11 more Caused by: java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method) ~[?:?] at sun.nio.ch.Net.bind(Net.java:555) ~[?:?] at sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:337) ~[?:?] at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:294) ~[?:?] at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339) ~[ServerTap-0.5.3.jar:?] at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304) ~[ServerTap-0.5.3.jar:?] at org.eclipse.jetty.server.Server.lambda$doStart$0(Server.java:402) ~[ServerTap-0.5.3.jar:?] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?] at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?] at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992) ~[?:?] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?] at org.eclipse.jetty.server.Server.doStart(Server.java:398) ~[ServerTap-0.5.3.jar:?] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[ServerTap-0.5.3.jar:?] at io.javalin.jetty.JettyServer.start(JettyServer.kt:74) ~[ServerTap-0.5.3.jar:?] at io.javalin.Javalin.start(Javalin.java:171) ~[ServerTap-0.5.3.jar:?] ... 11 more [10:25:59] [Server thread/INFO]: [ServerTap] Disabling ServerTap v0.5.3 [10:25:59] [Server thread/INFO]: [ServerTap] Disabled Version 0.5.3

RegaRyu commented 1 year ago

i cant read it whats happen in that log

Velyn-N commented 1 year ago

The port you are trying to bind the ServerTap Webserver is already in use by another program. You can not use the same port for two programs, please change the port to an unused one.

RegaRyu commented 1 year ago

wait what program?

i just want to use server tap for connecting to tikfinity.zerody coz that tikfinity need servertap how i can connect it if i have this problem? i dont know what program

RegaRyu commented 1 year ago

before that i try to downgrade to ver 0.4.0 servertap and got disable + my mythiclib disable too but when i back to newest version my mythiclib is fine help me sir :(

Velyn-N commented 1 year ago

if you are on Linux you can use these commands to find out which process uses a port: https://www.cyberciti.biz/faq/unix-linux-check-if-port-is-in-use-command/

I do not know which process uses the port, as i do not know a software that uses 25560 by default. It's best if you just choose a different port, for example 4567 (ServerTaps default), and remember to open it up in your firewall. If you do not know how to do that please look on the Internet for a guide for your hoster, operating system or firewall software.

RegaRyu commented 1 year ago

im sorry but i already say it before that i use paid hosting server not localhost, and for the port we cannot change it. and i use windows sir

RegaRyu commented 1 year ago

which mean this plugin not support hosting server? and just can use on localhost?

Velyn-N commented 1 year ago

If your hoster only provides you with one port you cannot use ServerTap as it needs a separate one from minecraft, that is correct. I do not know the exact conditions your hoster provides so I can not tell you that.

Any normal Minecraft Server can handle the plugin tho, whether running on your local machine, one rented from a hoster or something entirely different. It just needs a port to use.

RegaRyu commented 1 year ago

alright its ok for now, i hope this great plugin can be use whitout this problem on any hosting in future, i hope that so much. keep the good work...

srmullaney commented 1 year ago

@RegaRyu Our plug-in does support hosted environments. You just haven’t configured it properly. If you would like further assistance feel free to make a post in our discord support forum and i’d be more than happy to assist you.