Problem with stoping smartfox

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

Moderators: Lapo, Bax

ssokol
Posts: 6
Joined: 13 Jan 2022, 12:16

Problem with stoping smartfox

Postby ssokol » 13 Jan 2022, 12:31

I have a weird problem with Smartfox (ver 2.14).

I have a smartfox server running on Amazons EC2 Linux instance. It has been running for over a year without any restarts. Today I wanted to stop the server, however since Flash is no longer supported I could not access the admin panel, so I decided to stop it using console command. I've used the sfs2x-service stop command to stop the server, and got a confirmation in the console. However the server did not stop. The game still can connect to the server and all server logic works and server logs are being updated. Calling sfs2x-service status confirms that the deamon is stopped.

How can I stop the server?
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem with stoping smartfox

Postby Lapo » 13 Jan 2022, 16:14

Hi,
SFS2X 2.14 was already providing an HTML based AdminTool, although I would recommend to update to a more recent version, since we've updated and finalized the HTML-based tool.

To check if the server is still running you can check the process list:

Code: Select all

ps ax |grep "smartfox"

This will return something like this (if SFS2X is still running):

Code: Select all

   7235 pts/1    Sl+    0:38 java -cp ./:build/:lib/*:lib/apache-tomcat/bin/*:extensions/__lib__/* -Dsfs2x.service.provider=OvercastServiceProvider -Dfile.encoding=UTF-8 com.smartfoxserver.v2.Main

The first number (7235, it will be different in your case) is the process number.
You can then kill the process with:

Code: Select all

kill <processNumber>


Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
ssokol
Posts: 6
Joined: 13 Jan 2022, 12:16

Re: Problem with stoping smartfox

Postby ssokol » 17 Jan 2022, 13:17

Hi

Thx for the help. Following your instruction I was able to kill the smartfox server.

To access the HTML admin I had to edit the server config file and restart the server. After killing the process and staring anew I now have access to the admin panel.
And yes I will be upgrading to the latest smartfox server, but before I did that I wanted to be sure I have a full access to the old one as a fallback.

Again, thx for quick response, much obliged
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem with stoping smartfox

Postby Lapo » 17 Jan 2022, 14:38

Excellent :)
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 61 guests