RHEL style init script - need pid file

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

Moderators: Lapo, Bax

famoso
Posts: 2
Joined: 26 Apr 2012, 15:13

RHEL style init script - need pid file

Postby famoso » 31 May 2012, 17:46

Hello,

similiar to this post viewtopic.php?p=53542#p53542 the thing we miss is a pid file for usage with monit. The difference with our case is: we are using red hat. RHEL release 6.2, just to be precise.
My colleage already tried to write a custom init script but failed. Then I tried to do so, but honestly, the provided "sfs2x-service" script does a lot of stuff I do not understand and some more things that are confusing to me, e.g. the shipped JRE and the way SF is started with a lot of parameters and some nohup usage that is not completely clear to me.
We are running a production environment for a customer with a multiple thousand users(commercial license), hence I'm afraid just to try out an own way of spawning smartfox (I assume all these extras are not meaningless).
Also, the script from the posting mentioned above was built for debian and I wasn't even able to turn it into a proper redhat style script (how to create a pid file?).
Now my head is smoking and I wonder maybe someone already has this thing working (might be as well a user or the smartfox developers themselves).
I found out that there was support for pid files in earlier versions of smartfox, but couldn't find anything for the 2x releases.

We really do need the pid file for monit to restart the server in case it crashes. Sadly this happens from time to time and the only reliable way for now is to manually restart smartfox as automatic restart without a pid file sometimes fails. Apart from the uncommodities of being awakened from the watchdog at night or being disrupted at meals this sometimes becomes a serious problem in cases where all our admins are unable to use the internet and the service is down for many hours(e.g. during weekends).

So... anyone out there has this thing working and is willing to share it? This would be really great.
In case that no script turns up this way, may I decently place a feature request at the smartfox development team to create one?

Thanks in advance for all help, hints or solutions.
Yours, Oliver
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: RHEL style init script - need pid file

Postby Lapo » 02 Jun 2012, 09:04

Hi,
unfortunately we are not able to help in this regard.
Question: can't you simply inovke the sfs2x-service restart script from your tool?
What we can do is helping with the issue itself, if you provide us more details about the problem you are having (the server freeze or crash).
Are you monitoring the server via the admin tool and the log files? Anything anomalous? What is the nature of the problem exactly?
Lapo
--
gotoAndPlay()
...addicted to flash games
grhwood
Posts: 116
Joined: 15 Mar 2011, 04:43

Re: RHEL style init script - need pid file

Postby grhwood » 08 Jun 2012, 08:36

+1 for a official init scipt

An init script can help smarfox survive server restart.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: RHEL style init script - need pid file

Postby Lapo » 08 Jun 2012, 10:06

I am not following. Unfortunately nothing can survive a physical restart, if that is what you are referring to?
What has this to do with the topic?
Lapo

--

gotoAndPlay()

...addicted to flash games
grhwood
Posts: 116
Joined: 15 Mar 2011, 04:43

Re: RHEL style init script - need pid file

Postby grhwood » 08 Jun 2012, 11:31

I mean sfs server can be back online w/o any human intervention.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: RHEL style init script - need pid file

Postby Lapo » 08 Jun 2012, 12:45

In the docs we explain how to start SFS2X when the OS starts:
http://docs2x.smartfoxserver.com/Gettin ... tall-linux
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 65 guests