You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brian Braun <br...@gmail.com> on 2011/04/12 00:52:15 UTC

Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?

Hi,

I have a Linux instance, on top of which I'm running Tomcat 7.0.11. This
Tomcat installation is running two websites, using host virtualization.
These websites run both using port 80 and the SSL port.
For several reasons, I usually have to restart this Tomcat installation,
which takes 30 seconds in the best case scenario. So every time I do that,
all the apps are down while it happens.

I have a new project, for a web service that must be running all the time.
It should never be offline, and if it does, my clients will leave me, so I
can not run this app in the same Tomcat installation. I'm considering a
parallel Tomcat installation in the same Linux VPS, both running at the same
time. I perfectly know that it can be done, but how do I do with the port
conflict? How can both Tomcat installations run using the same port 80? Is
there a way to configure Linux so Tomcat "A" will serve some domains AND IP
addresses, and Tomcat "B" will server other domains AND IP addresses?

Thanks in advance!

Re: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?

Posted by Brian Braun <br...@gmail.com>.
Thanks, I will read that.

On Mon, Apr 11, 2011 at 7:19 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Brian Braun [mailto:brianbraun@gmail.com]
> > Subject: Re: Two Tomcat 7.0.11 installations in the same Linux instance,
> running both on port 80, without conflicts?
>
> > Is it so easy? wow, I thought it was going to be more complex. Thanks!
>
> Forgot to mention that you can either install two copies of Tomcat (in
> separate directories, of course), or use the technique described in the
> RUNNING.txt file to run multiple Tomcats from one installation.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Brian Braun [mailto:brianbraun@gmail.com] 
> Subject: Re: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?

> Is it so easy? wow, I thought it was going to be more complex. Thanks!

Forgot to mention that you can either install two copies of Tomcat (in separate directories, of course), or use the technique described in the RUNNING.txt file to run multiple Tomcats from one installation.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?

Posted by Brian Braun <br...@gmail.com>.
Is it so easy? wow, I thought it was going to be more complex. Thanks!




On Mon, Apr 11, 2011 at 6:35 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Brian Braun [mailto:brianbraun@gmail.com]
> > Subject: Two Tomcat 7.0.11 installations in the same Linux instance,
> running both on port 80, without conflicts?
>
> > I'm considering a parallel Tomcat installation in the same
> > Linux VPS, both running at the same time. I perfectly know
> > that it can be done, but how do I do with the port conflict?
>
> Use different IP addresses for each Tomcat; specify the IP address chosen
> via the <Connector> address attribute.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?

Posted by Mark Eggers <it...@yahoo.com>.
----- Original Message (edited) ----
> Subject: Two Tomcat 7.0.11 installations in the same Linux instance, running 
>both on port 80, without conflicts?

> I'm considering a parallel Tomcat installation in the same 
> Linux VPS, both running at the same time. I perfectly know
> that it can be done, but how do I do with the port conflict?

Use different IP addresses for each Tomcat; specify the IP address chosen via 
the <Connector> address attribute.

- Chuck


----- Original Message (edited) ----

Don't forget to either add an address attribute in the <Server> element (or 
change the port) for the shutdown command.

BTW, nice new attribute (address) for the <Server> element.

. . . just my two cents.

/mde/

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


RE: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Brian Braun [mailto:brianbraun@gmail.com] 
> Subject: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?

> I'm considering a parallel Tomcat installation in the same 
> Linux VPS, both running at the same time. I perfectly know
> that it can be done, but how do I do with the port conflict?

Use different IP addresses for each Tomcat; specify the IP address chosen via the <Connector> address attribute.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian,

On 4/12/2011 5:18 PM, Brian Braun wrote:
> I'm improving my apps frecuently, so everytime I do it I need to upload a
> new WAR file. When that happens, I face the leaking problem that so far I
> haven't solved.

What leaking problem?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2mC7EACgkQ9CaO5/Lv0PDlkACdFNfsydW5pUJ8uD8/Oe78Y3er
ndUAniUKZQrSF8CVCDlbSE+Fchvsux/1
=HcY3
-----END PGP SIGNATURE-----

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


Re: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?

Posted by Brian Braun <br...@gmail.com>.
Hi Chris,

I'm improving my apps frecuently, so everytime I do it I need to upload a
new WAR file. When that happens, I face the leaking problem that so far I
haven't solved. For that reason, I'm restarting Tomcat. My new app should
not be hosted in the same Tomcat instance for that reason.
I will definitely think about redundancy soon, as soon as my new idea shows
some profit and I'm able to spend some more, thanks for mentioning that!

On Tue, Apr 12, 2011 at 10:57 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Brian,
>
> On 4/11/2011 6:52 PM, Brian Braun wrote:
> > I have a new project, for a web service that must be running all the
> time.
> > It should never be offline, and if it does, my clients will leave me, so
> I
> > can not run this app in the same Tomcat installation.
>
> If you need 100% uptime, you'll need more than one server. If you have
> more than one server, don't restart all Tomcat instances at once.
> Instead, use clustering (which includes session fail-over) and re-start
> each Tomcat instance individually. That should ensure that no service
> interruption is ever encountered.
>
> In order to cluster, you'll need some kind of server out in front that
> can load balance and direct requests to one of several running Tomcat
> instances on the back-end. Don't forget to set up redundancy at that
> level, too.
>
> If you're going to run a lb, you can just do what we do and run each
> webapp in it's own JVM and Tomcat instance, and have the lb direct the
> traffic to the right place. The cluster isn't necessary in that scenario
> unless you truly need 100% uptime (which is impossible IMHO).
>
> The real question is why you have to restart Tomcat instead of just
> restarting the webapp itself. We separate ours for flexibility and
> isolation (one OOME doesn't bring-down all services, we can run
> different JVMs or Tomcat versions for each webapp, etc.). Why do you
> restart your entire JVM just to bounce your webapp?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk2kdoIACgkQ9CaO5/Lv0PCgdwCeMbJN8pVk6jr+5897Llat5UxF
> el0AoIAzWQoS+UyffBmvH2xPcarOA2Hy
> =RmPT
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian,

On 4/11/2011 6:52 PM, Brian Braun wrote:
> I have a new project, for a web service that must be running all the time.
> It should never be offline, and if it does, my clients will leave me, so I
> can not run this app in the same Tomcat installation.

If you need 100% uptime, you'll need more than one server. If you have
more than one server, don't restart all Tomcat instances at once.
Instead, use clustering (which includes session fail-over) and re-start
each Tomcat instance individually. That should ensure that no service
interruption is ever encountered.

In order to cluster, you'll need some kind of server out in front that
can load balance and direct requests to one of several running Tomcat
instances on the back-end. Don't forget to set up redundancy at that
level, too.

If you're going to run a lb, you can just do what we do and run each
webapp in it's own JVM and Tomcat instance, and have the lb direct the
traffic to the right place. The cluster isn't necessary in that scenario
unless you truly need 100% uptime (which is impossible IMHO).

The real question is why you have to restart Tomcat instead of just
restarting the webapp itself. We separate ours for flexibility and
isolation (one OOME doesn't bring-down all services, we can run
different JVMs or Tomcat versions for each webapp, etc.). Why do you
restart your entire JVM just to bounce your webapp?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2kdoIACgkQ9CaO5/Lv0PCgdwCeMbJN8pVk6jr+5897Llat5UxF
el0AoIAzWQoS+UyffBmvH2xPcarOA2Hy
=RmPT
-----END PGP SIGNATURE-----

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