Closed Brittank88 closed 1 year ago
It's supposed to be a relative path to the server.jar
directory iirc, or the directory the server is started in.
Let me test on my end to see which is the case and if ../start.sh
works.
You seem to be right, it only looks in the server's run directory. I'll add this to my list of issues for #4, and get this fixed for the next release. For now, you'll have to place the script in the same directory as the server.
[13:50:34] [Server thread/INFO]: [Restart Server] java.io.IOException: Cannot run program "cmd /c ..\start.bat" (in directory "C:\Misc\Minecraft Quilt 1.19.2 test server\server"): CreateProcess error=2, The system cannot find the file specified
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
at io.github.steveplays28.restartserver.commands.RestartCommand.execute(RestartCommand.java:40)
at io.github.steveplays28.restartserver.commands.RestartCommand.lambda$register$0(RestartCommand.java:20)
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:263)
at net.minecraft.class_2170.method_9249(class_2170.java:271)
at net.minecraft.class_2170.method_44252(class_2170.java:264)
at net.minecraft.class_3176.method_13941(class_3176.java:305)
at net.minecraft.class_3176.method_3813(class_3176.java:290)
at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:819)
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:665)
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:499)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:158)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
... 12 more
[13:50:34] [Server thread/INFO]: [Restart Server] Server restart failed.
My confusion is that it is. Start.sh
is in the root of the server, alongside the server jarfile, etc.
Ah, my bad. I misread your original question.
Still though, for me it works if I just set the start script in the config to Start.sh
and have this file be in the server root.
Can you give me your log files and directory tree of the server?
Thanks!
So just to verify once more if you don't mind, the error from your log file at line 837 also occurs when Start.sh
is in the same directory as the server.jar
?
And your config's restartScript
is set to the below?
"restartScript": "Start.sh",
Yes, that's correct.
Seeing as this could be file I/O related, here's the system specs:
_,met$$$$$gg. game-server@Game-Server
,g$$$$$$$$$$$$$$$P. -----------------------
,g$$P" """Y$$.". OS: Debian GNU/Linux 11 (bullseye) x86_64
,$$P' `$$$. Kernel: 5.10.0-18-amd64
',$$P ,ggs. `$$b: Uptime: 7 days, 11 hours, 27 mins
`d$$' ,$P"' . $$$ Packages: 520 (dpkg)
$$P d$' , $$P Shell: fish 3.1.2
$$: $$. - ,d$$' Terminal: /dev/pts/0
$$; Y$b._ _,d$P' CPU: Intel i5-7500 (4) @ 3.800GHz
Y$$. `.`"Y$$$$P"' GPU: Intel HD Graphics 630
`$$b "-.__ Memory: 160MiB / 7814MiB
`Y$$
`Y$$.
`$$b.
`Y$$b.
`"Y$b._
`"""
Thanks.
By the way, sorry, my above comment wasn't completely correct, I forgot that in v1.0.0 the restart scripts were still separated by OS, though I removed this in the development branch since there's no point in having that separated. Still an odd bug though. I haven't done any testing on Linux or MacOS, so that's probably why this bug is occurring on your end but not on mine.
I just downloaded v1.0.0 and ran it on a Quilt 1.19.2 server, and it all seems to work (Windows 10):
Do you mind contacting me on Discord, if you have the time? Might be a bit easier than back and forth on GitHub. Don't worry if not though.
I've sent you a message on Discord!
Funnily enough, it actually works if I supply the absolute path to the script.
Interesting. I didn't even know absolute paths worked as well, good to know. I need to make documentation someday lmao
I have a
Start.sh
file in the root of my server installation that I wish to point to. Unfortunately, it is not specified what the 'origin' of the start script path you specify is. I've triedStart.sh
and../Start.sh
to no avail.