Page 1 of 1

Server will run via ./sfs2x.sh but not via ./sfs2x-service start

Posted: 11 Jul 2020, 06:34
by andrew2110
Hello! Am getting my new server ready to launch our new game but have come across a problem i've not seen before in any of my previous smartfox installs.

running ./sfs2x.sh starts the server happily with no issues, no errors shown in the log on screen, however ./sfs2x-service start will just output;

Starting sfs2x-service

but will write nothing to the logs folder (including the boot folder in logs), so i'm struggling to work out exactly why its not opening. This is on a centos 7 dedicated server and the server will run happily for hours when started via ./sfs2x.sh

Re: Server will run via ./sfs2x.sh but not via ./sfs2x-service start

Posted: 11 Jul 2020, 07:11
by andrew2110
To answer my own question, its because I had invalid JVM Options:

It starts up with:
-Xms512M -Xmx8G

I must have originally made a typo in here causing it to fail on startup. Sorry for asking and answering my own question!

Re: Server will run via ./sfs2x.sh but not via ./sfs2x-service start

Posted: 11 Jul 2020, 10:46
by Lapo
No problem :)

Re: Server will run via ./sfs2x.sh but not via ./sfs2x-service start

Posted: 22 Jul 2020, 22:05
by andrew2110
Sorry to drag this up again, but it does seem recreatable now that the server will boot once with:

-Xms512M -Xmx8G

via ./sfs2x-service start

but then not boot again until I run ./sfs2x.sh and remove the jvm memory settings + it won't output any logs to help me figure out whats going on. Has anything else like this been reported before?

Re: Server will run via ./sfs2x.sh but not via ./sfs2x-service start

Posted: 23 Jul 2020, 07:48
by Lapo
Have you added these settings via the AdminTool or manually?
Also which server version are you using?

Thanks

Re: Server will run via ./sfs2x.sh but not via ./sfs2x-service start

Posted: 23 Jul 2020, 09:06
by andrew2110
Added the options via the server tool (the new tool, thank you for making this by the way, excited to get to making extensions for this!)

Server version: 2.16.0, CPU: Intel Xeon E3-1230 v6 Quad-Core, RAM: 32GB DDR4 SDRAM, CentOS with CentOS WebPanel

The reason for wanting more RAM is that previous versions of this game have run very well with SmartFox, however I'm now trying to mirror users accounts in memory on the server when they're active rather than querying the database on each request made. It all ran perfectly until moving away from the development server to the production server. It will run perfectly again with the higher memory settings once and can see that it has the extra memory allocated in admin tool, however on stopping the server, it won't run again unless I use ./sf2sx.sh

Re: Server will run via ./sfs2x.sh but not via ./sfs2x-service start

Posted: 23 Jul 2020, 12:08
by Lapo
I've tested the same SFS2X version under Ubuntu Linux and did not find any issues. The memory settings are applied on every run.
In any case, check the file called sfs2x-service.vmoptions under the SFS2X/ folder. Can you copy/paste the content here?

In my test I used -Xms450M and -Xmx900M and the file looks like this:

Code: Select all

# Enter one VM parameter per line
# To include another file, uncomment the following line and enter the file path:
# -include-options [path to other .vmoption file]
-classpath/p ./:lib/*:lib/apache-tomcat/bin/*:extensions/__lib__/*
-Dfile.encoding=UTF-8
-Xms450M
-Xmx900M
Cheers