Server will only start manually and not through panel

So I have a FTB infinity server. After a LOT of work, I got it to actually run, BUT it only runs if i manually run the SH file. When I run it through the webui it just crashes instantly and leaves no log. Would there be any way to make it so that when I click start in the webui, the server gets run with the ServerStart.sh file? Also, when I start it manually it does not show as running in the webui.

Most likely cause:

you were logged in as root as when you ran these commands from the console, breaking the webui’s permissions to run a server

If you ran ServerStart.sh or you ran it with manually, e.g., java -jar ..., then root will end up making files and owning files that the user you’re logged into the webui cannot edit or lock.

This is never the proper way to run anything in MineOS. Read the ServerStart.sh. Understand what it does, then take the configuration you agree with from the file and put it into the webui, so that memory, etc. matches as you want it.

I only ever logged in as root for the actual installation. I disabled root access afterwards due to not wanting to make this mistake. The problem ended up being that I have 2 different users and the file was read only for the user that was running the web panel. I just changed the permissions of the files within the folder so that any user could read and write. That seemed to have fixed it. Now my only problem is SUPER loud fans, but that just seems to be something with the server itself.

1 Like

Sorry for bumping this back up but I have the same issue - more or less. Pretty much a minecraft, mineos and TrueNas/FreeBSD noob so any help will be appreciated…

We have a FTB Infinity server running but so far no luck with webui. We have to run manually through ServerStart.sh. Webui won’t start the server at all. Of course when manually started webui does not indicate that the server is running however the log does run (but cannot enter commands through webui as it does not recognize that the server is running). Currently run it and manage it through PuTTY/Screen.

Even with the latest Truenas Plugin installed we couldn’t run the server manually due to various errors that appeared to be from deprecated java processes. Without really knowing what I was doing we eventually installed openjdk8 and set JAVA_HOME to jdk8 in settings.sh and the server runs well manually (still no-go with webui).

As I understand from the earlier discussion, webui will not run ServerStart.sh but we might get it to work with some settings in webui - but I don’t know what they would be and how to push them to webui. I have copied what we are using for settings.sh ServerStart.sh below - hopefully someone can help me set this up. It would be great to get this working within Mineos like our other none FTB servers.

settings.sh

export JAVA_HOME="/usr/local/openjdk8-jre"
export MCVER=“1.7.10”
export JARFILE=“minecraft_server.${MCVER}.jar”
export LAUNCHWRAPPER=“net/minecraft/launchwrapper/1.12/launchwrapper-1.12.jar”
export JAVACMD=“java”

ServerStart.sh

#!/bin/sh
cd “$(dirname “$0”)”
. ./settings.sh

makes things easier if script needs debugging

if [ x$FTB_VERBOSE = xyes ]; then
set -x
fi

cleaner code

eula_false() {
grep -q ‘eula=false’ eula.txt
return $?
}

start_server() {
“$JAVACMD” -server -Xms512M -Xmx2048M -XX:PermSize=256M -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -jar FTBServer-1.7.10-1614.jar nogui
}

run install script if MC server or launchwrapper s missing

if [ ! -f $JARFILE -o ! -f libraries/$LAUNCHWRAPPER ]; then
echo “Missing required jars. Running install script!”
sh ./FTBInstall.sh
fi

check if there is eula.txt and if it has correct content

if [ -f eula.txt ] && eula_false ; then
echo “Make sure to read eula.txt before playing!”
echo "To exit press "
read ignored
exit
fi

inform user if eula.txt not found

if [ ! -f eula.txt ]; then
echo “Missing eula.txt. Startup will fail and eula.txt will be created”
echo “Make sure to read eula.txt before playing!”
echo "To continue press "
read ignored
fi

echo “Starting server”
rm -f autostart.stamp
start_server

while [ -e autostart.stamp ] ; do
rm -f autostart.stamp
echo “If you want to completely stop the server process now, press Ctrl+C before the time is up!”
for i in 5 4 3 2 1; do
echo “Restarting server in $i”
sleep 1
done
echo “Rebooting now!”
start_server
echo “Server process finished”
done

If webui can run this server it would be ideal - if anyone can give me a hint (or better yet some hand holding) it would be greatly appreciated.

We have to run manually through ServerStart.sh. Webui won’t start the server at all.

Almost 100% that means this server was run as root, which means you should take a look at the server files and see if they are owned by root:root. If so, chown them back, because the webui does not run servers as root, but an unprivileged user.