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

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

andrew2110
Posts: 90
Joined: 28 May 2008, 13:36

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

Postby andrew2110 » 11 Jul 2020, 06:34

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
andrew2110
Posts: 90
Joined: 28 May 2008, 13:36

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

Postby andrew2110 » 11 Jul 2020, 07:11

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!
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

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

Postby Lapo » 11 Jul 2020, 10:46

No problem :)
Lapo
--
gotoAndPlay()
...addicted to flash games
andrew2110
Posts: 90
Joined: 28 May 2008, 13:36

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

Postby andrew2110 » 22 Jul 2020, 22:05

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?
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

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

Postby Lapo » 23 Jul 2020, 07:48

Have you added these settings via the AdminTool or manually?
Also which server version are you using?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
andrew2110
Posts: 90
Joined: 28 May 2008, 13:36

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

Postby andrew2110 » 23 Jul 2020, 09:06

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
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

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

Postby Lapo » 23 Jul 2020, 12:08

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
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 137 guests