Can start server in command line using run.sh, but won't start from Web UI

To summarize…what happens is I press “start” it shows as up for a few seconds - no logs get generated in the latest log file though, and then it changes to down. However, I can easily start the server by manually running the run.sh script in the command line.

The MineOS log file looks like this:
{“level”:“info”,“message”:“[NAME] 192.168.2.106 issued command : "start"”,“timestamp”:“2023-02-20T05:53:13.833Z”}
{“level”:“info”,“message”:“[NAME] received request "start"”,“timestamp”:“2023-02-20T05:53:13.833Z”}
{“level”:“error”,“message”:“[NAME] Error with get_increments true”,“timestamp”:“2023-02-20T05:53:15.456Z”}

And then something about not being able to ping the server a few times before going down. That’s all it says. It’s like the run.sh script isn’t even being triggered or something.

I am running this in a FreeBSD 13 Jail on a FreeNAS system. The set up I am trying to run is a mod pack that uses Java 17 with Forge 43.2.3.

I am able to run a vanilla Minecraft server just fine and start it with the WebUI, for some reason the WebUI doesn’t work with this Forge pack though. I am thinking maybe it is a weird permissions issue, but after playing around with the permissions, I can’t seem to figure it out.

Things I’ve tried:

  • Re-making the server by importing the mod pack (no impact…same issues. Can run with commandline but Web UI doesn’t run)
  • Chmod/Chown on the server files to ensure the right MineOS user/groups owns them (this didn’t seem to have any effect)
  • Moving the -universal and -server Jar files to the base folder from the new Forge folder they added and selecting that as the “runnable Jar” (nothing happens, turns out these aren’t runnable without some additional commands that come from somewhere else now)
  • Importing/Building the available Forge profiles and trying to run with those instead (they don’t match the version I need for this mod pack though so I didn’t expect this to work. Same results)
  • Changing the server port (figured this might fix the ping error messages I was seeing, but when I tested with the Vanilla Minecraft server that actually comes up, I got the same ping errors.)
  • Customizing the run.sh script to make it do something else (The WebUI overwrites this script when I press start and all my changes get erased, so this didn’t work)

This is the start command: @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.19.2-43.2.3/unix_args.txt nogui
The selected runnable profile is forge-1.19.2-43.2.3-installer.jar
ram max is 8G, min is 2G
Basically all of the other server settings are default besides the seed, the port, the MOTD, and the world name.

Because it is actually running the log files will come through live in the WebUI, the server just shows as down and no stats come through. Clearly it is running correctly, the WebUI just doesn’t work. People can connect to it remotely and play just fine, but I want to monitor it with MineOS.

Anyone have any advice or anything else to try? I am not really sure what to do. I’m at wits end…I’ve spent 10+ hours on this. I’ve used MineOS for years before this and really don’t want to rebuild. I’ve read dozens of “clicking start does nothing” threads and none of them seem to help me so in desperation I’ve decided to make a new post.

Maybe I need to check some of the other FreeBSD Jail log files. I checked the MineOS and system one, and nothing came up though.

I was hopeful this would work as it’s a bit different than what I tried. I was excited - I tried this exact setup and it looked like it will start…it showed as “up” for a about 10 seconds and then went “down” again.

After reviewing the logs It never actually goes up or even tries. The latest.log just has records from when I shut it down to try this new method out. Any other ideas?

It literally should work, the only difference might be the which account are you launching as?
it should not be root either in web ui or command line. If you can run the run.sh as the same user you log into the web ui with then you need to copy the run.sh contents to the java arguments and change the runnable jar to the universal. Don’t copy my arguments as that is for a different forge version.
If you can’t run the run.sh from the cli as the same user you log into the web ui you then need to change ownership of the server files to the correct user.

Ok I think I resolved it…seems to work now -

Sorry I should have specified. I did replace the forge version and checked the filepaths. Everything was lined up with the version I was using.

I did not try logging in as the user I have for managing from the MineOS GUI. I logged in as that user and ran “sudo ./run.sh” (The account doesn’t have enough permissions otherwise to run the jar successfully…it will run for a while and then eventually run into a permissions issue with one of the mods in the log files) and it started.

I had two thoughts:
A) there is something weird going on here and the account does not have permissions to properly kick a “start” command over to a server (but this shouldn’t be the case as I’ve created vanilla MC servers just fine that I can run with the start command from the web GUI)
B) Maybe there is some weird permissions issue with the account that is causing it to fail like I saw in the commandline and that’s why it doesn’t show anything in latest.log. (But this doesn’t make sense either because the log file should show that same permission failure, and it just, doesn’t when I click “start” in the Web GUI nothing happens for this server, or any servers I make with this Forge mod pack)

I had already changed the owner of everything to the GUI user, but I figured it couldn’t hurt to try again based on what you said.
I ran a change owner on all server files to that user:

chown -R mc:mc /var/games/minecraft/*

NOTE: IF YOU’RE READING THIS LOOKING FOR A SOLUTION, YOU MAY NEED TO USE A DIFFERENT USER:GROUP COMBINATION WHERE I PUT ‘MC:MC’

I realized that at some point I had done this before but I guess it hadn’t applied to all of the folders or something weird happened with this server. After I did that, again, it worked.

I still don’t quite know why I can’t create a server from an imported mod pack and have it run using the start command by default, even with your guidance I had to change the owner of the server files and then use the custom command you provided above. I think the permissions issues may have come into play after I moved the -universal jar manually to the base of the server repository. I did a “CP” command for it and maybe should have done an “MV” command. I also did it using a different admin account. Maybe that is why it still wouldn’t start? Regardless it is fixed now.

I have 0 issues with creating vanilla MC servers with MineOS- the import feature just does not play nice with this new Forge file structure and the workaround required to make MineOS function correctly with it.

1 Like

Glad to hear you got it working! Account permissions are everything.
MineOS doesn’t out of the box work with newer Forge versions, I don’t know what the last version to work from the UI is but these new ones with the run.sh don’t automagically work.
I think the procedure would be - when logged into the UI use a forge installer, then you need to copy the run.sh to the java args, and copy (as the same user, no sudo or anything) the universal forge JAR to the server root and refresh the UI, select the universal JAR.
I think at that point all the permissions should be correct and the server should start - with a eula acceptance.

If you use sudo it is running as a root user and the permissions will get messed up.

The first rule of MineOS, besides the cloning and setup - always use the user account you log into the UI with to move/copy/create files and folders.

2 Likes

I see…thanks for the support - appreciate it! I had no idea that using the commandline with sudo or with the root account would cause issues with this tool.

This thread can be closed…not sure if that forum works this way.