• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Duplicate instance of Tomcat

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh. Missed the "parent process ID" column there. The option I use does a graphical tree,
 
I didn't like the taste of tongue and it didn't like the taste of me. I will now try this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic