You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by dOE <do...@gmail.com> on 2008/10/29 14:06:57 UTC

How can I hard code the IP address on a single server with multiple Tomcat instances.

I have a server that I am hosting multiple Tomcat servers from, and the
issue I am running into is... - I have multiple IP's bound to the servers
interface, Tomcat _1 has port 8080 specified as its connector port.  The
second Tomcat_2 has port 8180 set as its conector port in its server.xml,
but regardless of these custom ports I am only able to reach Tomcat_1
through 8080, and 8180.  Is it possible to hard code the IP you want that
particular instance to listen on?

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by Steve Ochani <oc...@ncc.edu>.
Send reply to:	Tomcat Users List <us...@tomcat.apache.org>
Date sent:	Wed, 29 Oct 2008 09:06:57 -0400
From:	dOE <do...@gmail.com>
Send reply to:	doepain@gmail.com
To:	Tomcat User-List <us...@tomcat.apache.org>
Subject:	How can I hard code the IP address on a single server with multiple
	Tomcat instances.

> I have a server that I am hosting multiple Tomcat servers from, and
> the issue I am running into is... - I have multiple IP's bound to the
> servers interface, Tomcat _1 has port 8080 specified as its connector
> port.  The second Tomcat_2 has port 8180 set as its conector port in
> its server.xml, but regardless of these custom ports I am only able to
> reach Tomcat_1 through 8080, and 8180.  Is it possible to hard code
> the IP you want that particular instance to listen on?
> 

address attribute in connector

http://tomcat.apache.org/tomcat-6.0-doc/config/http.html


-Steve O.



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by dOE <do...@gmail.com>.
I was FINALLY able to make this work using the single isapi.dll
tomcat_connector, and two separate Tomcat instances on the same host.

I swapped the server.xml I was using with a default one, and I followed the
information in the LinuxJournal url below, and only changed what was
mentioned (essentially only ports 8005 8080 8009) and that was all I needed
to do to get the 2nd instance up on the same host.

I was trying to do to much, and be to granule on my configs causing things
to not work.

Thanks to all who were patient enough to help out.

On Thu, Oct 30, 2008 at 7:07 AM, Serge Fonville <se...@gmail.com>wrote:

> If you have two completely separate installations, you should specify a
> catalina home in the batch file that starts the instance, if just the config
> an apps are separate, specify a catalina base in the startup fileAlso you
> could use http://www.linuxjournal.com/article/8561 for a more step by step
> approach to configuring multiple instances
> You should be able to create a service for each instance (specify the
> service name with the service.bat)
> I found all the links so far by googling for 'tomcat multiple instances
> windows' (without the quotes)
>
> Regards,
>
> Serge Fonville
>
> On Thu, Oct 30, 2008 at 12:37 PM, dOE <do...@gmail.com> wrote:
>
>> Thanks for the reply Serge,
>>
>> On Win32 I have the CATALINA_HOME set to pont to where Tomcat is
>> installed,
>> and were server1 resides.  To configure CATALINA_BASE the same way, but
>> pont
>> to another directory that ONLY contains *conf*, *webapps*, *logs*, *temp*,
>> and *work*?  What would need to be in the conf - *server.xml*, *web.xml*,
>> and possibly *tomcat-users.xml*?
>>
>> On Thu, Oct 30, 2008 at 3:45 AM, Serge Fonville <serge.fonville@gmail.com
>> >wrote:
>>
>> > You can define a CATALINA_HOME/BASE in the startup
>> file(catalina.bat/sh).
>> > (all it does now is use the global environment variable because it isn't
>> > specified inside the file)You could define a HOME1 and HOME2 variable,
>> but
>> > that would require a lot more changes inside the startup file.
>> >
>> > To be sure, specify it near the top (before used)
>> > That way the alternate value only applies inside that instance
>> >
>> > Does this help?
>> >
>> > Regards,
>> >
>> > Serge Fonville
>> >
>> >
>> > On Wed, Oct 29, 2008 at 8:16 PM, dOE <do...@gmail.com> wrote:
>> >
>> >> Guys, please don't give up on me yet, I am going to go read up on the
>> >> documentation tonight to see what else I need to do to get this site
>> >> working.
>> >>
>> >> I think my focus will be more for the Win32 rather 'nix because it more
>> of
>> >> a
>> >> priority.
>> >>
>> >> On Wed, Oct 29, 2008 at 2:17 PM, dOE <do...@gmail.com> wrote:
>> >>
>> >> > Now this needs to be replicated on a Win32 system as well following
>> this
>> >> > how can this be done?  The service can not be started by a
>> command-line
>> >> > script (ideally).
>> >> >
>> >> >
>> >> > On Wed, Oct 29, 2008 at 2:02 PM, Hassan Schroeder <
>> >> > hassan.schroeder@gmail.com> wrote:
>> >> >
>> >> >> On Wed, Oct 29, 2008 at 10:23 AM, dOE <do...@gmail.com> wrote:
>> >> >>
>> >> >> > perhaps this is where my problem is at this stage.  I would need a
>> >> >> > "Catalina_Home2" and have that pointing to *server2 *...? I am
>> >> guessing,
>> >> >> but
>> >> >> > would this mean I need to edit every mention of Catalina_Home to
>> >> >> > Catalina_Home2 in the *.properties files?
>> >> >>
>> >> >> No, just start the second instance from a shell with the appropriate
>> >> >> value for CATALINA_HOME defined.
>> >> >>
>> >> >> --
>> >> >> Hassan Schroeder ------------------------
>> hassan.schroeder@gmail.com
>> >> >>
>> >> >
>> >> >
>> >>
>> >
>> >
>>
>
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by Serge Fonville <se...@gmail.com>.
If you have two completely separate installations, you should specify a
catalina home in the batch file that starts the instance, if just the config
an apps are separate, specify a catalina base in the startup fileAlso you
could use http://www.linuxjournal.com/article/8561 for a more step by step
approach to configuring multiple instances
You should be able to create a service for each instance (specify the
service name with the service.bat)
I found all the links so far by googling for 'tomcat multiple instances
windows' (without the quotes)

Regards,

Serge Fonville

On Thu, Oct 30, 2008 at 12:37 PM, dOE <do...@gmail.com> wrote:

> Thanks for the reply Serge,
>
> On Win32 I have the CATALINA_HOME set to pont to where Tomcat is installed,
> and were server1 resides.  To configure CATALINA_BASE the same way, but
> pont
> to another directory that ONLY contains *conf*, *webapps*, *logs*, *temp*,
> and *work*?  What would need to be in the conf - *server.xml*, *web.xml*,
> and possibly *tomcat-users.xml*?
>
> On Thu, Oct 30, 2008 at 3:45 AM, Serge Fonville <serge.fonville@gmail.com
> >wrote:
>
> > You can define a CATALINA_HOME/BASE in the startup file(catalina.bat/sh).
> > (all it does now is use the global environment variable because it isn't
> > specified inside the file)You could define a HOME1 and HOME2 variable,
> but
> > that would require a lot more changes inside the startup file.
> >
> > To be sure, specify it near the top (before used)
> > That way the alternate value only applies inside that instance
> >
> > Does this help?
> >
> > Regards,
> >
> > Serge Fonville
> >
> >
> > On Wed, Oct 29, 2008 at 8:16 PM, dOE <do...@gmail.com> wrote:
> >
> >> Guys, please don't give up on me yet, I am going to go read up on the
> >> documentation tonight to see what else I need to do to get this site
> >> working.
> >>
> >> I think my focus will be more for the Win32 rather 'nix because it more
> of
> >> a
> >> priority.
> >>
> >> On Wed, Oct 29, 2008 at 2:17 PM, dOE <do...@gmail.com> wrote:
> >>
> >> > Now this needs to be replicated on a Win32 system as well following
> this
> >> > how can this be done?  The service can not be started by a
> command-line
> >> > script (ideally).
> >> >
> >> >
> >> > On Wed, Oct 29, 2008 at 2:02 PM, Hassan Schroeder <
> >> > hassan.schroeder@gmail.com> wrote:
> >> >
> >> >> On Wed, Oct 29, 2008 at 10:23 AM, dOE <do...@gmail.com> wrote:
> >> >>
> >> >> > perhaps this is where my problem is at this stage.  I would need a
> >> >> > "Catalina_Home2" and have that pointing to *server2 *...? I am
> >> guessing,
> >> >> but
> >> >> > would this mean I need to edit every mention of Catalina_Home to
> >> >> > Catalina_Home2 in the *.properties files?
> >> >>
> >> >> No, just start the second instance from a shell with the appropriate
> >> >> value for CATALINA_HOME defined.
> >> >>
> >> >> --
> >> >> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> >> >>
> >> >
> >> >
> >>
> >
> >
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by dOE <do...@gmail.com>.
Thanks for the reply Serge,

On Win32 I have the CATALINA_HOME set to pont to where Tomcat is installed,
and were server1 resides.  To configure CATALINA_BASE the same way, but pont
to another directory that ONLY contains *conf*, *webapps*, *logs*, *temp*,
and *work*?  What would need to be in the conf - *server.xml*, *web.xml*,
and possibly *tomcat-users.xml*?

On Thu, Oct 30, 2008 at 3:45 AM, Serge Fonville <se...@gmail.com>wrote:

> You can define a CATALINA_HOME/BASE in the startup file(catalina.bat/sh).
> (all it does now is use the global environment variable because it isn't
> specified inside the file)You could define a HOME1 and HOME2 variable, but
> that would require a lot more changes inside the startup file.
>
> To be sure, specify it near the top (before used)
> That way the alternate value only applies inside that instance
>
> Does this help?
>
> Regards,
>
> Serge Fonville
>
>
> On Wed, Oct 29, 2008 at 8:16 PM, dOE <do...@gmail.com> wrote:
>
>> Guys, please don't give up on me yet, I am going to go read up on the
>> documentation tonight to see what else I need to do to get this site
>> working.
>>
>> I think my focus will be more for the Win32 rather 'nix because it more of
>> a
>> priority.
>>
>> On Wed, Oct 29, 2008 at 2:17 PM, dOE <do...@gmail.com> wrote:
>>
>> > Now this needs to be replicated on a Win32 system as well following this
>> > how can this be done?  The service can not be started by a command-line
>> > script (ideally).
>> >
>> >
>> > On Wed, Oct 29, 2008 at 2:02 PM, Hassan Schroeder <
>> > hassan.schroeder@gmail.com> wrote:
>> >
>> >> On Wed, Oct 29, 2008 at 10:23 AM, dOE <do...@gmail.com> wrote:
>> >>
>> >> > perhaps this is where my problem is at this stage.  I would need a
>> >> > "Catalina_Home2" and have that pointing to *server2 *...? I am
>> guessing,
>> >> but
>> >> > would this mean I need to edit every mention of Catalina_Home to
>> >> > Catalina_Home2 in the *.properties files?
>> >>
>> >> No, just start the second instance from a shell with the appropriate
>> >> value for CATALINA_HOME defined.
>> >>
>> >> --
>> >> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
>> >>
>> >
>> >
>>
>
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by Serge Fonville <se...@gmail.com>.
You can define a CATALINA_HOME/BASE in the startup file(catalina.bat/sh).
(all it does now is use the global environment variable because it isn't
specified inside the file)You could define a HOME1 and HOME2 variable, but
that would require a lot more changes inside the startup file.

To be sure, specify it near the top (before used)
That way the alternate value only applies inside that instance

Does this help?

Regards,

Serge Fonville

On Wed, Oct 29, 2008 at 8:16 PM, dOE <do...@gmail.com> wrote:

> Guys, please don't give up on me yet, I am going to go read up on the
> documentation tonight to see what else I need to do to get this site
> working.
>
> I think my focus will be more for the Win32 rather 'nix because it more of
> a
> priority.
>
> On Wed, Oct 29, 2008 at 2:17 PM, dOE <do...@gmail.com> wrote:
>
> > Now this needs to be replicated on a Win32 system as well following this
> > how can this be done?  The service can not be started by a command-line
> > script (ideally).
> >
> >
> > On Wed, Oct 29, 2008 at 2:02 PM, Hassan Schroeder <
> > hassan.schroeder@gmail.com> wrote:
> >
> >> On Wed, Oct 29, 2008 at 10:23 AM, dOE <do...@gmail.com> wrote:
> >>
> >> > perhaps this is where my problem is at this stage.  I would need a
> >> > "Catalina_Home2" and have that pointing to *server2 *...? I am
> guessing,
> >> but
> >> > would this mean I need to edit every mention of Catalina_Home to
> >> > Catalina_Home2 in the *.properties files?
> >>
> >> No, just start the second instance from a shell with the appropriate
> >> value for CATALINA_HOME defined.
> >>
> >> --
> >> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> >>
> >
> >
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by dOE <do...@gmail.com>.
Guys, please don't give up on me yet, I am going to go read up on the
documentation tonight to see what else I need to do to get this site
working.

I think my focus will be more for the Win32 rather 'nix because it more of a
priority.

On Wed, Oct 29, 2008 at 2:17 PM, dOE <do...@gmail.com> wrote:

> Now this needs to be replicated on a Win32 system as well following this
> how can this be done?  The service can not be started by a command-line
> script (ideally).
>
>
> On Wed, Oct 29, 2008 at 2:02 PM, Hassan Schroeder <
> hassan.schroeder@gmail.com> wrote:
>
>> On Wed, Oct 29, 2008 at 10:23 AM, dOE <do...@gmail.com> wrote:
>>
>> > perhaps this is where my problem is at this stage.  I would need a
>> > "Catalina_Home2" and have that pointing to *server2 *...? I am guessing,
>> but
>> > would this mean I need to edit every mention of Catalina_Home to
>> > Catalina_Home2 in the *.properties files?
>>
>> No, just start the second instance from a shell with the appropriate
>> value for CATALINA_HOME defined.
>>
>> --
>> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
>>
>
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by dOE <do...@gmail.com>.
Now this needs to be replicated on a Win32 system as well following this how
can this be done?  The service can not be started by a command-line script
(ideally).

On Wed, Oct 29, 2008 at 2:02 PM, Hassan Schroeder <
hassan.schroeder@gmail.com> wrote:

> On Wed, Oct 29, 2008 at 10:23 AM, dOE <do...@gmail.com> wrote:
>
> > perhaps this is where my problem is at this stage.  I would need a
> > "Catalina_Home2" and have that pointing to *server2 *...? I am guessing,
> but
> > would this mean I need to edit every mention of Catalina_Home to
> > Catalina_Home2 in the *.properties files?
>
> No, just start the second instance from a shell with the appropriate
> value for CATALINA_HOME defined.
>
> --
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by Hassan Schroeder <ha...@gmail.com>.
On Wed, Oct 29, 2008 at 10:23 AM, dOE <do...@gmail.com> wrote:

> perhaps this is where my problem is at this stage.  I would need a
> "Catalina_Home2" and have that pointing to *server2 *...? I am guessing, but
> would this mean I need to edit every mention of Catalina_Home to
> Catalina_Home2 in the *.properties files?

No, just start the second instance from a shell with the appropriate
value for CATALINA_HOME defined.

-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by dOE <do...@gmail.com>.
If I were to install tomcat in /approot/tomcat (this would be the
distribution directory that contains ../bin, and then I created
/approot/sites/server1, and ...server2.  I know enough that catalina_home
variable would need to point to /approot/tomcat/, but where would I point my
catalina_base variables?  I have more than one instance so I would need two?
catalina_base? ...Or is tomcat smart enough to see that there is a separate
server.xml, and web.xml files and another set of the following directories
conf, webapps, logs, temp, and work directories?

On Wed, Oct 29, 2008 at 1:23 PM, dOE <do...@gmail.com> wrote:

> I read the article, and I had already done everything it discussed.  Not to
> clear on the "Catalina_Base" since I have to separate tomcats and most of
> the configurations are using relative paths.  I do have an environmental
> variable set for "Catalina_Home" on the server that points to *server1 *installation
> perhaps this is where my problem is at this stage.  I would need a
> "Catalina_Home2" and have that pointing to *server2 *...? I am guessing,
> but would this mean I need to edit every mention of Catalina_Home to
> Catalina_Home2 in the *.properties files?
>
> Assuming I have tomcat installed in /approot/tomcat1 and /approot/tomcat2
> each with their own ../bin, ../conf, ../worker, ../logs, ../temp
> directories.  How could I make use of Catalina_Home?, or Catalina_Base
> variables?
>
> On Wed, Oct 29, 2008 at 12:37 PM, dOE <do...@gmail.com> wrote:
>
>> I do not have separate bases for each instance, I will review the info in
>> the link now.
>>
>>
>> (apologize for the caps use)
>>
>>
>> On Wed, Oct 29, 2008 at 12:34 PM, Serge Fonville <
>> serge.fonville@gmail.com> wrote:
>>
>>> You seem to be missing libraries.Have you defined separate
>>> catalina_bases for each instance
>>> and are all the required libs in the classpath
>>> Have you read "
>>> http://azeditech.com/tomcat/multiple-tomcat-instances.html"<http://azeditech.com/tomcat/multiple-tomcat-instances.html>
>>>
>>> Any additional information about your environment would be nice.
>>>
>>> Regards,
>>>
>>> Serge Fonville
>>>
>>> P.s. just a note, please do not use caps, it greatly reduces the
>>> readability ;-)
>>>
>>> On Wed, Oct 29, 2008 at 5:19 PM, dOE <do...@gmail.com> wrote:
>>>
>>>> You say the page not found errors are good...
>>>> *IT IS GOOD BECAUSE IT TELLS ME THE SERVER IS BEING HIT.  PRIOR TO YOUR
>>>> HELP
>>>> THE WRONG SERVER WAS OPENING ON ALL PORTS AND IP's NO LONGER THE CASE.
>>>> *
>>>> The configuration of the connectors looks ok
>>>>
>>>> Are there any errors in the logs and have you configured an identifiable
>>>> error page for both instances? (<error-page> inside web.xml)
>>>>
>>>> *THE ERROR LOG IS "BARK" ABOUT: *StandardContext[/balancer]Exception
>>>> starting filter BalancerFilter  java.lang.NoClassDefFoundError:
>>>> org/apache/commons/digester/Digester* (UNRELATED).   THE SERVER (server
>>>> 2)
>>>> IS NOT SERVING ANY PAGES, TRIED TO VIEW A GIF THROUGH URL AND IT WOULD
>>>> NOT
>>>> LOAD.  HONESTLY DO NOT HAVE THE SKILLS TO FIGURE OUT HOW TO GET
>>>> <ERROR-PAGE>
>>>> TO WORK RIGHT.*
>>>>
>>>> That way you can determine which tomcat is serving the error.
>>>>
>>>> Do the other connectors have an address defined
>>>> *CONNECTORS I ASSUME YOU ARE REFERRING TO ARE PORTS 8009, AND 8109, BOTH
>>>> HAVE ADDRESSES HARD CODED IN SERVER.XML*.
>>>>
>>>> The fact you get a 400 indicates that a tomcat is responding, you now
>>>> only
>>>> have to determine if it is the right one and what causes the error (what
>>>> type of content are you serving, static dynamic)
>>>>
>>>> *I AM SITES ARE ALL JSP PAGES (I BELIEVE THAT TEY ARE ALL DYNAMIC) <not
>>>> a
>>>> web dev>*
>>>>
>>>>
>>>> On Wed, Oct 29, 2008 at 11:03 AM, Serge Fonville
>>>> <se...@gmail.com>wrote:
>>>>
>>>> > You say the page not found errors are good...The configuration of the
>>>> > connectors looks ok
>>>> > Are there any errors in the logs and have you configured an
>>>> identifiable
>>>> > error page for both instances? (<error-page> inside web.xml)
>>>> > That way you can determine which tomcat is serving the error.
>>>> > Do the other connectors have an address defined
>>>> > The fact you get a 400 indicates that a tomcat is responding, you now
>>>> only
>>>> > have to determine if it is the right one and what causes the error
>>>> (what
>>>> > type of content are you serving, static dynamic)
>>>> >
>>>> >
>>>> > Regards,
>>>> >
>>>> > Serge Fonville
>>>> >
>>>> >
>>>> > On Wed, Oct 29, 2008 at 3:49 PM, dOE <do...@gmail.com> wrote:
>>>> >
>>>> >> Hi Serge,
>>>> >>
>>>> >> Below are the values from both of my server.xml files.  I specified
>>>> the
>>>> >> address that the port should listen on, and I am unable to open *
>>>> >> http://192.168.100.2:8080* (GOOD!).  When I attempt to open *
>>>> >> http://192.168.100.2:8180* I get a 400, and
>>>> *http://192.168.100.1:8180*
>>>> >>  the
>>>> >> "request" returns "Page Cannot Be Found"(GOOD!).
>>>> >>
>>>> >> 192.168.100.1 has ports 8080, 8009
>>>> >> 192.168.100.2 has ports 8180, 8109
>>>> >>
>>>> >> The correct ports are open, its just that I can not open the site on
>>>> >> 192.168.100.2 through Tomcat.
>>>> >> Should I have only edited one server.xml, rather than hard coding the
>>>> IP
>>>> >> in
>>>> >> both?
>>>> >>
>>>> >> (Server 1) 192.168.100.1
>>>> >> <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
>>>> >>    <Connector port="8080"
>>>> >>    maxThreads="150"
>>>> >>    minSpareThreads="25"
>>>> >>    maxSpareThreads="75"
>>>> >>    enableLookups="false"
>>>> >>    redirectPort="8443"
>>>> >>    acceptCount="100"
>>>> >>    debug="0"
>>>> >>    connectionTimeout="20000"
>>>> >>    disableUploadTimeout="true"
>>>> >>    address="192.168.100.1" />
>>>> >>
>>>> >> (Server 2) 192.168.100.2
>>>> >> <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 -->
>>>> >>    <Connector port="8180"
>>>> >>    maxThreads="150"
>>>> >>    minSpareThreads="25"
>>>> >>    maxSpareThreads="75"
>>>> >>    enableLookups="false"
>>>> >>    redirectPort="8543"
>>>> >>    acceptCount="100"
>>>> >>    debug="0"
>>>> >>    connectionTimeout="20000"
>>>> >>    disableUploadTimeout="true"
>>>> >>    address="192.168.100.2" />
>>>> >>
>>>> >>
>>>> >>
>>>> >>
>>>> >>
>>>> >>
>>>> >>
>>>> >>
>>>> >>
>>>> >>
>>>> >> On Wed, Oct 29, 2008 at 9:40 AM, Serge Fonville <
>>>> serge.fonville@gmail.com
>>>> >> >wrote:
>>>> >>
>>>> >> > Place inside a <Service> element<Connector port="80"
>>>> protocol="HTTP/1.1"
>>>> >> > connectionTimeout="20000"
>>>> >> >  redirectPort="443"
>>>> >> > address="127.0.0.1"/>
>>>> >> > and the output of netstat contains an entry for 127.0.0.1:80instead of
>>>> >> > the usual 0.0.0.0:80
>>>> >> >
>>>> >> > Regards,
>>>> >> >
>>>> >> > Serge Fonville
>>>> >> >
>>>> >> > On Wed, Oct 29, 2008 at 2:31 PM, dOE <do...@gmail.com> wrote:
>>>> >> >
>>>> >> >> Serge thanks for the reply...
>>>> >> >>
>>>> >> >> so to hard code the IP its just a matter of ONLY adding <Connector
>>>> >> >> address='
>>>> >> >> 192.168.1.1'>  ?
>>>> >> >>
>>>> >> >> The online document site does not give any syntax examples.
>>>> >> >>
>>>> >> >> On Wed, Oct 29, 2008 at 9:17 AM, Serge Fonville <
>>>> >> serge.fonville@gmail.com
>>>> >> >> >wrote:
>>>> >> >>
>>>> >> >> > There is an address attribute inside the connector that
>>>> specifies the
>>>> >> >> > address of the listening socket
>>>> >> >> > http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
>>>> >> >> > http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
>>>> >> >> >
>>>> >> >> > Hope this helps
>>>> >> >> >
>>>> >> >> > Regards,
>>>> >> >> >
>>>> >> >> > Serge Fonville
>>>> >> >> >
>>>> >> >> > On Wed, Oct 29, 2008 at 2:06 PM, dOE <do...@gmail.com> wrote:
>>>> >> >> >
>>>> >> >> >> I have a server that I am hosting multiple Tomcat servers from,
>>>> and
>>>> >> the
>>>> >> >> >> issue I am running into is... - I have multiple IP's bound to
>>>> the
>>>> >> >> servers
>>>> >> >> >> interface, Tomcat _1 has port 8080 specified as its connector
>>>> port.
>>>> >> >>  The
>>>> >> >> >> second Tomcat_2 has port 8180 set as its conector port in its
>>>> >> >> server.xml,
>>>> >> >> >> but regardless of these custom ports I am only able to reach
>>>> >> Tomcat_1
>>>> >> >> >> through 8080, and 8180.  Is it possible to hard code the IP you
>>>> want
>>>> >> >> that
>>>> >> >> >> particular instance to listen on?
>>>> >> >> >>
>>>> >> >> >
>>>> >> >> >
>>>> >> >>
>>>> >> >
>>>> >> >
>>>> >>
>>>> >
>>>> >
>>>>
>>>
>>>
>>
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by dOE <do...@gmail.com>.
I read the article, and I had already done everything it discussed.  Not to
clear on the "Catalina_Base" since I have to separate tomcats and most of
the configurations are using relative paths.  I do have an environmental
variable set for "Catalina_Home" on the server that points to *server1
*installation
perhaps this is where my problem is at this stage.  I would need a
"Catalina_Home2" and have that pointing to *server2 *...? I am guessing, but
would this mean I need to edit every mention of Catalina_Home to
Catalina_Home2 in the *.properties files?

Assuming I have tomcat installed in /approot/tomcat1 and /approot/tomcat2
each with their own ../bin, ../conf, ../worker, ../logs, ../temp
directories.  How could I make use of Catalina_Home?, or Catalina_Base
variables?

On Wed, Oct 29, 2008 at 12:37 PM, dOE <do...@gmail.com> wrote:

> I do not have separate bases for each instance, I will review the info in
> the link now.
>
>
> (apologize for the caps use)
>
>
> On Wed, Oct 29, 2008 at 12:34 PM, Serge Fonville <serge.fonville@gmail.com
> > wrote:
>
>> You seem to be missing libraries.Have you defined separate catalina_bases
>> for each instance
>> and are all the required libs in the classpath
>> Have you read "
>> http://azeditech.com/tomcat/multiple-tomcat-instances.html"<http://azeditech.com/tomcat/multiple-tomcat-instances.html>
>>
>> Any additional information about your environment would be nice.
>>
>> Regards,
>>
>> Serge Fonville
>>
>> P.s. just a note, please do not use caps, it greatly reduces the
>> readability ;-)
>>
>> On Wed, Oct 29, 2008 at 5:19 PM, dOE <do...@gmail.com> wrote:
>>
>>> You say the page not found errors are good...
>>> *IT IS GOOD BECAUSE IT TELLS ME THE SERVER IS BEING HIT.  PRIOR TO YOUR
>>> HELP
>>> THE WRONG SERVER WAS OPENING ON ALL PORTS AND IP's NO LONGER THE CASE.
>>> *
>>> The configuration of the connectors looks ok
>>>
>>> Are there any errors in the logs and have you configured an identifiable
>>> error page for both instances? (<error-page> inside web.xml)
>>>
>>> *THE ERROR LOG IS "BARK" ABOUT: *StandardContext[/balancer]Exception
>>> starting filter BalancerFilter  java.lang.NoClassDefFoundError:
>>> org/apache/commons/digester/Digester* (UNRELATED).   THE SERVER (server
>>> 2)
>>> IS NOT SERVING ANY PAGES, TRIED TO VIEW A GIF THROUGH URL AND IT WOULD
>>> NOT
>>> LOAD.  HONESTLY DO NOT HAVE THE SKILLS TO FIGURE OUT HOW TO GET
>>> <ERROR-PAGE>
>>> TO WORK RIGHT.*
>>>
>>> That way you can determine which tomcat is serving the error.
>>>
>>> Do the other connectors have an address defined
>>> *CONNECTORS I ASSUME YOU ARE REFERRING TO ARE PORTS 8009, AND 8109, BOTH
>>> HAVE ADDRESSES HARD CODED IN SERVER.XML*.
>>>
>>> The fact you get a 400 indicates that a tomcat is responding, you now
>>> only
>>> have to determine if it is the right one and what causes the error (what
>>> type of content are you serving, static dynamic)
>>>
>>> *I AM SITES ARE ALL JSP PAGES (I BELIEVE THAT TEY ARE ALL DYNAMIC) <not a
>>> web dev>*
>>>
>>>
>>> On Wed, Oct 29, 2008 at 11:03 AM, Serge Fonville
>>> <se...@gmail.com>wrote:
>>>
>>> > You say the page not found errors are good...The configuration of the
>>> > connectors looks ok
>>> > Are there any errors in the logs and have you configured an
>>> identifiable
>>> > error page for both instances? (<error-page> inside web.xml)
>>> > That way you can determine which tomcat is serving the error.
>>> > Do the other connectors have an address defined
>>> > The fact you get a 400 indicates that a tomcat is responding, you now
>>> only
>>> > have to determine if it is the right one and what causes the error
>>> (what
>>> > type of content are you serving, static dynamic)
>>> >
>>> >
>>> > Regards,
>>> >
>>> > Serge Fonville
>>> >
>>> >
>>> > On Wed, Oct 29, 2008 at 3:49 PM, dOE <do...@gmail.com> wrote:
>>> >
>>> >> Hi Serge,
>>> >>
>>> >> Below are the values from both of my server.xml files.  I specified
>>> the
>>> >> address that the port should listen on, and I am unable to open *
>>> >> http://192.168.100.2:8080* (GOOD!).  When I attempt to open *
>>> >> http://192.168.100.2:8180* I get a 400, and
>>> *http://192.168.100.1:8180*
>>> >>  the
>>> >> "request" returns "Page Cannot Be Found"(GOOD!).
>>> >>
>>> >> 192.168.100.1 has ports 8080, 8009
>>> >> 192.168.100.2 has ports 8180, 8109
>>> >>
>>> >> The correct ports are open, its just that I can not open the site on
>>> >> 192.168.100.2 through Tomcat.
>>> >> Should I have only edited one server.xml, rather than hard coding the
>>> IP
>>> >> in
>>> >> both?
>>> >>
>>> >> (Server 1) 192.168.100.1
>>> >> <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
>>> >>    <Connector port="8080"
>>> >>    maxThreads="150"
>>> >>    minSpareThreads="25"
>>> >>    maxSpareThreads="75"
>>> >>    enableLookups="false"
>>> >>    redirectPort="8443"
>>> >>    acceptCount="100"
>>> >>    debug="0"
>>> >>    connectionTimeout="20000"
>>> >>    disableUploadTimeout="true"
>>> >>    address="192.168.100.1" />
>>> >>
>>> >> (Server 2) 192.168.100.2
>>> >> <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 -->
>>> >>    <Connector port="8180"
>>> >>    maxThreads="150"
>>> >>    minSpareThreads="25"
>>> >>    maxSpareThreads="75"
>>> >>    enableLookups="false"
>>> >>    redirectPort="8543"
>>> >>    acceptCount="100"
>>> >>    debug="0"
>>> >>    connectionTimeout="20000"
>>> >>    disableUploadTimeout="true"
>>> >>    address="192.168.100.2" />
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> On Wed, Oct 29, 2008 at 9:40 AM, Serge Fonville <
>>> serge.fonville@gmail.com
>>> >> >wrote:
>>> >>
>>> >> > Place inside a <Service> element<Connector port="80"
>>> protocol="HTTP/1.1"
>>> >> > connectionTimeout="20000"
>>> >> >  redirectPort="443"
>>> >> > address="127.0.0.1"/>
>>> >> > and the output of netstat contains an entry for 127.0.0.1:80instead of
>>> >> > the usual 0.0.0.0:80
>>> >> >
>>> >> > Regards,
>>> >> >
>>> >> > Serge Fonville
>>> >> >
>>> >> > On Wed, Oct 29, 2008 at 2:31 PM, dOE <do...@gmail.com> wrote:
>>> >> >
>>> >> >> Serge thanks for the reply...
>>> >> >>
>>> >> >> so to hard code the IP its just a matter of ONLY adding <Connector
>>> >> >> address='
>>> >> >> 192.168.1.1'>  ?
>>> >> >>
>>> >> >> The online document site does not give any syntax examples.
>>> >> >>
>>> >> >> On Wed, Oct 29, 2008 at 9:17 AM, Serge Fonville <
>>> >> serge.fonville@gmail.com
>>> >> >> >wrote:
>>> >> >>
>>> >> >> > There is an address attribute inside the connector that specifies
>>> the
>>> >> >> > address of the listening socket
>>> >> >> > http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
>>> >> >> > http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
>>> >> >> >
>>> >> >> > Hope this helps
>>> >> >> >
>>> >> >> > Regards,
>>> >> >> >
>>> >> >> > Serge Fonville
>>> >> >> >
>>> >> >> > On Wed, Oct 29, 2008 at 2:06 PM, dOE <do...@gmail.com> wrote:
>>> >> >> >
>>> >> >> >> I have a server that I am hosting multiple Tomcat servers from,
>>> and
>>> >> the
>>> >> >> >> issue I am running into is... - I have multiple IP's bound to
>>> the
>>> >> >> servers
>>> >> >> >> interface, Tomcat _1 has port 8080 specified as its connector
>>> port.
>>> >> >>  The
>>> >> >> >> second Tomcat_2 has port 8180 set as its conector port in its
>>> >> >> server.xml,
>>> >> >> >> but regardless of these custom ports I am only able to reach
>>> >> Tomcat_1
>>> >> >> >> through 8080, and 8180.  Is it possible to hard code the IP you
>>> want
>>> >> >> that
>>> >> >> >> particular instance to listen on?
>>> >> >> >>
>>> >> >> >
>>> >> >> >
>>> >> >>
>>> >> >
>>> >> >
>>> >>
>>> >
>>> >
>>>
>>
>>
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by Serge Fonville <se...@gmail.com>.
You seem to be missing libraries.Have you defined separate catalina_bases
for each instance
and are all the required libs in the classpath
Have you read "http://azeditech.com/tomcat/multiple-tomcat-instances.html"<http://azeditech.com/tomcat/multiple-tomcat-instances.html>

Any additional information about your environment would be nice.

Regards,

Serge Fonville

P.s. just a note, please do not use caps, it greatly reduces the readability
;-)

On Wed, Oct 29, 2008 at 5:19 PM, dOE <do...@gmail.com> wrote:

> You say the page not found errors are good...
> *IT IS GOOD BECAUSE IT TELLS ME THE SERVER IS BEING HIT.  PRIOR TO YOUR
> HELP
> THE WRONG SERVER WAS OPENING ON ALL PORTS AND IP's NO LONGER THE CASE.
> *
> The configuration of the connectors looks ok
>
> Are there any errors in the logs and have you configured an identifiable
> error page for both instances? (<error-page> inside web.xml)
>
> *THE ERROR LOG IS "BARK" ABOUT: *StandardContext[/balancer]Exception
> starting filter BalancerFilter  java.lang.NoClassDefFoundError:
> org/apache/commons/digester/Digester* (UNRELATED).   THE SERVER (server 2)
> IS NOT SERVING ANY PAGES, TRIED TO VIEW A GIF THROUGH URL AND IT WOULD NOT
> LOAD.  HONESTLY DO NOT HAVE THE SKILLS TO FIGURE OUT HOW TO GET
> <ERROR-PAGE>
> TO WORK RIGHT.*
>
> That way you can determine which tomcat is serving the error.
>
> Do the other connectors have an address defined
> *CONNECTORS I ASSUME YOU ARE REFERRING TO ARE PORTS 8009, AND 8109, BOTH
> HAVE ADDRESSES HARD CODED IN SERVER.XML*.
>
> The fact you get a 400 indicates that a tomcat is responding, you now only
> have to determine if it is the right one and what causes the error (what
> type of content are you serving, static dynamic)
>
> *I AM SITES ARE ALL JSP PAGES (I BELIEVE THAT TEY ARE ALL DYNAMIC) <not a
> web dev>*
>
>
> On Wed, Oct 29, 2008 at 11:03 AM, Serge Fonville
> <se...@gmail.com>wrote:
>
> > You say the page not found errors are good...The configuration of the
> > connectors looks ok
> > Are there any errors in the logs and have you configured an identifiable
> > error page for both instances? (<error-page> inside web.xml)
> > That way you can determine which tomcat is serving the error.
> > Do the other connectors have an address defined
> > The fact you get a 400 indicates that a tomcat is responding, you now
> only
> > have to determine if it is the right one and what causes the error (what
> > type of content are you serving, static dynamic)
> >
> >
> > Regards,
> >
> > Serge Fonville
> >
> >
> > On Wed, Oct 29, 2008 at 3:49 PM, dOE <do...@gmail.com> wrote:
> >
> >> Hi Serge,
> >>
> >> Below are the values from both of my server.xml files.  I specified the
> >> address that the port should listen on, and I am unable to open *
> >> http://192.168.100.2:8080* (GOOD!).  When I attempt to open *
> >> http://192.168.100.2:8180* I get a 400, and *http://192.168.100.1:8180*
> >>  the
> >> "request" returns "Page Cannot Be Found"(GOOD!).
> >>
> >> 192.168.100.1 has ports 8080, 8009
> >> 192.168.100.2 has ports 8180, 8109
> >>
> >> The correct ports are open, its just that I can not open the site on
> >> 192.168.100.2 through Tomcat.
> >> Should I have only edited one server.xml, rather than hard coding the IP
> >> in
> >> both?
> >>
> >> (Server 1) 192.168.100.1
> >> <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
> >>    <Connector port="8080"
> >>    maxThreads="150"
> >>    minSpareThreads="25"
> >>    maxSpareThreads="75"
> >>    enableLookups="false"
> >>    redirectPort="8443"
> >>    acceptCount="100"
> >>    debug="0"
> >>    connectionTimeout="20000"
> >>    disableUploadTimeout="true"
> >>    address="192.168.100.1" />
> >>
> >> (Server 2) 192.168.100.2
> >> <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 -->
> >>    <Connector port="8180"
> >>    maxThreads="150"
> >>    minSpareThreads="25"
> >>    maxSpareThreads="75"
> >>    enableLookups="false"
> >>    redirectPort="8543"
> >>    acceptCount="100"
> >>    debug="0"
> >>    connectionTimeout="20000"
> >>    disableUploadTimeout="true"
> >>    address="192.168.100.2" />
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> On Wed, Oct 29, 2008 at 9:40 AM, Serge Fonville <
> serge.fonville@gmail.com
> >> >wrote:
> >>
> >> > Place inside a <Service> element<Connector port="80"
> protocol="HTTP/1.1"
> >> > connectionTimeout="20000"
> >> >  redirectPort="443"
> >> > address="127.0.0.1"/>
> >> > and the output of netstat contains an entry for 127.0.0.1:80 instead
> of
> >> > the usual 0.0.0.0:80
> >> >
> >> > Regards,
> >> >
> >> > Serge Fonville
> >> >
> >> > On Wed, Oct 29, 2008 at 2:31 PM, dOE <do...@gmail.com> wrote:
> >> >
> >> >> Serge thanks for the reply...
> >> >>
> >> >> so to hard code the IP its just a matter of ONLY adding <Connector
> >> >> address='
> >> >> 192.168.1.1'>  ?
> >> >>
> >> >> The online document site does not give any syntax examples.
> >> >>
> >> >> On Wed, Oct 29, 2008 at 9:17 AM, Serge Fonville <
> >> serge.fonville@gmail.com
> >> >> >wrote:
> >> >>
> >> >> > There is an address attribute inside the connector that specifies
> the
> >> >> > address of the listening socket
> >> >> > http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
> >> >> > http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
> >> >> >
> >> >> > Hope this helps
> >> >> >
> >> >> > Regards,
> >> >> >
> >> >> > Serge Fonville
> >> >> >
> >> >> > On Wed, Oct 29, 2008 at 2:06 PM, dOE <do...@gmail.com> wrote:
> >> >> >
> >> >> >> I have a server that I am hosting multiple Tomcat servers from,
> and
> >> the
> >> >> >> issue I am running into is... - I have multiple IP's bound to the
> >> >> servers
> >> >> >> interface, Tomcat _1 has port 8080 specified as its connector
> port.
> >> >>  The
> >> >> >> second Tomcat_2 has port 8180 set as its conector port in its
> >> >> server.xml,
> >> >> >> but regardless of these custom ports I am only able to reach
> >> Tomcat_1
> >> >> >> through 8080, and 8180.  Is it possible to hard code the IP you
> want
> >> >> that
> >> >> >> particular instance to listen on?
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >
> >> >
> >>
> >
> >
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by dOE <do...@gmail.com>.
You say the page not found errors are good...
*IT IS GOOD BECAUSE IT TELLS ME THE SERVER IS BEING HIT.  PRIOR TO YOUR HELP
THE WRONG SERVER WAS OPENING ON ALL PORTS AND IP's NO LONGER THE CASE.
*
The configuration of the connectors looks ok

Are there any errors in the logs and have you configured an identifiable
error page for both instances? (<error-page> inside web.xml)

*THE ERROR LOG IS "BARK" ABOUT: *StandardContext[/balancer]Exception
starting filter BalancerFilter  java.lang.NoClassDefFoundError:
org/apache/commons/digester/Digester* (UNRELATED).   THE SERVER (server 2)
IS NOT SERVING ANY PAGES, TRIED TO VIEW A GIF THROUGH URL AND IT WOULD NOT
LOAD.  HONESTLY DO NOT HAVE THE SKILLS TO FIGURE OUT HOW TO GET <ERROR-PAGE>
TO WORK RIGHT.*

That way you can determine which tomcat is serving the error.

Do the other connectors have an address defined
*CONNECTORS I ASSUME YOU ARE REFERRING TO ARE PORTS 8009, AND 8109, BOTH
HAVE ADDRESSES HARD CODED IN SERVER.XML*.

The fact you get a 400 indicates that a tomcat is responding, you now only
have to determine if it is the right one and what causes the error (what
type of content are you serving, static dynamic)

*I AM SITES ARE ALL JSP PAGES (I BELIEVE THAT TEY ARE ALL DYNAMIC) <not a
web dev>*


On Wed, Oct 29, 2008 at 11:03 AM, Serge Fonville
<se...@gmail.com>wrote:

> You say the page not found errors are good...The configuration of the
> connectors looks ok
> Are there any errors in the logs and have you configured an identifiable
> error page for both instances? (<error-page> inside web.xml)
> That way you can determine which tomcat is serving the error.
> Do the other connectors have an address defined
> The fact you get a 400 indicates that a tomcat is responding, you now only
> have to determine if it is the right one and what causes the error (what
> type of content are you serving, static dynamic)
>
>
> Regards,
>
> Serge Fonville
>
>
> On Wed, Oct 29, 2008 at 3:49 PM, dOE <do...@gmail.com> wrote:
>
>> Hi Serge,
>>
>> Below are the values from both of my server.xml files.  I specified the
>> address that the port should listen on, and I am unable to open *
>> http://192.168.100.2:8080* (GOOD!).  When I attempt to open *
>> http://192.168.100.2:8180* I get a 400, and *http://192.168.100.1:8180*
>>  the
>> "request" returns "Page Cannot Be Found"(GOOD!).
>>
>> 192.168.100.1 has ports 8080, 8009
>> 192.168.100.2 has ports 8180, 8109
>>
>> The correct ports are open, its just that I can not open the site on
>> 192.168.100.2 through Tomcat.
>> Should I have only edited one server.xml, rather than hard coding the IP
>> in
>> both?
>>
>> (Server 1) 192.168.100.1
>> <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
>>    <Connector port="8080"
>>    maxThreads="150"
>>    minSpareThreads="25"
>>    maxSpareThreads="75"
>>    enableLookups="false"
>>    redirectPort="8443"
>>    acceptCount="100"
>>    debug="0"
>>    connectionTimeout="20000"
>>    disableUploadTimeout="true"
>>    address="192.168.100.1" />
>>
>> (Server 2) 192.168.100.2
>> <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 -->
>>    <Connector port="8180"
>>    maxThreads="150"
>>    minSpareThreads="25"
>>    maxSpareThreads="75"
>>    enableLookups="false"
>>    redirectPort="8543"
>>    acceptCount="100"
>>    debug="0"
>>    connectionTimeout="20000"
>>    disableUploadTimeout="true"
>>    address="192.168.100.2" />
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Wed, Oct 29, 2008 at 9:40 AM, Serge Fonville <serge.fonville@gmail.com
>> >wrote:
>>
>> > Place inside a <Service> element<Connector port="80" protocol="HTTP/1.1"
>> > connectionTimeout="20000"
>> >  redirectPort="443"
>> > address="127.0.0.1"/>
>> > and the output of netstat contains an entry for 127.0.0.1:80 instead of
>> > the usual 0.0.0.0:80
>> >
>> > Regards,
>> >
>> > Serge Fonville
>> >
>> > On Wed, Oct 29, 2008 at 2:31 PM, dOE <do...@gmail.com> wrote:
>> >
>> >> Serge thanks for the reply...
>> >>
>> >> so to hard code the IP its just a matter of ONLY adding <Connector
>> >> address='
>> >> 192.168.1.1'>  ?
>> >>
>> >> The online document site does not give any syntax examples.
>> >>
>> >> On Wed, Oct 29, 2008 at 9:17 AM, Serge Fonville <
>> serge.fonville@gmail.com
>> >> >wrote:
>> >>
>> >> > There is an address attribute inside the connector that specifies the
>> >> > address of the listening socket
>> >> > http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
>> >> > http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
>> >> >
>> >> > Hope this helps
>> >> >
>> >> > Regards,
>> >> >
>> >> > Serge Fonville
>> >> >
>> >> > On Wed, Oct 29, 2008 at 2:06 PM, dOE <do...@gmail.com> wrote:
>> >> >
>> >> >> I have a server that I am hosting multiple Tomcat servers from, and
>> the
>> >> >> issue I am running into is... - I have multiple IP's bound to the
>> >> servers
>> >> >> interface, Tomcat _1 has port 8080 specified as its connector port.
>> >>  The
>> >> >> second Tomcat_2 has port 8180 set as its conector port in its
>> >> server.xml,
>> >> >> but regardless of these custom ports I am only able to reach
>> Tomcat_1
>> >> >> through 8080, and 8180.  Is it possible to hard code the IP you want
>> >> that
>> >> >> particular instance to listen on?
>> >> >>
>> >> >
>> >> >
>> >>
>> >
>> >
>>
>
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by Serge Fonville <se...@gmail.com>.
You say the page not found errors are good...The configuration of the
connectors looks ok
Are there any errors in the logs and have you configured an identiefieable
error page for both instances? (<error-page> inside web.xml)
That way you can determine which tomcat is serving the error.
Do the other connectors have an address defined
The fact you get a 400 indicates that a tomcat is responding, you now only
have to determine if it is the right one and what causes the error (what
type of content are you serving, static dynamic)


Regards,

Serge Fonville


On Wed, Oct 29, 2008 at 3:49 PM, dOE <do...@gmail.com> wrote:

> Hi Serge,
>
> Below are the values from both of my server.xml files.  I specified the
> address that the port should listen on, and I am unable to open *
> http://192.168.100.2:8080* (GOOD!).  When I attempt to open *
> http://192.168.100.2:8180* I get a 400, and *http://192.168.100.1:8180*
>  the
> "request" returns "Page Cannot Be Found"(GOOD!).
>
> 192.168.100.1 has ports 8080, 8009
> 192.168.100.2 has ports 8180, 8109
>
> The correct ports are open, its just that I can not open the site on
> 192.168.100.2 through Tomcat.
> Should I have only edited one server.xml, rather than hard coding the IP in
> both?
>
> (Server 1) 192.168.100.1
> <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
>    <Connector port="8080"
>    maxThreads="150"
>    minSpareThreads="25"
>    maxSpareThreads="75"
>    enableLookups="false"
>    redirectPort="8443"
>    acceptCount="100"
>    debug="0"
>    connectionTimeout="20000"
>    disableUploadTimeout="true"
>    address="192.168.100.1" />
>
> (Server 2) 192.168.100.2
> <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 -->
>    <Connector port="8180"
>    maxThreads="150"
>    minSpareThreads="25"
>    maxSpareThreads="75"
>    enableLookups="false"
>    redirectPort="8543"
>    acceptCount="100"
>    debug="0"
>    connectionTimeout="20000"
>    disableUploadTimeout="true"
>    address="192.168.100.2" />
>
>
>
>
>
>
>
>
>
>
> On Wed, Oct 29, 2008 at 9:40 AM, Serge Fonville <serge.fonville@gmail.com
> >wrote:
>
> > Place inside a <Service> element<Connector port="80" protocol="HTTP/1.1"
> > connectionTimeout="20000"
> >  redirectPort="443"
> > address="127.0.0.1"/>
> > and the output of netstat contains an entry for 127.0.0.1:80 instead of
> > the usual 0.0.0.0:80
> >
> > Regards,
> >
> > Serge Fonville
> >
> > On Wed, Oct 29, 2008 at 2:31 PM, dOE <do...@gmail.com> wrote:
> >
> >> Serge thanks for the reply...
> >>
> >> so to hard code the IP its just a matter of ONLY adding <Connector
> >> address='
> >> 192.168.1.1'>  ?
> >>
> >> The online document site does not give any syntax examples.
> >>
> >> On Wed, Oct 29, 2008 at 9:17 AM, Serge Fonville <
> serge.fonville@gmail.com
> >> >wrote:
> >>
> >> > There is an address attribute inside the connector that specifies the
> >> > address of the listening socket
> >> > http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
> >> > http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
> >> >
> >> > Hope this helps
> >> >
> >> > Regards,
> >> >
> >> > Serge Fonville
> >> >
> >> > On Wed, Oct 29, 2008 at 2:06 PM, dOE <do...@gmail.com> wrote:
> >> >
> >> >> I have a server that I am hosting multiple Tomcat servers from, and
> the
> >> >> issue I am running into is... - I have multiple IP's bound to the
> >> servers
> >> >> interface, Tomcat _1 has port 8080 specified as its connector port.
> >>  The
> >> >> second Tomcat_2 has port 8180 set as its conector port in its
> >> server.xml,
> >> >> but regardless of these custom ports I am only able to reach Tomcat_1
> >> >> through 8080, and 8180.  Is it possible to hard code the IP you want
> >> that
> >> >> particular instance to listen on?
> >> >>
> >> >
> >> >
> >>
> >
> >
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by dOE <do...@gmail.com>.
Hi Serge,

Below are the values from both of my server.xml files.  I specified the
address that the port should listen on, and I am unable to open *
http://192.168.100.2:8080* (GOOD!).  When I attempt to open *
http://192.168.100.2:8180* I get a 400, and *http://192.168.100.1:8180*  the
"request" returns "Page Cannot Be Found"(GOOD!).

192.168.100.1 has ports 8080, 8009
192.168.100.2 has ports 8180, 8109

The correct ports are open, its just that I can not open the site on
192.168.100.2 through Tomcat.
Should I have only edited one server.xml, rather than hard coding the IP in
both?

(Server 1) 192.168.100.1
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
    <Connector port="8080"
    maxThreads="150"
    minSpareThreads="25"
    maxSpareThreads="75"
    enableLookups="false"
    redirectPort="8443"
    acceptCount="100"
    debug="0"
    connectionTimeout="20000"
    disableUploadTimeout="true"
    address="192.168.100.1" />

(Server 2) 192.168.100.2
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 -->
    <Connector port="8180"
    maxThreads="150"
    minSpareThreads="25"
    maxSpareThreads="75"
    enableLookups="false"
    redirectPort="8543"
    acceptCount="100"
    debug="0"
    connectionTimeout="20000"
    disableUploadTimeout="true"
    address="192.168.100.2" />










On Wed, Oct 29, 2008 at 9:40 AM, Serge Fonville <se...@gmail.com>wrote:

> Place inside a <Service> element<Connector port="80" protocol="HTTP/1.1"
> connectionTimeout="20000"
>  redirectPort="443"
> address="127.0.0.1"/>
> and the output of netstat contains an entry for 127.0.0.1:80 instead of
> the usual 0.0.0.0:80
>
> Regards,
>
> Serge Fonville
>
> On Wed, Oct 29, 2008 at 2:31 PM, dOE <do...@gmail.com> wrote:
>
>> Serge thanks for the reply...
>>
>> so to hard code the IP its just a matter of ONLY adding <Connector
>> address='
>> 192.168.1.1'>  ?
>>
>> The online document site does not give any syntax examples.
>>
>> On Wed, Oct 29, 2008 at 9:17 AM, Serge Fonville <serge.fonville@gmail.com
>> >wrote:
>>
>> > There is an address attribute inside the connector that specifies the
>> > address of the listening socket
>> > http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
>> > http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
>> >
>> > Hope this helps
>> >
>> > Regards,
>> >
>> > Serge Fonville
>> >
>> > On Wed, Oct 29, 2008 at 2:06 PM, dOE <do...@gmail.com> wrote:
>> >
>> >> I have a server that I am hosting multiple Tomcat servers from, and the
>> >> issue I am running into is... - I have multiple IP's bound to the
>> servers
>> >> interface, Tomcat _1 has port 8080 specified as its connector port.
>>  The
>> >> second Tomcat_2 has port 8180 set as its conector port in its
>> server.xml,
>> >> but regardless of these custom ports I am only able to reach Tomcat_1
>> >> through 8080, and 8180.  Is it possible to hard code the IP you want
>> that
>> >> particular instance to listen on?
>> >>
>> >
>> >
>>
>
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by Serge Fonville <se...@gmail.com>.
Place inside a <Service> element<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="443"
address="127.0.0.1"/>
and the output of netstat contains an entry for 127.0.0.1:80 instead of the
usual 0.0.0.0:80

Regards,

Serge Fonville

On Wed, Oct 29, 2008 at 2:31 PM, dOE <do...@gmail.com> wrote:

> Serge thanks for the reply...
>
> so to hard code the IP its just a matter of ONLY adding <Connector
> address='
> 192.168.1.1'>  ?
>
> The online document site does not give any syntax examples.
>
> On Wed, Oct 29, 2008 at 9:17 AM, Serge Fonville <serge.fonville@gmail.com
> >wrote:
>
> > There is an address attribute inside the connector that specifies the
> > address of the listening socket
> > http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
> > http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
> >
> > Hope this helps
> >
> > Regards,
> >
> > Serge Fonville
> >
> > On Wed, Oct 29, 2008 at 2:06 PM, dOE <do...@gmail.com> wrote:
> >
> >> I have a server that I am hosting multiple Tomcat servers from, and the
> >> issue I am running into is... - I have multiple IP's bound to the
> servers
> >> interface, Tomcat _1 has port 8080 specified as its connector port.  The
> >> second Tomcat_2 has port 8180 set as its conector port in its
> server.xml,
> >> but regardless of these custom ports I am only able to reach Tomcat_1
> >> through 8080, and 8180.  Is it possible to hard code the IP you want
> that
> >> particular instance to listen on?
> >>
> >
> >
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by dOE <do...@gmail.com>.
Serge thanks for the reply...

so to hard code the IP its just a matter of ONLY adding <Connector address='
192.168.1.1'>  ?

The online document site does not give any syntax examples.

On Wed, Oct 29, 2008 at 9:17 AM, Serge Fonville <se...@gmail.com>wrote:

> There is an address attribute inside the connector that specifies the
> address of the listening socket
> http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
> http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
>
> Hope this helps
>
> Regards,
>
> Serge Fonville
>
> On Wed, Oct 29, 2008 at 2:06 PM, dOE <do...@gmail.com> wrote:
>
>> I have a server that I am hosting multiple Tomcat servers from, and the
>> issue I am running into is... - I have multiple IP's bound to the servers
>> interface, Tomcat _1 has port 8080 specified as its connector port.  The
>> second Tomcat_2 has port 8180 set as its conector port in its server.xml,
>> but regardless of these custom ports I am only able to reach Tomcat_1
>> through 8080, and 8180.  Is it possible to hard code the IP you want that
>> particular instance to listen on?
>>
>
>

Re: How can I hard code the IP address on a single server with multiple Tomcat instances.

Posted by Serge Fonville <se...@gmail.com>.
There is an address attribute inside the connector that specifies the
address of the listening socket
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html

Hope this helps

Regards,

Serge Fonville

On Wed, Oct 29, 2008 at 2:06 PM, dOE <do...@gmail.com> wrote:

> I have a server that I am hosting multiple Tomcat servers from, and the
> issue I am running into is... - I have multiple IP's bound to the servers
> interface, Tomcat _1 has port 8080 specified as its connector port.  The
> second Tomcat_2 has port 8180 set as its conector port in its server.xml,
> but regardless of these custom ports I am only able to reach Tomcat_1
> through 8080, and 8180.  Is it possible to hard code the IP you want that
> particular instance to listen on?
>