Yes, the PID_FILE section of the script is as follows:

# The app server process id file
# (you can set this in Launch.py as well):
PID_FILE="/var/run/$APP_NAME.pid"
#PID_FILE="$WORK_DIR/webkit.pid"

It's not a rights issue--the user can write to /var/run, and it does so 
successfully if you do independent stop and start commands using the same 
script.  I tried commenting out the LAUNCH_AS_WEBWARE line in the start script, 
and it did not solve the issue.  

It really appears to be a timing issue--the restart section of the script just 
does a stop and a start, but if you do those two things independently, or with 
a sleep 1 in the middle, the issue goes away.

My best guess at this point is that the pid file might still be there when the 
start code is not expecting it to be (and the stop code thinks it's done), and 
the start is trying to create it and because it's still there from the previous 
run it's failing.

Thanks,
Mike Trisko

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christoph 
Zwerschke
Sent: Thursday, March 23, 2006 3:38 PM
To: webware-discuss@lists.sourceforge.net
Subject: Re: [Webware-discuss] Problem restarting app server - Webware 0.9 
RedHat start script

Michael Trisko wrote:
 > With Webware 0.8.1 we've been using /var/run/$APP_NAME.pid to store
 > the pid files, so I decided to continue with that convention with 0.9.
 > However, when I do a restart, it works the first time but fails after
 > that.  The pidfile in the /var/run location is not there ...

So you changed the PID_FILE variable in the start script to point to 
/var/run instead of the working dir, right?

Note that there are two starting modes now, controlled by the variable 
LAUNCH_AS_WEBWARE. If the variable is set (by default), then the start 
script switches over to the Webware user even before the log file is 
written, and that user may not have the right to write to /var/run. If 
you want to create logfiles in /var/run, you need to unset the variable 
LAUNCH_AS_WEBWARE as well. In you do this, the logfile is written before 
switching over to the Webware user, and everything should be fine.

Also, check that you have set up your Webware user appropriately. It 
should usually be a user with low priviledges and owns the working dir 
(by default, the Webware user will be the owner of the AppServer script 
in your working directory).

-- Christoph


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to