Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Duplicate instance of Tomcat

 
Raghuram Duraisamy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18156
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Raghuram Duraisamy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18156
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh. Missed the "parent process ID" column there. The option I use does a graphical tree,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic