|
From: Leif M. <le...@ta...> - 2007-09-28 14:05:09
|
Horace, Changing the APP_NAME and other properties you mentioned should not have caused any problems. Most likely something else was modified it the latest script version that resolved your problem. Without the version you were using, it is hard to say what that would have been. Within the Java application, you can call WrapperManager.isLaunchedAsService() to find out whether or not the Wrapper is running as a service. On UNIX, this flag is true if the wrapper is run as a daemon. Hope that helps, Cheers, Leif Horace Pinker wrote: > leif, > > thank you for your ultra fast response :D > > i now use the svn version of your script. > > i turned out, that i made some changes that caused the problem: > > # Application > APP_NAME="@server@" > APP_LONG_NAME="@my server@" > # Wrapper > WRAPPER_CMD="./wrapper" > > now works perfectly, while > > # Application > APP_NAME="server" > APP_LONG_NAME="my server" > # Wrapper > WRAPPER_CMD="./wrapper" > > did not work. > > btw .... is there a way to find out if the application was started as > a nt service / linux daemon in contrast to console? currently i > specify '-server' as an parameter to the application but it would be > great to decide this without any parameter. i use the method 1 for > integration. > > last but not least: keep up the great work - wrapper is fantastic! :D > > cheers, > horace > > > ----- Original Message ---- > From: Leif Mortenson <le...@ta...> > To: wra...@li... > Sent: Friday, September 28, 2007 2:24:19 PM > Subject: Re: [Wrapper-user] centos5 - Can't make old wrapper daemon go > away > > Horace, > What version of the Wrapper are you using? I was working with a > customer up until a couple months ago working with CentOS and > it was working perfectly. That was using the latest script out of > SVN though: > http://wrapper.svn.sourceforge.net/viewvc/*checkout*/wrapper/trunk/wrapper/src/bin/sh.script.in > > For some reason the value of $WRAPPER_CMD is not being found in > the output of your ps command. > > Can you run this and then post the results: > > echo $WRAPPER_CMD > echo `$PSEXE -ww -p $pid -o args` > > That should make the cause clear. > > Cheers, > Leif > > Horace Pinker wrote: > > > > i ran into a simliar problem like mark leone some months ago: > > > http://www.nabble.com/Can%27t-make-old-wrapper-daemon-go-away-tf3346234.html#a9353225. > > > > however, i run the script on a fresh centos5 installation. but just to > > be sure i added the -ww in my script, too. > > > > actually i found that the getpid() function always leads to a deletion > > of the pid file, so i can not use the script to stop/status/restart a > > service. > > > > i put in some echo statements to narrow the problem. > > > > have a look at this code: > > > > ... > > pidtest=`$PSEXE -ww -p $pid -o args | grep > > "$WRAPPER_CMD" | tail -1` > > echo "1" > > echo `$PSEXE -ww -p $pid -o args` > > echo "2" > > echo `$PSEXE -ww -p $pid -o args | grep "$WRAPPER_CMD"` > > echo "3" > > echo `$PSEXE -ww -p $pid -o args | grep "$WRAPPER_CMD" > > | tail -1` > > echo "4" > > echo "$pidtest" > > echo "4" > > .... > > > > only between 1 and 2 there will be any output. in the moment the > > result of ps is piped to the grep command there is no longer any > > output. so especially $pidtest ist empty which leads to a deletion of > > the pid file and so the script does not work at all. > > > > any thoughts? |