You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jai <ja...@gmail.com> on 2009/07/06 18:16:04 UTC

[users@httpd] Apache workers DNS change question?

All,

We have Apache 2.0.63 and Jboss 4.0.4 are running in two different machines.
Could you please suggest me what happens with apache if we change the Jboss
hosts DNS IP address? Do we need to restart Apache web server to make the
changes take effect?

Thanks
Jayamurugan

Re: [users@httpd] Re: Apache workers DNS change question?

Posted by André Warnier <aw...@ice-sa.com>.
Jai wrote:
> We are not going to change it dynamically. We are going to bring down jboss
> servers when we change IP address. But we will not be able to bring apache
> since it has JK Mount configured for applications other than the application
> we bring down. Sure. I will search it in tomcat forums and will go ahead
> with this exercise. Thanks a lot for your help.
> 
Here is a recent thread which may help :

http://tomcat.markmail.org/search/?q=JK+1.2.28+-+load+balancer+worker+fail

An Apache httpd "graceful restart" will not interrupt any transaction 
that is under way.  It will let each Apache thread finish its current 
request, then die, and be replaced by a new thread (including a mod_jk 
instance).  I would imagine that each mod_jk would then redo a DNS 
lookup, and you should be fine.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Apache workers DNS change question?

Posted by Jai <ja...@gmail.com>.
We are not going to change it dynamically. We are going to bring down jboss
servers when we change IP address. But we will not be able to bring apache
since it has JK Mount configured for applications other than the application
we bring down. Sure. I will search it in tomcat forums and will go ahead
with this exercise. Thanks a lot for your help.

On Mon, Jul 6, 2009 at 3:49 PM, André Warnier <aw...@ice-sa.com> wrote:

> Jai wrote:
>
>> Apache is acting as a front end webserver and it sends requests to Jboss
>> application server. We have configured Jboss servers as a workers in
>> apache
>> workers.properties file. We have specified Jboss host name in
>> workers.properties
>>
>> Very good, so now we know something more : that you are using mod_jk as
> the Apache-to-JBoss Connector.
> (Why is this kind of information always so hard to pry out of posters ?)
>
> I believe that there was a thread on the Tomcat users forum, not so long
> ago (less than 6 months), which touched on this issue.
> (The Tomcat users support list has a lot of messages about mod_jk).
>
> The point is : if in your "workers.properties" file, you have something
> like this :
>
> worker.ajp13.host=tomcat.mycompany.com
>
> then it means that in order to pass the request to the correct host, mod_jk
> has to do at least one DNS lookup, to get the IP address of this host.
> Of course, it would be very inefficient to re-do this DNS lookup at each
> request, so it is done once, and the result is cached.
>
> Of course if you change the IP address of Tomcat without letting mod_jk
> know, it is going to get confused.  So you need a way to force mod_jk to
> re-do this DNS lookup.
> I believe that doing an Apache httpd "graceful restart" would do it.
>
> But do not take my word for it, and do a search on the Apache and Tomcat
> forums, using the words above.
> Some of the mailing list archives mentioned on their respective website
> homepages are searchable.
>
>
> Now, I do have a question however :
> You cannot just "change the IP address" of a Tomcat's host dynamically, can
> you ?  So what's exactly the point of this whole exercise ?
>
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Re: Apache workers DNS change question?

Posted by André Warnier <aw...@ice-sa.com>.
Jai wrote:
> Apache is acting as a front end webserver and it sends requests to Jboss
> application server. We have configured Jboss servers as a workers in apache
> workers.properties file. We have specified Jboss host name in
> workers.properties
> 
Very good, so now we know something more : that you are using mod_jk as 
the Apache-to-JBoss Connector.
(Why is this kind of information always so hard to pry out of posters ?)

I believe that there was a thread on the Tomcat users forum, not so long 
ago (less than 6 months), which touched on this issue.
(The Tomcat users support list has a lot of messages about mod_jk).

The point is : if in your "workers.properties" file, you have something 
like this :

worker.ajp13.host=tomcat.mycompany.com

then it means that in order to pass the request to the correct host, 
mod_jk has to do at least one DNS lookup, to get the IP address of this 
host.
Of course, it would be very inefficient to re-do this DNS lookup at each 
request, so it is done once, and the result is cached.

Of course if you change the IP address of Tomcat without letting mod_jk 
know, it is going to get confused.  So you need a way to force mod_jk to 
re-do this DNS lookup.
I believe that doing an Apache httpd "graceful restart" would do it.

But do not take my word for it, and do a search on the Apache and Tomcat 
forums, using the words above.
Some of the mailing list archives mentioned on their respective website 
homepages are searchable.


Now, I do have a question however :
You cannot just "change the IP address" of a Tomcat's host dynamically, 
can you ?  So what's exactly the point of this whole exercise ?




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Apache workers DNS change question?

Posted by Jai <ja...@gmail.com>.
Apache is acting as a front end webserver and it sends requests to Jboss
application server. We have configured Jboss servers as a workers in apache
workers.properties file. We have specified Jboss host name in
workers.properties

On Mon, Jul 6, 2009 at 1:46 PM, André Warnier <aw...@ice-sa.com> wrote:

>  Jai wrote:
>
>> Also, I forgot to include that we dont have reference of IP address in any
>> of apache configuration file.
>>
>> On Mon, Jul 6, 2009 at 11:16 AM, Jai <ja...@gmail.com> wrote:
>>
>> All,
>>>
>>> We have Apache 2.0.63 and Jboss 4.0.4 are running in two different
>>> machines. Could you please suggest me what happens with apache if we
>>> change
>>> the Jboss hosts DNS IP address? Do we need to restart Apache web server
>>> to
>>> make the changes take effect?
>>>
>>> You also forgot to mention if the Apache and the Jboss were related in
> any way.  If they are not, Apache will not care a bit about the Jboss DNS
> change.  If they are, how ?
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Re: Apache workers DNS change question?

Posted by André Warnier <aw...@ice-sa.com>.
Jai wrote:
> Also, I forgot to include that we dont have reference of IP address in any
> of apache configuration file.
> 
> On Mon, Jul 6, 2009 at 11:16 AM, Jai <ja...@gmail.com> wrote:
> 
>> All,
>>
>> We have Apache 2.0.63 and Jboss 4.0.4 are running in two different
>> machines. Could you please suggest me what happens with apache if we change
>> the Jboss hosts DNS IP address? Do we need to restart Apache web server to
>> make the changes take effect?
>>
You also forgot to mention if the Apache and the Jboss were related in 
any way.  If they are not, Apache will not care a bit about the Jboss 
DNS change.  If they are, how ?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Apache workers DNS change question?

Posted by Jai <ja...@gmail.com>.
Also, I forgot to include that we dont have reference of IP address in any
of apache configuration file.

On Mon, Jul 6, 2009 at 11:16 AM, Jai <ja...@gmail.com> wrote:

> All,
>
> We have Apache 2.0.63 and Jboss 4.0.4 are running in two different
> machines. Could you please suggest me what happens with apache if we change
> the Jboss hosts DNS IP address? Do we need to restart Apache web server to
> make the changes take effect?
>
> Thanks
> Jayamurugan
>