You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Shaji Thomas <Sh...@ariba.com> on 2007/10/18 01:16:59 UTC

AJP port - How to stop Tomcat from incrementing the AJP port number

When Tomcat 6 finds that the specified AJP port is already in use, it increments the port number and try to bind to the next available port. When this happens, on the web server side apache is not able to connect to the AJP port on Tomcat side, because Tomcat is listening on a different AJP port. 

So is there a way to make Tomcat listen only on the specified AJP port? In the source I see there is a maxPort variable it is checking while incrementing the port number. Is there a way to control this from configuration files? 

I am using Tomcat 6 with mod_jk.  

Thank you very much 
Shaji


---------------------------------------------------------------------
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: AJP port - How to stop Tomcat from incrementing the AJP port number

Posted by "Fisher, Mitchell L" <Mi...@unisys.com>.
Shaji wrote:

> When Tomcat 6 finds that the specified AJP port is already in use, 
> it increments the port number and try to bind to the next available
port.

Why does the AJP connector do this?  Does mod_jk try the "next port"
too?

-- 
Mitchell Fisher | Unisys Corp. 

-----Original Message-----
From: news [mailto:news@ger.gmane.org] On Behalf Of Bill Barker
Sent: Wednesday, October 17, 2007 9:32 PM
To: users@tomcat.apache.org
Subject: Re: AJP port - How to stop Tomcat from incrementing the AJP
port number

Well, it should be possible to do channelSocket.maxPort="0" on the 
<Connector />.  However, if the port attribute gets processed after the 
maxPort, it will reset it back (yes, it's a bug :).  If you are using
the 
default 8009 port, then it should be possible to omit the port option on
the 
<Connector /> and it should work.

"Shaji Thomas" <Sh...@ariba.com> wrote in message 
news:69F5B6D2B8B85D4A8F3CF11C9D1E7DEA0C22FCA0@us-hqmail3.ariba.com...
When Tomcat 6 finds that the specified AJP port is already in use, it 
increments the port number and try to bind to the next available port.
When 
this happens, on the web server side apache is not able to connect to
the 
AJP port on Tomcat side, because Tomcat is listening on a different AJP 
port.

So is there a way to make Tomcat listen only on the specified AJP port?
In 
the source I see there is a maxPort variable it is checking while 
incrementing the port number. Is there a way to control this from 
configuration files?

I am using Tomcat 6 with mod_jk.

Thank you very much
Shaji


---------------------------------------------------------------------
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





---------------------------------------------------------------------
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


---------------------------------------------------------------------
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: AJP port - How to stop Tomcat from incrementing the AJP port number

Posted by Bill Barker <wb...@wilshire.com>.
Well, it should be possible to do channelSocket.maxPort="0" on the 
<Connector />.  However, if the port attribute gets processed after the 
maxPort, it will reset it back (yes, it's a bug :).  If you are using the 
default 8009 port, then it should be possible to omit the port option on the 
<Connector /> and it should work.

"Shaji Thomas" <Sh...@ariba.com> wrote in message 
news:69F5B6D2B8B85D4A8F3CF11C9D1E7DEA0C22FCA0@us-hqmail3.ariba.com...
When Tomcat 6 finds that the specified AJP port is already in use, it 
increments the port number and try to bind to the next available port. When 
this happens, on the web server side apache is not able to connect to the 
AJP port on Tomcat side, because Tomcat is listening on a different AJP 
port.

So is there a way to make Tomcat listen only on the specified AJP port? In 
the source I see there is a maxPort variable it is checking while 
incrementing the port number. Is there a way to control this from 
configuration files?

I am using Tomcat 6 with mod_jk.

Thank you very much
Shaji


---------------------------------------------------------------------
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





---------------------------------------------------------------------
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