'Orphaned' Process on AIX

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

'Orphaned' Process on AIX

Gareth Steyn

Hi,

 

I currently have an issue that has got me stumped.

 

We installed the Java Service Wrapper in an AIX environment and everything was going well until we found a bug in our own code. Upon finding the code, we fixed it, tested and went  back into production.

But once we were in production, the bug still seemed to be present. This was quite surprising, as the new release passed the test cases. I asked our client’s AIX team to stop the service in the interim while we figure out what was wrong.

 

Now this is where it gets weird… After stopping the service, it seemed as though the service was still running. We knew this because we use the service to check our web application’s mail table to send reminders to users, among other processes.

All our users were still receiving mails from the service which is why I’m certain that there is still a process running the service.

 

What I think happened was that when one of the AIX team members updated the buggy service release, he didn’t stop the service using the shell command and merely deleted the files and then copied the new files overs.

We’ve tried to find the process but unfortunately we aren’t able to find the process. I’ve tried looking for the service name and the JVM that is used for the service, but nothing.

 

Is there something I’m missing? Any assistance will be appreciated.

 

Details:

AIX version: 6100-03-09-1112

Wrapper version: Community Edition 3.3.3

 

Attached is a zip file containing the wrapper.conf file and a shell file that is used to start and stop the service within AIX.

 

Kind Regards,

Gareth-Steyn

The contents of the email is subject to a disclaimer which can be found here.

 


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Wrapper-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Wrapper Files.zip (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 'Orphaned' Process on AIX

Leif Mortenson-3
Gareth,
The UNIX shell script checks for the existence of a pid file (located in the bin directory by default) to decide whether or not the application is currently running.
If you delete that file then install a new one the new script will have no way of telling that the process is still somehow running.  This would mean that you probably launched two instances.

To kill it, you will need to do a "ps -Al" and find the wrapper process.  simply do a "kill PID" using its pid.  And that wrapper should shutdown cleanly.

If this is something that you are worried about happening again, then in the script disable signals.  This will tell the wrapper to trigger its shutdown when an anchor file is deleted.  If the user ever deletes the anchor file again then the Wrapper will shut itself down within seconds.

Cheers,
Leif



On Wed, Apr 16, 2014 at 5:57 PM, Gareth Steyn <[hidden email]> wrote:

Hi,

 

I currently have an issue that has got me stumped.

 

We installed the Java Service Wrapper in an AIX environment and everything was going well until we found a bug in our own code. Upon finding the code, we fixed it, tested and went  back into production.

But once we were in production, the bug still seemed to be present. This was quite surprising, as the new release passed the test cases. I asked our client’s AIX team to stop the service in the interim while we figure out what was wrong.

 

Now this is where it gets weird… After stopping the service, it seemed as though the service was still running. We knew this because we use the service to check our web application’s mail table to send reminders to users, among other processes.

All our users were still receiving mails from the service which is why I’m certain that there is still a process running the service.

 

What I think happened was that when one of the AIX team members updated the buggy service release, he didn’t stop the service using the shell command and merely deleted the files and then copied the new files overs.

We’ve tried to find the process but unfortunately we aren’t able to find the process. I’ve tried looking for the service name and the JVM that is used for the service, but nothing.

 

Is there something I’m missing? Any assistance will be appreciated.

 

Details:

AIX version: 6100-03-09-1112

Wrapper version: Community Edition 3.3.3

 

Attached is a zip file containing the wrapper.conf file and a shell file that is used to start and stop the service within AIX.

 

Kind Regards,

Gareth-Steyn

The contents of the email is subject to a disclaimer which can be found here.

 



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Wrapper-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wrapper-user
Reply | Threaded
Open this post in threaded view
|

Re: 'Orphaned' Process on AIX

Gareth Steyn

Hi,

 

Thanks so much for the feedback, I will definitely do that for future releases.

 

I sent a reply yesterday, but it still needs to be approved by a moderator due to a size violation. The reason for that is due to me attaching some files which contain the processes running on the server.

 

My original mail:

Regarding finding and killing the process, we’ve ran the following shell command: ‘ps –ef’ to list all the processes, but unfortunately I wasn’t able to find the process.

I’ve attached the processes from both production servers for reference.”

 

I guess the only option I have left is to try and track down this process somehow…

 

Kind Regards,

Gareth Steyn

 

From: Leif Mortenson [mailto:[hidden email]]
Sent: 16 April 2014 11:32 AM
To: Wrapper User List
Subject: Re: [Wrapper-user] 'Orphaned' Process on AIX

 

Gareth,

The UNIX shell script checks for the existence of a pid file (located in the bin directory by default) to decide whether or not the application is currently running.

If you delete that file then install a new one the new script will have no way of telling that the process is still somehow running.  This would mean that you probably launched two instances.

To kill it, you will need to do a "ps -Al" and find the wrapper process.  simply do a "kill PID" using its pid.  And that wrapper should shutdown cleanly.

If this is something that you are worried about happening again, then in the script disable signals.  This will tell the wrapper to trigger its shutdown when an anchor file is deleted.  If the user ever deletes the anchor file again then the Wrapper will shut itself down within seconds.

Cheers,
Leif

 

 

On Wed, Apr 16, 2014 at 5:57 PM, Gareth Steyn <[hidden email]> wrote:

Hi,

 

I currently have an issue that has got me stumped.

 

We installed the Java Service Wrapper in an AIX environment and everything was going well until we found a bug in our own code. Upon finding the code, we fixed it, tested and went  back into production.

But once we were in production, the bug still seemed to be present. This was quite surprising, as the new release passed the test cases. I asked our client’s AIX team to stop the service in the interim while we figure out what was wrong.

 

Now this is where it gets weird… After stopping the service, it seemed as though the service was still running. We knew this because we use the service to check our web application’s mail table to send reminders to users, among other processes.

All our users were still receiving mails from the service which is why I’m certain that there is still a process running the service.

 

What I think happened was that when one of the AIX team members updated the buggy service release, he didn’t stop the service using the shell command and merely deleted the files and then copied the new files overs.

We’ve tried to find the process but unfortunately we aren’t able to find the process. I’ve tried looking for the service name and the JVM that is used for the service, but nothing.

 

Is there something I’m missing? Any assistance will be appreciated.

 

Details:

AIX version: 6100-03-09-1112

Wrapper version: Community Edition 3.3.3

 

Attached is a zip file containing the wrapper.conf file and a shell file that is used to start and stop the service within AIX.

 

Kind Regards,

Gareth-Steyn

The contents of the email is subject to a disclaimer which can be found here.

 

 


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Wrapper-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wrapper-user