• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Mutiple Instances of a server

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey All,

I am trying to run two servers through one tomcat. I want one on 8080 and one on 9090. In order to accomplish this I copped the all the page information and pasted it below then changed the main port from 8080 to 9090, the shutdown port from 8005 to 9005 and the ajp one from 8009 to 9009. I restarted tomcat and now it recoginzes the 8080 but when I change it to 9090 its consistently giving me a page not found!?

Thanks and HELP,
John
 
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it Windows or Linux platform? If it is Windows, how did you install Tomcat? There are the steps for non Windows Service Installer Running multiple Tomcat instances on Windows
 
John Lark
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am running on windows server 2003 & 2008. I am using the following Install File:
apache-tomcat-6.0.26.exe.
 
John Lark
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would it be possible to do it through the server.xml? This is for a program that is going to install itself, the easiest approach seems to me it would be to rewrite the xml file?
 
Saloon Keeper
Posts: 23409
159
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

John Lark wrote:Would it be possible to do it through the server.xml? This is for a program that is going to install itself, the easiest approach seems to me it would be to rewrite the xml file?



There are 2 Tomcat environment variables: CATALINA_HOME and CATALINA_BASE. In most cases, they point to the same place, but if you want to run multiple instances of Tomcat, you set CATALINA_BASE to a shared copy of Tomcat, and create a separate CATALINA_HOME for each one. CATALINA_HOME contains the webapps, work, temp, and conf directories. CATALINA_BASE contains the sharable files, such as the bin and lib directories.

In an environment where tomcat is controlled via a command-line interface, you'd set up the environment variables before you invoked the catalina.bat start function for each Tomcat. I don't know how to to that using the Windows Service Manager, however, since I rarely run Tomcat on Windows, and usually do it from the command prompt when I do.
 
John Lark
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As I am learning more about the subject (John <-- Tomcat Newbie) I am asking for something different then what I wanted . I am not looking to make multiple Instances of Tomcat I am looking to run multiple Servers within one Instance of Tomcat, if possible(no one has said it isn't yet). Although, I really have appreciated the information so far its helping me to understand parts of the this that I am not comprehending.

Thanks,
John
 
Tim Holloway
Saloon Keeper
Posts: 23409
159
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

John Lark wrote:As I am learning more about the subject (John <-- Tomcat Newbie) I am asking for something different then what I wanted . I am not looking to make multiple Instances of Tomcat I am looking to run multiple Servers within one Instance of Tomcat. Although, I really have appreciated the information so far its helping me to understand parts of the this that I am not comprehending.

Thanks,
John



Tomcat is a server. So each "server" is an instance.

I think what you're actually looking for is Virtual Hosts. One Tomcat server instance can support multiple virtual hosts, and, in fact, we just had a nice discussion on how to set up multiple virtual hosts in Tomcat. Check this forum's recent history.
 
rubbery bacon. rubbery tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic