|
From: Leif M. <lei...@ta...> - 2011-08-30 00:05:20
|
Gary, The Wrapper will produce the pid file on startup but then it doesn't do anything with it other than to delete it when the Wrapper process terminates. It is possible for other processes to delete the file on UNIX. This is going to be a problem common to all applications. To protect against this, it is possible and advised to set up file permissions in such a way that only processes with access can delete the file. You can control the permissions of the PID file and other files using wrapper.pidfile.umask or more general wrapper.umask properties: http://wrapper.tanukisoftware.com/doc/english/prop-umask.html Unfortunately, I am not able to say what is deleting the file other than to say that I am sure the Wrapper process is not what is doing it. Are you also using the 3.5.7 version of the shell script? The following issues were fixed in 3.5.7. The second could be the cause of your problem? Fixed in 3.5.7: * "Fix a problem in the shell script that was preventing the script from starting the Wrapper correctly if a file or directory existed in the current working directory which was one character in length. This was only a problem when the delta-pack naming of the Wrapper was used. This was easy to reproduce on AIX systems on system restart because a "u" directory exists in the root directory by default. This had been a problem since 3.4.0 when it was introduced as a fix to a Solaris problem. The root cause was a missing set of quotes in the tr command." * "Fix a problem in the shell script that was preventing the script from finding the running Wrapper process when it was started when the working directory was in the same directory as the Wrapper binary, but queried later from another location. It would also fail if it was started from another location, but then queried from the location of the Wrapper. This was introduced in 3.5.6 when the script stopped changing the working directory in the script." Cheers, Leif On Tue, Aug 30, 2011 at 8:50 AM, Chaur (Gary) Wu <gw...@vm...> wrote: > Hi Christian, > > Thank you for the reply. The version I'm using is profession edition 64-bit 3.5.7. The OS I'm using is SUSE Linux version 2.6.32.43-0.4-default. > > No, I'm referring to wrapper.pidfile, not wrapper.java.pidfile. The wrapper.pid file sometimes becomes missing when the wrapper process is still running. I don't know the steps to take to reproduce the issue. I only saw that happen a few times on some developers' and testers' machines. > > Any ideas/suggestions? > > Thanks, > Gary > > > > -----Original Message----- > From: Christian Mueller [mailto:chr...@ta...] > Sent: Sunday, August 28, 2011 6:32 PM > To: wra...@li... > Subject: Re: [Wrapper-user] pid file becomes missing > > Gary, > > what version of the Wrapper are you using? Also what platform are you running? > > I think you are referring to the wrapper.java.pidfile, so this file > gets deleted by the Wrapper everytime the Wrapper detects that the > Java Process has been terminated. Once the application has been > restarted, the Wrapper will create a new file for the new pid (same > filename though). > At what times have you seen the PID file being missing? > > > Thank you, > Christian > > On Sun, Aug 28, 2011 at 4:56 PM, Chaur (Gary) Wu <gw...@vm...> wrote: >> Hi, >> >> >> >> I use Tanuki wrapper to wrap a Tomcat app. I notice that sometimes the PID >> file will become missing while the wrapper process is still running. Since I >> have scripts that read the process id from the PID file, the scripts don't >> work properly because of the missing PID file. I tried to find out what >> would cause the PID file to become missing but couldn't find any clue. Any >> idea/suggestion? >> >> >> >> Thanks, >> >> Chaur |