• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Running two instatnces of Tomcat3.2.2 on single machine

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I tried to find out the way for running multiple instances of Tomcat server 3.2.2 on same machine.
Can anybody tell me,Is this possible ?
And If possible can you tell me the way how to do it.
Thanking in advance,
Regards,
Kedar
 
Saloon Keeper
Posts: 25477
180
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
Main thing you need to do is set up a second copy of the system with a server.xml file that uses a different tcp/ip port. Otherwise the second Tomcat will attempt to start, find the port in use, and shut down.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Multiple tomcats on a single machine:-
consider two tomcats runing at different ports say 8009 and 7009.(ajp12 or ajp13 ports)
In the tomcat/conf/modjk.conf map ur context to a new worker thread, say newajp12 (or) newajp13.
JkMount /new/* newajp12
JkMount /new/*.jsp newajp12
JkMount /new/servlet/* newajp12
Now include this worker thread in tomcat/conf/worker.properties file. This worker thread will listen to the port where the second tomcat is runing, in this case 7009.
worker.ajp12.port=8009
worker.ajp12.host=localhost
worker.ajp12.type=ajp12
[Add following lines]
worker.newajp12.port=7009
worker.newajp12.host=localhost
worker.newajp12.type=ajp12
I think this should work out
Note:
[a] The second tomcat can be stopped and started independently, whereas stopping of first tomcat wuld stop the second also. In this way u can configure as 3 or more tomcats.
[b] The directories specified may vary according to tomcat versions.
 
Tim Holloway
Saloon Keeper
Posts: 25477
180
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
As far as I know, there's no reason why one Tomcat should be dependent on another. I don't have the full ajp connector syntax, but I believe the actual process involves defining named ajp connectors in the apache config file - which will have to include the port IDs. On the tomcat side, EACH tomcat requires its own config files, and the port ID is changed accordingly in each Tomcat's workers.properties file.
I think the confusion comes from that in the distribution, the basic workers.properties shows one ajp12 connector and one ajp13 connector FOR THAT SERVER.
Tomcat 4 has a different setup.
 
Hang a left on main. Then read this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic