File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Duplicate instance of Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Duplicate instance of Tomcat" Watch "Duplicate instance of Tomcat" New topic
Author

Duplicate instance of Tomcat

Raghuram Duraisamy
Greenhorn

Joined: Dec 27, 2009
Posts: 5
Hi,

My web app runs on tomcat 5.5.4. One day it was not responding and when I checked, found that two tomcat processes were running on the same port.


28673 was the original tomcat process and it was started at 21:35 PM on the earlier day. I did not find any info from the logs. Anyone has any idea as to how the child process (9653) spawned?

Thanks,
Raghuram
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16136
    
  21

Raghuram Duraisamy wrote:Hi,

My web app runs on tomcat 5.5.4. One day it was not responding and when I checked, found that two tomcat processes were running on the same port.


No they weren't. Not if they were, in fact 2 distinct instances of Tomcat. One was running on the port, the other was running, but the port-listening part failed to startup, so it's a deaf cat, so to speak. That's because the OS won't let a port have more than one owner. Note that the TIME for process 9653 is 0.

If you're using Linux, the "ps axf" command will show the hierarchy of processes and thereby give a clue as to who spawned whom. In Windows, there's a GUI tool that can help, but it doesn't come with Windows and I don't remember its name or where you can get it from.

If it turns out that 9653 is a child of 28673 and not an accidental duplicate start of Tomcat, you'll need to enlist a debugger or similar tool to track down what Java code is executing. That should give a clue on where it came from.


Customer surveys are for companies who didn't pay proper attention to begin with.
Raghuram Duraisamy
Greenhorn

Joined: Dec 27, 2009
Posts: 5
Hi Tim,

The output that I posted in Update#1 is of "ps -aef" command. It is clear from the output that 9563 is child of 28673.

you'll need to enlist a debugger or similar tool to track down what Java code is executing

Btw, the issue happened only once so far. Will try debugger if the issue recurs.

Thanks,
Raghuram
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16136
    
  21

Oh. Missed the "parent process ID" column there. The option I use does a graphical tree,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Duplicate instance of Tomcat