Creating a new Server

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

dunn

New Member
Jul 29, 2019
7
0
0
Specs for Managed Server
OS: Ubuntu Server 13.04 32bit on ESX4.1.3
vRAM: 4Gb
CPU: 2 Cores Intel Xeon 3.00 Ghz
HDD: 4 300Gb in a Raid 0 20Gb Allocated for FTB

So I am trying to run a server for me and about 5 friends and thought well I will use my poweredge 2850 so after considerable googleing I have this
sudo apt-get update
sudo apt-get install openssh-client
sudo apt-get install openssh-server
sudo apt-get install screen
sudo apt-get install default-jdk
sudo apt-get install unzip
mkdir ftb
cd ftb
wget http://www.creeperrepo.net/direct/F...8/modpacks^Ultimate^1_1_2^Ultimate_Server.zip
unzip modpacks^Ultimate^1_1_2^Ultimate_Server.zip
chmod 777 ServerStart.sh
java -Xmx4096M -Xms4096M -jar ftbserver.jar
./ServerStart.sh
vi server.properties
the problem is when running the command "java -Xmx4096M -Xms4096M -jar ftbserver.jar"
I get
"The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit."

I have tried to decrease the RAM for testing purposes and I still get the problem. Any Idea what the problem could be?
 

sibomots

New Member
Jul 29, 2019
14
0
0
Your minimum memory allocation is too high for the specs of your machine.

java -Xms1G -Xmx3G -jar ftbserver.jar

Also, chmod 755 would be better than 777. 777 makes the file writable by those in your group (OS-wise) and others (anyone who has shell access). Someone can easily change StartServer.sh to do nefarious things and you wouldn't be wise until it was already over.

type "man chmod" for details on your shell.

Replace this part of your StartServer.sh with this kind of invocation instead:

was:
java -Xms1G -Xmx3G -jar ftbserver.jar

is:
nohup java -Xms1G -Xmx3G -jar ftbserver.jar --noconsole 2>&1 whatever.log &

That'll put the server in a no-console mode and run in the background so when you logout of the shell, it won't die and it won't be affected by the HUP signal.
It combines stderr and stdout into one file descriptor (stdout) and redirects it to whatever.log
"man kill" for details on what the HUP signal means.

You still get server.log since the java server writes to that file explicitly.

To watch it boot, just do:

tail -f whatever.log

Ctrl-C when you're done watching, it won't kill the server or affect it in any way.