You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by frannack Guimard <fr...@hotmail.com> on 2008/03/28 16:45:00 UTC

jk2 vs mod_jk and mod_proxy_balancer

Hello,

I just looked at mod_jk2. I was looking for a way to add programmatically a worker to the balancer with mod_jk or mod_proxy_balancer, but couldn't find a way. And then I saw in the mod_jk2 documentation:
1. Edit workers2.properties. Add a new channel. If you want, also add a worker.ajp entry - 
but this is optional
2. Access the /jkstatus page or triger reloading with a program. You should see the 
new channel displayed in the status page, and requests should start going to the new tomcat instanceDoes anyone knows if it's working with apache 2.2.x. Can we do the same with mod_jk or mod_proxy_balancer? (how)

Thank you.

_________________________________________________________________
How well do you know your celebrity gossip?
http://originals.msn.com/thebigdebate?ocid=T002MSN03N0707A

RE: jk2 vs mod_jk and mod_proxy_balancer

Posted by frannack Guimard <fr...@hotmail.com>.
Rainer,

Thank you, I didn't know about those new OSes :)

I'm using fedora 8 for now. I tried to use sudo adding the http user in the sudoers list, but even though my cgi perl script launches the sudo apachectl graceful command, I get the following error message in the apache error.logs file:

(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

Thank you for your help

Franck



> Date: Fri, 28 Mar 2008 19:57:04 +0100
> From: rainer.jung@kippdata.de
> To: users@tomcat.apache.org
> Subject: Re: jk2 vs mod_jk and mod_proxy_balancer
> 
> frannack Guimard schrieb:
> > Rainer,
> > 
> > Thank you for your input. I send you another e-mail but it looks like you didn't get. I tried to use apachectl graceful after updating my worker.properties files. The only problem is that it must be done as root (because of the port 80). So my cgi perl script running in apache to automatically update the worker.properties does not work when I add a system command to gracefully restart apache. I even tried to add the httpd user (nobody) for example in the sudoers file as NOPASSWORD, but it did not work either.
> > 
> > Any suggestion would be much appreciated, I really need to make that work a way or an other to manage my zillion tomcat instances :)
> > 
> > Thank you.
> > 
> > Franck
> 
> apachectl graceful uses signals to communicate with the httpd processes.
> So if the user doesn't have enough rights to end th signals this fails. 
> Especially if you start httpd as root, you need to do restart/graceful 
> as root too.
> 
> Some modern OSes allow configurations for non-root processes to bind to 
> privileged ports (below 1024, e.g. 80).
> 
> So if you need to do a graceful you either
> 
> - need root privileges
> - must use a high port (and run as non root)
> - use an OS that allows to give non-root the rights to bind to the low 
> port (Solaris 10 e.g. does)
> - look at "sudo", that allows to precisely define, which command non 
> root users are allowed to run as root
> 
> Regards,
> 
> Rainer
> 
> 
> >> Date: Fri, 28 Mar 2008 17:16:53 +0100
> >> From: rainer.jung@kippdata.de
> >> To: users@tomcat.apache.org
> >> Subject: Re: jk2 vs mod_jk and mod_proxy_balancer
> >>
> >> frannack Guimard schrieb:
> >>> Hello,
> >>>
> >>> I just looked at mod_jk2. I was looking for a way to add programmatically a worker to the balancer with mod_jk or mod_proxy_balancer, but couldn't find a way. And then I saw in the mod_jk2 documentation:
> >>> 1. Edit workers2.properties. Add a new channel. If you want, also add a worker.ajp entry - 
> >>> but this is optional
> >>> 2. Access the /jkstatus page or triger reloading with a program. You should see the 
> >>> new channel displayed in the status page, and requests should start going to the new tomcat instanceDoes anyone knows if it's working with apache 2.2.x. Can we do the same with mod_jk or mod_proxy_balancer? (how)
> >>>
> >>> Thank you.
> >> For mod_jk you would have to add the worker to the config file and do a 
> >> web server restart. Using apachectl graceful will be sufficient.
> >>
> >> Most config items are dynamicaly manageable, but not the addition of a 
> >> worker. It is an interesting feature, but will not be realized in mod_jk 
> >> 1.2.x.
> >>
> >> Concerning mod_jk2 be warned, that there is noone left working on it 
> >> since quite several years now. As a consequence we no longer recommend 
> >> using it.
> >>
> >> Regards,
> >>
> >> Rainer
> 
> ---------------------------------------------------------------------
> 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
> 

_________________________________________________________________
Watch “Cause Effect,” a show about real people making a real difference.  Learn more.
http://im.live.com/Messenger/IM/MTV/?source=text_watchcause

Re: jk2 vs mod_jk and mod_proxy_balancer

Posted by Rainer Jung <ra...@kippdata.de>.
frannack Guimard schrieb:
> Rainer,
> 
> Thank you for your input. I send you another e-mail but it looks like you didn't get. I tried to use apachectl graceful after updating my worker.properties files. The only problem is that it must be done as root (because of the port 80). So my cgi perl script running in apache to automatically update the worker.properties does not work when I add a system command to gracefully restart apache. I even tried to add the httpd user (nobody) for example in the sudoers file as NOPASSWORD, but it did not work either.
> 
> Any suggestion would be much appreciated, I really need to make that work a way or an other to manage my zillion tomcat instances :)
> 
> Thank you.
> 
> Franck

apachectl graceful uses signals to communicate with the httpd processes.
So if the user doesn't have enough rights to end th signals this fails. 
Especially if you start httpd as root, you need to do restart/graceful 
as root too.

Some modern OSes allow configurations for non-root processes to bind to 
privileged ports (below 1024, e.g. 80).

So if you need to do a graceful you either

- need root privileges
- must use a high port (and run as non root)
- use an OS that allows to give non-root the rights to bind to the low 
port (Solaris 10 e.g. does)
- look at "sudo", that allows to precisely define, which command non 
root users are allowed to run as root

Regards,

Rainer


>> Date: Fri, 28 Mar 2008 17:16:53 +0100
>> From: rainer.jung@kippdata.de
>> To: users@tomcat.apache.org
>> Subject: Re: jk2 vs mod_jk and mod_proxy_balancer
>>
>> frannack Guimard schrieb:
>>> Hello,
>>>
>>> I just looked at mod_jk2. I was looking for a way to add programmatically a worker to the balancer with mod_jk or mod_proxy_balancer, but couldn't find a way. And then I saw in the mod_jk2 documentation:
>>> 1. Edit workers2.properties. Add a new channel. If you want, also add a worker.ajp entry - 
>>> but this is optional
>>> 2. Access the /jkstatus page or triger reloading with a program. You should see the 
>>> new channel displayed in the status page, and requests should start going to the new tomcat instanceDoes anyone knows if it's working with apache 2.2.x. Can we do the same with mod_jk or mod_proxy_balancer? (how)
>>>
>>> Thank you.
>> For mod_jk you would have to add the worker to the config file and do a 
>> web server restart. Using apachectl graceful will be sufficient.
>>
>> Most config items are dynamicaly manageable, but not the addition of a 
>> worker. It is an interesting feature, but will not be realized in mod_jk 
>> 1.2.x.
>>
>> Concerning mod_jk2 be warned, that there is noone left working on it 
>> since quite several years now. As a consequence we no longer recommend 
>> using it.
>>
>> Regards,
>>
>> Rainer

---------------------------------------------------------------------
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: jk2 vs mod_jk and mod_proxy_balancer

Posted by frannack Guimard <fr...@hotmail.com>.
Rainer,

Thank you for your input. I send you another e-mail but it looks like you didn't get. I tried to use apachectl graceful after updating my worker.properties files. The only problem is that it must be done as root (because of the port 80). So my cgi perl script running in apache to automatically update the worker.properties does not work when I add a system command to gracefully restart apache. I even tried to add the httpd user (nobody) for example in the sudoers file as NOPASSWORD, but it did not work either.

Any suggestion would be much appreciated, I really need to make that work a way or an other to manage my zillion tomcat instances :)

Thank you.

Franck



> Date: Fri, 28 Mar 2008 17:16:53 +0100
> From: rainer.jung@kippdata.de
> To: users@tomcat.apache.org
> Subject: Re: jk2 vs mod_jk and mod_proxy_balancer
> 
> frannack Guimard schrieb:
> > Hello,
> > 
> > I just looked at mod_jk2. I was looking for a way to add programmatically a worker to the balancer with mod_jk or mod_proxy_balancer, but couldn't find a way. And then I saw in the mod_jk2 documentation:
> > 1. Edit workers2.properties. Add a new channel. If you want, also add a worker.ajp entry - 
> > but this is optional
> > 2. Access the /jkstatus page or triger reloading with a program. You should see the 
> > new channel displayed in the status page, and requests should start going to the new tomcat instanceDoes anyone knows if it's working with apache 2.2.x. Can we do the same with mod_jk or mod_proxy_balancer? (how)
> > 
> > Thank you.
> 
> For mod_jk you would have to add the worker to the config file and do a 
> web server restart. Using apachectl graceful will be sufficient.
> 
> Most config items are dynamicaly manageable, but not the addition of a 
> worker. It is an interesting feature, but will not be realized in mod_jk 
> 1.2.x.
> 
> Concerning mod_jk2 be warned, that there is noone left working on it 
> since quite several years now. As a consequence we no longer recommend 
> using it.
> 
> Regards,
> 
> Rainer
> 
> ---------------------------------------------------------------------
> 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
> 

_________________________________________________________________
In a rush?  Get real-time answers with Windows Live Messenger.
http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_realtime_042008

Re: jk2 vs mod_jk and mod_proxy_balancer

Posted by Rainer Jung <ra...@kippdata.de>.
frannack Guimard schrieb:
> Hello,
> 
> I just looked at mod_jk2. I was looking for a way to add programmatically a worker to the balancer with mod_jk or mod_proxy_balancer, but couldn't find a way. And then I saw in the mod_jk2 documentation:
> 1. Edit workers2.properties. Add a new channel. If you want, also add a worker.ajp entry - 
> but this is optional
> 2. Access the /jkstatus page or triger reloading with a program. You should see the 
> new channel displayed in the status page, and requests should start going to the new tomcat instanceDoes anyone knows if it's working with apache 2.2.x. Can we do the same with mod_jk or mod_proxy_balancer? (how)
> 
> Thank you.

For mod_jk you would have to add the worker to the config file and do a 
web server restart. Using apachectl graceful will be sufficient.

Most config items are dynamicaly manageable, but not the addition of a 
worker. It is an interesting feature, but will not be realized in mod_jk 
1.2.x.

Concerning mod_jk2 be warned, that there is noone left working on it 
since quite several years now. As a consequence we no longer recommend 
using it.

Regards,

Rainer

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