You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ben Ricker <br...@wellinx.com> on 2003/04/11 21:51:33 UTC

mod_jk 1.2.1 and worker problem

I am setting up Apache 1.3.27 using mod_jk 1.2.1 on Solaris 8. This
setup is to allow developers to access 2 Tomcat instances running on the
same server. I used a suggestion by another list member to setup Virtual
Hosts on Apache pointing to the individual Tomcats so that one can type
in a URL to get to the manager for that Tomcat, as well as running the
manager app.

One possible issue is that I am using ajp13 as the connector on Tomcat
4.0.5 and do not want to add mod_webapp or anything like that (I do not
want to change Tomcat's config at all, if possible). However, since each
VHost will talk to only one Tomcat, I am load balancing across one
Tomcat, hence one worker. is this causing the problem (see below)?

When I try to access the manager app, I get a 500 internal Server Error.
There are no errors in the mod_jk error logs (they are still 0 bytes).
The only error message I see in on startup of Apache in the error_log:

[Fri Apr 11 14:23:50 2003] [notice] SIGHUP received.  Attempting to restart
[Fri Apr 11 14:23:50 2003] [error] (9)Bad file number: Error while opening the workers, jk will not work
[Fri Apr 11 14:23:50 2003] [notice] Apache/1.3.27 (Unix) configured -- resuming normal operations
[Fri Apr 11 14:23:50 2003] [notice] Accept mutex: fcntl (Default: fcntl)

Here is the config in the Virtual Hosts section:

<VirtualHost qa-tomcat1.wellinx.com>
    ServerAdmin linuxadmin@wellinx.com
    DocumentRoot /usr/local/apache/htdocs
    ServerName qa-tomcat1.wellinx.com
    ErrorLog logs/tomcat1-error_log
    CustomLog logs/tomcat1-access_log common
#
# Configure mod_jk
#
# Where to find workers.properties
JkWorkersFile /usr/local/apache/conf/tomcat1-workers.properties
# Where to log, what level, and format
JkLogFile logs/tomcat1-mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
#JkOptions +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# Send JSPs for context /examples to worker named worker1
JkMount /manager/* loadbalancer
#
# Set up loadbalncer for JkMount
#
JkMount /*.jsp loadbalancer
JkMount /servlets/* loadbalancer

</VirtualHost>

Here is the workers.properties file
/usr/local/apache/conf/tomcat1-workers.properties:

#
# workers.properties 
#

# In Unix, we use forward slashes:
ps=/

# list the workers by name

worker.list=tomcat1

# ------------------------
# First tomcat server
# ------------------------
worker.tomcat1.port=11009
worker.tomcat1.host=10.1.2.4
worker.tomcat1.type=ajp13

# Specify the size of the open connection cache.
#worker.tomcat1.cachesize

#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#  ----> lbfactor must be > 0
#  ----> Low lbfactor means less work done by the worker.
worker.tomcat1.lbfactor=100


#
# The loadbalancer (type lb) worker performs weighted round-robin
# load balancing with sticky sessions.
# Note:
#  ----> If a worker dies, the load balancer will check its state
#        once in a while. Until then all work is redirected to peer
#        worker.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1
#
# END workers.properties

Thanks,

Ben Ricker
-- 
Ben Ricker <br...@wellinx.com>
Wellinx.com


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


Re: mod_jk 1.2.1 and worker problem

Posted by John Turner <to...@johnturner.com>.
Sorry Ben, I'm stumped, too.

John

On 14 Apr 2003 12:09:48 -0500, Ben Ricker <br...@wellinx.com> wrote:

> On Mon, 2003-04-14 at 10:23, John Turner wrote:
>> Hmmm..."bad file number" isn't good.  I'd say that means either that the 
>> workers.properties file can't be opened, or the socket to Tomcat can't 
>> be opened, but I'd be guessing without getting into the source and 
>> poking around.
>>
>> John
>
> Following the socket possibility (I checked the permissions which were
> set at 644; I even chowned the owner to Apache's parent User. Still no
> joy), I wonder if the issue is the socket. I copied the
> workers.properties from the main Apache servers which serve the app.
> They are on separate servers. The server I am having the problem with is
> on the SAME server as the Tomcats I am trying to connect to. Since I
> used the IP in the workers.properties, I though that this may have
> something to do with it.
>
> I changed the following entry in workers.properties:
>
> worker.tomcat1.host=localhost
>
> It was set to the IP before. However, this did not make a difference. I
> still cannot see why it is not loading a worker.
>
> I also tried to setup two workers, one with a lb weight of 100 and the
> other with an lb weight of 1. Still get the same error, although I do
> see the following in the mod_jk.log:
>
> [Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (375)]: Into 
> jk_uri_worker_map_t::uri_worker_map_open
> [Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (396)]: 
> jk_uri_worker_map_t::uri_worker_map_open, rule map size is 3
> [Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (321)]: Into 
> jk_uri_worker_map_t::uri_worker_map_open, match rule 
> /manager/=loadbalancer was added
> [Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (299)]: Into 
> jk_uri_worker_map_t::uri_worker_map_open, suffix rule /.jsp=loadbalancer 
> was added
> [Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (321)]: Into 
> jk_uri_worker_map_t::uri_worker_map_open, match rule 
> /servlets/=loadbalancer was added
> [Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (408)]: Into 
> jk_uri_worker_map_t::uri_worker_map_open, there are 3 rules
> [Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (422)]: 
> jk_uri_worker_map_t::uri_worker_map_open, done
>
> This looks like the workers are being opened, but it still returns a
> worker not found error when I am trying to access the manager!
>
> Dazed and Confused,
>
> Ben Ricker
>
>>
>> On 14 Apr 2003 10:13:30 -0500, Ben Ricker <br...@wellinx.com> wrote:
>>
>> > On Mon, 2003-04-14 at 10:00, John Turner wrote:
>> >> Gotcha.  My fault, I tend to be really literal at times.  Looks to me 
>> >> like JK is telling you that you are using a worker it doesn't know >> 
>> about.
>> >
>> > Is that what the error on Apache's error.log is saying with the line:
>> >
>> > [Mon Apr 14 10:08:46 2003] [error] (9)Bad file number: Error while > 
>> opening the workers, jk will not work
>> >
>> > I do not understand what this error is saying...Bad file number?
>> >
>> > I still get the same error after changing the workers.properties file 
>> to
>> > the following:
>> >
>> > worker.list=tomcat1,loadbalancer
>> >
>> > I did not have the loadbalancer listed in the first iteration.
>> >
>> > The errors look the same. Mod_jk logs that it cannot find a worker to
>> > process the request.
>> >
>> > Ben Ricker
>> >
>> >> Try adding "loadbalancer" to worker.list.  Probably won't solve your 
>> >> problem totally, but I bet it gets you a different log message which 
>> >> will indicate the next step to take.
>> >>
>> >> John
>> >>
>> >> On 14 Apr 2003 09:42:51 -0500, Ben Ricker <br...@wellinx.com> 
>> wrote:
>> >>
>> >> > On Mon, 2003-04-14 at 09:00, John Turner wrote:
>> >> >> Sure, you can run with just one worker, I guess my question is 
>> what >> are >> you doing with 2 Tomcats?  You've mentioned that you have 
>> two, >> but in >> your config only one is being accessed, and since 
>> you're >> running Apache >> neither Tomcat is on port 80, so how are 
>> both Tomcats >> being reached?
>> >> >>
>> >> >> Or am I being too literal?  Do you have duplicates of the >> 
>> configuration >> files you posted, but for a second Tomcat, with the >> 
>> appropriate changes?
>> >> >
>> >> > Yes.
>> >> >
>> >> > I see the confusion, probably due to my lack of clarity. I have a 
>> >> setup
>> >> > with two Apache servers load balancing to two Tomcat servers with 4
>> >> > total Tomcat instances. What I want to do is to put Apache on each 
>> >> Java
>> >> > server and setup two VHosts to talk each respective Tomcat. That 
>> way, >> we
>> >> > can manage the Tomcats individually.
>> >> >
>> >> > I setup the Apache Vhost as I posted earlier. I did not include the
>> >> > second Apache config because I am trying to get the first one to 
>> work.
>> >> > If I get a working config for one, it is trivial to cut-and-paste 
>> the
>> >> > config so that the second Vhost can talk to the second Tomcat.
>> >> >
>> >> > However, I cannot get the first Apache Vhost to talk to the first
>> >> > Tomcat. I just get the 500 Internal Server error.
>> >> >
>> >> > I turned on debug and the problem seems to be that mod_jk is not >> 
>> getting
>> >> > loaded. Here is the error from the Apache error_log:
>> >> >
>> >> > SIGUSR1 received.  Doing graceful restart
>> >> > [Mon Apr 14 09:39:48 2003] [error] (9)Bad file number: Error while 
>> > >> opening the workers, jk will not work
>> >> > [Mon Apr 14 09:39:48 2003] [notice] Apache/1.3.27 (Unix) configured 
>> -- >> > resuming normal operations
>> >> > [Mon Apr 14 09:39:48 2003] [notice] Accept mutex: fcntl (Default: 
>> >> fcntl)
>> >> >
>> >> > The debug on mod_jk throws the "worker not found" error, even 
>> though >> it
>> >> > does parse the request. Here is the pertinent debug output:
>> >> >
>> >> > [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (460)]: Into > >> 
>> jk_uri_worker_map_t::map_uri_to_worker
>> >> > [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (477)]: Attempting 
>> to >> > map URI '/manager/list'
>> >> > [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (502)]: > >> 
>> jk_uri_worker_map_t::map_uri_to_worker, Found a context match > >> 
>> loadbalancer -> /manager/
>> >> > [Mon Apr 14 09:44:06 2003]  [jk_worker.c (132)]: Into > >> 
>> wc_get_worker_for_name loadbalancer
>> >> > [Mon Apr 14 09:44:06 2003]  [jk_worker.c (136)]: >> 
>> wc_get_worker_for_name, > done did not found a worker
>> >> >
>> >> > Does that make more sense?
>> >> >
>> >> > Thanks for your patience, as usual.
>> >> >
>> >> > Ben Ricker
>> >> > Wellinx.com
>> >> >
>> >> >
>> >> >> On 14 Apr 2003 08:45:24 -0500, Ben Ricker <br...@wellinx.com> >> 
>> wrote:
>> >> >>
>> >> >> > On Mon, 2003-04-14 at 07:58, John Turner wrote:
>> >> >> >> Where is the other Tomcat?  Your config only shows one worker, 
>> and >> >> one >> Connector on port 11009.  Where's the other one?
>> >> >> >>
>> >> >> >> John
>> >> >> >
>> >> >> > Here is the issue: I only want the connector to attach to one >> 
>> Tomcat.
>> >> >> > This is only to use the manager to attach to a single Tomcat >> 
>> instance >> to
>> >> >> > run the manager app and launch some internal to the app 
>> monitoring
>> >> >> > servlets. Can the ajp13 connector run with only one worker?
>> >> >> >
>> >> >> > Another possibility is to put in two workers but lb one really 
>> high >> >> and
>> >> >> > set the second one really low (like 100 and 0?).
>> >> >> >
>> >> >> > Thanks,
>> >> >> >
>> >> >> > Ben Ricker
>> >> >> >
>> >> >> >> On 11 Apr 2003 14:51:33 -0500, Ben Ricker <br...@wellinx.com> 
>> >> >> wrote:
>> >> >> >>
>> >> >> >> > I am setting up Apache 1.3.27 using mod_jk 1.2.1 on Solaris 
>> 8. >> This
>> >> >> >> > setup is to allow developers to access 2 Tomcat instances >> 
>> running >> on >> the
>> >> >> >> > same server. I used a suggestion by another list member to 
>> setup >> >> >> Virtual
>> >> >> >> > Hosts on Apache pointing to the individual Tomcats so that 
>> one >> can >> >> type
>> >> >> >> > in a URL to get to the manager for that Tomcat, as well as >> 
>> running >> the
>> >> >> >> > manager app.
>> >> >> >> >
>> >> >> >> > One possible issue is that I am using ajp13 as the connector 
>> on >> >> Tomcat
>> >> >> >> > 4.0.5 and do not want to add mod_webapp or anything like that 
>> (I >> do >> >> not
>> >> >> >> > want to change Tomcat's config at all, if possible). However, 
>> >> since >> >> each
>> >> >> >> > VHost will talk to only one Tomcat, I am load balancing 
>> across >> one
>> >> >> >> > Tomcat, hence one worker. is this causing the problem (see >> 
>> below)?
>> >> >> >> >
>> >> >> >> > When I try to access the manager app, I get a 500 internal >> 
>> Server >> >> Error.
>> >> >> >> > There are no errors in the mod_jk error logs (they are still 
>> 0 >> >> bytes).
>> >> >> >> > The only error message I see in on startup of Apache in the 
>> >> >> error_log:
>> >> >> >> >
>> >> >> >> > [Fri Apr 11 14:23:50 2003] [notice] SIGHUP received.  
>> Attempting >> to >> > >> restart
>> >> >> >> > [Fri Apr 11 14:23:50 2003] [error] (9)Bad file number: Error 
>> >> while >> > >> opening the workers, jk will not work
>> >> >> >> > [Fri Apr 11 14:23:50 2003] [notice] Apache/1.3.27 (Unix) >> 
>> configured >> -- >> > resuming normal operations
>> >> >> >> > [Fri Apr 11 14:23:50 2003] [notice] Accept mutex: fcntl >> 
>> (Default: >> >> fcntl)
>> >> >> >> >
>> >> >> >> > Here is the config in the Virtual Hosts section:
>> >> >> >> >
>> >> >> >> > <VirtualHost qa-tomcat1.wellinx.com>
>> >> >> >> > ServerAdmin linuxadmin@wellinx.com
>> >> >> >> > DocumentRoot /usr/local/apache/htdocs
>> >> >> >> > ServerName qa-tomcat1.wellinx.com
>> >> >> >> > ErrorLog logs/tomcat1-error_log
>> >> >> >> > CustomLog logs/tomcat1-access_log common
>> >> >> >> > #
>> >> >> >> > # Configure mod_jk
>> >> >> >> > #
>> >> >> >> > # Where to find workers.properties
>> >> >> >> > JkWorkersFile /usr/local/apache/conf/tomcat1- 
>> workers.properties
>> >> >> >> > # Where to log, what level, and format
>> >> >> >> > JkLogFile logs/tomcat1-mod_jk.log
>> >> >> >> > JkLogLevel info
>> >> >> >> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>> >> >> >> > #JkOptions +ForwardURICompat -ForwardDirectories
>> >> >> >> > # JkRequestLogFormat set the request format
>> >> >> >> > JkRequestLogFormat "%w %V %T"
>> >> >> >> > # Send JSPs for context /examples to worker named worker1
>> >> >> >> > JkMount /manager/* loadbalancer
>> >> >> >> > #
>> >> >> >> > # Set up loadbalncer for JkMount
>> >> >> >> > #
>> >> >> >> > JkMount /*.jsp loadbalancer
>> >> >> >> > JkMount /servlets/* loadbalancer
>> >> >> >> >
>> >> >> >> > </VirtualHost>
>> >> >> >> >
>> >> >> >> > Here is the workers.properties file
>> >> >> >> > /usr/local/apache/conf/tomcat1-workers.properties:
>> >> >> >> >
>> >> >> >> > #
>> >> >> >> > # workers.properties #
>> >> >> >> >
>> >> >> >> > # In Unix, we use forward slashes:
>> >> >> >> > ps=/
>> >> >> >> >
>> >> >> >> > # list the workers by name
>> >> >> >> >
>> >> >> >> > worker.list=tomcat1
>> >> >> >> >
>> >> >> >> > # ------------------------
>> >> >> >> > # First tomcat server
>> >> >> >> > # ------------------------
>> >> >> >> > worker.tomcat1.port=11009
>> >> >> >> > worker.tomcat1.host=10.1.2.4
>> >> >> >> > worker.tomcat1.type=ajp13
>> >> >> >> >
>> >> >> >> > # Specify the size of the open connection cache.
>> >> >> >> > #worker.tomcat1.cachesize
>> >> >> >> >
>> >> >> >> > #
>> >> >> >> > # Specifies the load balance factor when used with
>> >> >> >> > # a load balancing worker.
>> >> >> >> > # Note:
>> >> >> >> > #  ----> lbfactor must be > 0
>> >> >> >> > #  ----> Low lbfactor means less work done by the worker.
>> >> >> >> > worker.tomcat1.lbfactor=100
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > #
>> >> >> >> > # The loadbalancer (type lb) worker performs weighted round- 
>> >> robin
>> >> >> >> > # load balancing with sticky sessions.
>> >> >> >> > # Note:
>> >> >> >> > #  ----> If a worker dies, the load balancer will check its 
>> >> state
>> >> >> >> > #        once in a while. Until then all work is redirected 
>> to >> peer
>> >> >> >> > #        worker.
>> >> >> >> > worker.loadbalancer.type=lb
>> >> >> >> > worker.loadbalancer.balanced_workers=tomcat1
>> >> >> >> > #
>> >> >> >> > # END workers.properties
>> >> >> >> >
>> >> >> >> > Thanks,
>> >> >> >> >
>> >> >> >> > Ben Ricker



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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


Re: mod_jk 1.2.1 and worker problem

Posted by Ben Ricker <br...@wellinx.com>.
On Mon, 2003-04-14 at 10:23, John Turner wrote:
> Hmmm..."bad file number" isn't good.  I'd say that means either that the 
> workers.properties file can't be opened, or the socket to Tomcat can't be 
> opened, but I'd be guessing without getting into the source and poking 
> around.
> 
> John

Following the socket possibility (I checked the permissions which were
set at 644; I even chowned the owner to Apache's parent User. Still no
joy), I wonder if the issue is the socket. I copied the
workers.properties from the main Apache servers which serve the app.
They are on separate servers. The server I am having the problem with is
on the SAME server as the Tomcats I am trying to connect to. Since I
used the IP in the workers.properties, I though that this may have
something to do with it.

I changed the following entry in workers.properties: 

worker.tomcat1.host=localhost

It was set to the IP before. However, this did not make a difference. I
still cannot see why it is not loading a worker.

I also tried to setup two workers, one with a lb weight of 100 and the
other with an lb weight of 1. Still get the same error, although I do
see the following in the mod_jk.log:

[Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (375)]: Into jk_uri_worker_map_t::uri_worker_map_open
[Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (396)]: jk_uri_worker_map_t::uri_worker_map_open, rule map size is 3
[Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (321)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /manager/=loadbalancer was added
[Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (299)]: Into jk_uri_worker_map_t::uri_worker_map_open, suffix rule /.jsp=loadbalancer was added
[Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (321)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /servlets/=loadbalancer was added
[Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (408)]: Into jk_uri_worker_map_t::uri_worker_map_open, there are 3 rules
[Mon Apr 14 12:08:54 2003]  [jk_uri_worker_map.c (422)]: jk_uri_worker_map_t::uri_worker_map_open, done

This looks like the workers are being opened, but it still returns a
worker not found error when I am trying to access the manager!

Dazed and Confused,

Ben Ricker

> 
> On 14 Apr 2003 10:13:30 -0500, Ben Ricker <br...@wellinx.com> wrote:
> 
> > On Mon, 2003-04-14 at 10:00, John Turner wrote:
> >> Gotcha.  My fault, I tend to be really literal at times.  Looks to me 
> >> like JK is telling you that you are using a worker it doesn't know 
> >> about.
> >
> > Is that what the error on Apache's error.log is saying with the line:
> >
> > [Mon Apr 14 10:08:46 2003] [error] (9)Bad file number: Error while 
> > opening the workers, jk will not work
> >
> > I do not understand what this error is saying...Bad file number?
> >
> > I still get the same error after changing the workers.properties file to
> > the following:
> >
> > worker.list=tomcat1,loadbalancer
> >
> > I did not have the loadbalancer listed in the first iteration.
> >
> > The errors look the same. Mod_jk logs that it cannot find a worker to
> > process the request.
> >
> > Ben Ricker
> >
> >> Try adding "loadbalancer" to worker.list.  Probably won't solve your 
> >> problem totally, but I bet it gets you a different log message which 
> >> will indicate the next step to take.
> >>
> >> John
> >>
> >> On 14 Apr 2003 09:42:51 -0500, Ben Ricker <br...@wellinx.com> wrote:
> >>
> >> > On Mon, 2003-04-14 at 09:00, John Turner wrote:
> >> >> Sure, you can run with just one worker, I guess my question is what 
> >> are >> you doing with 2 Tomcats?  You've mentioned that you have two, 
> >> but in >> your config only one is being accessed, and since you're 
> >> running Apache >> neither Tomcat is on port 80, so how are both Tomcats 
> >> being reached?
> >> >>
> >> >> Or am I being too literal?  Do you have duplicates of the 
> >> configuration >> files you posted, but for a second Tomcat, with the 
> >> appropriate changes?
> >> >
> >> > Yes.
> >> >
> >> > I see the confusion, probably due to my lack of clarity. I have a 
> >> setup
> >> > with two Apache servers load balancing to two Tomcat servers with 4
> >> > total Tomcat instances. What I want to do is to put Apache on each 
> >> Java
> >> > server and setup two VHosts to talk each respective Tomcat. That way, 
> >> we
> >> > can manage the Tomcats individually.
> >> >
> >> > I setup the Apache Vhost as I posted earlier. I did not include the
> >> > second Apache config because I am trying to get the first one to work.
> >> > If I get a working config for one, it is trivial to cut-and-paste the
> >> > config so that the second Vhost can talk to the second Tomcat.
> >> >
> >> > However, I cannot get the first Apache Vhost to talk to the first
> >> > Tomcat. I just get the 500 Internal Server error.
> >> >
> >> > I turned on debug and the problem seems to be that mod_jk is not 
> >> getting
> >> > loaded. Here is the error from the Apache error_log:
> >> >
> >> > SIGUSR1 received.  Doing graceful restart
> >> > [Mon Apr 14 09:39:48 2003] [error] (9)Bad file number: Error while > 
> >> opening the workers, jk will not work
> >> > [Mon Apr 14 09:39:48 2003] [notice] Apache/1.3.27 (Unix) configured -- 
> >> > resuming normal operations
> >> > [Mon Apr 14 09:39:48 2003] [notice] Accept mutex: fcntl (Default: 
> >> fcntl)
> >> >
> >> > The debug on mod_jk throws the "worker not found" error, even though 
> >> it
> >> > does parse the request. Here is the pertinent debug output:
> >> >
> >> > [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (460)]: Into > 
> >> jk_uri_worker_map_t::map_uri_to_worker
> >> > [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (477)]: Attempting to 
> >> > map URI '/manager/list'
> >> > [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (502)]: > 
> >> jk_uri_worker_map_t::map_uri_to_worker, Found a context match > 
> >> loadbalancer -> /manager/
> >> > [Mon Apr 14 09:44:06 2003]  [jk_worker.c (132)]: Into > 
> >> wc_get_worker_for_name loadbalancer
> >> > [Mon Apr 14 09:44:06 2003]  [jk_worker.c (136)]: 
> >> wc_get_worker_for_name, > done did not found a worker
> >> >
> >> > Does that make more sense?
> >> >
> >> > Thanks for your patience, as usual.
> >> >
> >> > Ben Ricker
> >> > Wellinx.com
> >> >
> >> >
> >> >> On 14 Apr 2003 08:45:24 -0500, Ben Ricker <br...@wellinx.com> 
> >> wrote:
> >> >>
> >> >> > On Mon, 2003-04-14 at 07:58, John Turner wrote:
> >> >> >> Where is the other Tomcat?  Your config only shows one worker, and 
> >> >> one >> Connector on port 11009.  Where's the other one?
> >> >> >>
> >> >> >> John
> >> >> >
> >> >> > Here is the issue: I only want the connector to attach to one 
> >> Tomcat.
> >> >> > This is only to use the manager to attach to a single Tomcat 
> >> instance >> to
> >> >> > run the manager app and launch some internal to the app monitoring
> >> >> > servlets. Can the ajp13 connector run with only one worker?
> >> >> >
> >> >> > Another possibility is to put in two workers but lb one really high 
> >> >> and
> >> >> > set the second one really low (like 100 and 0?).
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > Ben Ricker
> >> >> >
> >> >> >> On 11 Apr 2003 14:51:33 -0500, Ben Ricker <br...@wellinx.com> >> 
> >> wrote:
> >> >> >>
> >> >> >> > I am setting up Apache 1.3.27 using mod_jk 1.2.1 on Solaris 8. 
> >> This
> >> >> >> > setup is to allow developers to access 2 Tomcat instances 
> >> running >> on >> the
> >> >> >> > same server. I used a suggestion by another list member to setup 
> >> >> >> Virtual
> >> >> >> > Hosts on Apache pointing to the individual Tomcats so that one 
> >> can >> >> type
> >> >> >> > in a URL to get to the manager for that Tomcat, as well as 
> >> running >> the
> >> >> >> > manager app.
> >> >> >> >
> >> >> >> > One possible issue is that I am using ajp13 as the connector on 
> >> >> Tomcat
> >> >> >> > 4.0.5 and do not want to add mod_webapp or anything like that (I 
> >> do >> >> not
> >> >> >> > want to change Tomcat's config at all, if possible). However, 
> >> since >> >> each
> >> >> >> > VHost will talk to only one Tomcat, I am load balancing across 
> >> one
> >> >> >> > Tomcat, hence one worker. is this causing the problem (see 
> >> below)?
> >> >> >> >
> >> >> >> > When I try to access the manager app, I get a 500 internal 
> >> Server >> >> Error.
> >> >> >> > There are no errors in the mod_jk error logs (they are still 0 
> >> >> bytes).
> >> >> >> > The only error message I see in on startup of Apache in the >> 
> >> error_log:
> >> >> >> >
> >> >> >> > [Fri Apr 11 14:23:50 2003] [notice] SIGHUP received.  Attempting 
> >> to >> > >> restart
> >> >> >> > [Fri Apr 11 14:23:50 2003] [error] (9)Bad file number: Error 
> >> while >> > >> opening the workers, jk will not work
> >> >> >> > [Fri Apr 11 14:23:50 2003] [notice] Apache/1.3.27 (Unix) 
> >> configured >> -- >> > resuming normal operations
> >> >> >> > [Fri Apr 11 14:23:50 2003] [notice] Accept mutex: fcntl 
> >> (Default: >> >> fcntl)
> >> >> >> >
> >> >> >> > Here is the config in the Virtual Hosts section:
> >> >> >> >
> >> >> >> > <VirtualHost qa-tomcat1.wellinx.com>
> >> >> >> > ServerAdmin linuxadmin@wellinx.com
> >> >> >> > DocumentRoot /usr/local/apache/htdocs
> >> >> >> > ServerName qa-tomcat1.wellinx.com
> >> >> >> > ErrorLog logs/tomcat1-error_log
> >> >> >> > CustomLog logs/tomcat1-access_log common
> >> >> >> > #
> >> >> >> > # Configure mod_jk
> >> >> >> > #
> >> >> >> > # Where to find workers.properties
> >> >> >> > JkWorkersFile /usr/local/apache/conf/tomcat1-workers.properties
> >> >> >> > # Where to log, what level, and format
> >> >> >> > JkLogFile logs/tomcat1-mod_jk.log
> >> >> >> > JkLogLevel info
> >> >> >> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> >> >> >> > #JkOptions +ForwardURICompat -ForwardDirectories
> >> >> >> > # JkRequestLogFormat set the request format
> >> >> >> > JkRequestLogFormat "%w %V %T"
> >> >> >> > # Send JSPs for context /examples to worker named worker1
> >> >> >> > JkMount /manager/* loadbalancer
> >> >> >> > #
> >> >> >> > # Set up loadbalncer for JkMount
> >> >> >> > #
> >> >> >> > JkMount /*.jsp loadbalancer
> >> >> >> > JkMount /servlets/* loadbalancer
> >> >> >> >
> >> >> >> > </VirtualHost>
> >> >> >> >
> >> >> >> > Here is the workers.properties file
> >> >> >> > /usr/local/apache/conf/tomcat1-workers.properties:
> >> >> >> >
> >> >> >> > #
> >> >> >> > # workers.properties #
> >> >> >> >
> >> >> >> > # In Unix, we use forward slashes:
> >> >> >> > ps=/
> >> >> >> >
> >> >> >> > # list the workers by name
> >> >> >> >
> >> >> >> > worker.list=tomcat1
> >> >> >> >
> >> >> >> > # ------------------------
> >> >> >> > # First tomcat server
> >> >> >> > # ------------------------
> >> >> >> > worker.tomcat1.port=11009
> >> >> >> > worker.tomcat1.host=10.1.2.4
> >> >> >> > worker.tomcat1.type=ajp13
> >> >> >> >
> >> >> >> > # Specify the size of the open connection cache.
> >> >> >> > #worker.tomcat1.cachesize
> >> >> >> >
> >> >> >> > #
> >> >> >> > # Specifies the load balance factor when used with
> >> >> >> > # a load balancing worker.
> >> >> >> > # Note:
> >> >> >> > #  ----> lbfactor must be > 0
> >> >> >> > #  ----> Low lbfactor means less work done by the worker.
> >> >> >> > worker.tomcat1.lbfactor=100
> >> >> >> >
> >> >> >> >
> >> >> >> > #
> >> >> >> > # The loadbalancer (type lb) worker performs weighted round- 
> >> robin
> >> >> >> > # load balancing with sticky sessions.
> >> >> >> > # Note:
> >> >> >> > #  ----> If a worker dies, the load balancer will check its 
> >> state
> >> >> >> > #        once in a while. Until then all work is redirected to 
> >> peer
> >> >> >> > #        worker.
> >> >> >> > worker.loadbalancer.type=lb
> >> >> >> > worker.loadbalancer.balanced_workers=tomcat1
> >> >> >> > #
> >> >> >> > # END workers.properties
> >> >> >> >
> >> >> >> > Thanks,
> >> >> >> >
> >> >> >> > Ben Ricker
-- 
Ben Ricker <br...@wellinx.com>
Wellinx.com


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


Re: mod_jk 1.2.1 and worker problem

Posted by John Turner <to...@johnturner.com>.
Hmmm..."bad file number" isn't good.  I'd say that means either that the 
workers.properties file can't be opened, or the socket to Tomcat can't be 
opened, but I'd be guessing without getting into the source and poking 
around.

John


On 14 Apr 2003 10:13:30 -0500, Ben Ricker <br...@wellinx.com> wrote:

> On Mon, 2003-04-14 at 10:00, John Turner wrote:
>> Gotcha.  My fault, I tend to be really literal at times.  Looks to me 
>> like JK is telling you that you are using a worker it doesn't know 
>> about.
>
> Is that what the error on Apache's error.log is saying with the line:
>
> [Mon Apr 14 10:08:46 2003] [error] (9)Bad file number: Error while 
> opening the workers, jk will not work
>
> I do not understand what this error is saying...Bad file number?
>
> I still get the same error after changing the workers.properties file to
> the following:
>
> worker.list=tomcat1,loadbalancer
>
> I did not have the loadbalancer listed in the first iteration.
>
> The errors look the same. Mod_jk logs that it cannot find a worker to
> process the request.
>
> Ben Ricker
>
>> Try adding "loadbalancer" to worker.list.  Probably won't solve your 
>> problem totally, but I bet it gets you a different log message which 
>> will indicate the next step to take.
>>
>> John
>>
>> On 14 Apr 2003 09:42:51 -0500, Ben Ricker <br...@wellinx.com> wrote:
>>
>> > On Mon, 2003-04-14 at 09:00, John Turner wrote:
>> >> Sure, you can run with just one worker, I guess my question is what 
>> are >> you doing with 2 Tomcats?  You've mentioned that you have two, 
>> but in >> your config only one is being accessed, and since you're 
>> running Apache >> neither Tomcat is on port 80, so how are both Tomcats 
>> being reached?
>> >>
>> >> Or am I being too literal?  Do you have duplicates of the 
>> configuration >> files you posted, but for a second Tomcat, with the 
>> appropriate changes?
>> >
>> > Yes.
>> >
>> > I see the confusion, probably due to my lack of clarity. I have a 
>> setup
>> > with two Apache servers load balancing to two Tomcat servers with 4
>> > total Tomcat instances. What I want to do is to put Apache on each 
>> Java
>> > server and setup two VHosts to talk each respective Tomcat. That way, 
>> we
>> > can manage the Tomcats individually.
>> >
>> > I setup the Apache Vhost as I posted earlier. I did not include the
>> > second Apache config because I am trying to get the first one to work.
>> > If I get a working config for one, it is trivial to cut-and-paste the
>> > config so that the second Vhost can talk to the second Tomcat.
>> >
>> > However, I cannot get the first Apache Vhost to talk to the first
>> > Tomcat. I just get the 500 Internal Server error.
>> >
>> > I turned on debug and the problem seems to be that mod_jk is not 
>> getting
>> > loaded. Here is the error from the Apache error_log:
>> >
>> > SIGUSR1 received.  Doing graceful restart
>> > [Mon Apr 14 09:39:48 2003] [error] (9)Bad file number: Error while > 
>> opening the workers, jk will not work
>> > [Mon Apr 14 09:39:48 2003] [notice] Apache/1.3.27 (Unix) configured -- 
>> > resuming normal operations
>> > [Mon Apr 14 09:39:48 2003] [notice] Accept mutex: fcntl (Default: 
>> fcntl)
>> >
>> > The debug on mod_jk throws the "worker not found" error, even though 
>> it
>> > does parse the request. Here is the pertinent debug output:
>> >
>> > [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (460)]: Into > 
>> jk_uri_worker_map_t::map_uri_to_worker
>> > [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (477)]: Attempting to 
>> > map URI '/manager/list'
>> > [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (502)]: > 
>> jk_uri_worker_map_t::map_uri_to_worker, Found a context match > 
>> loadbalancer -> /manager/
>> > [Mon Apr 14 09:44:06 2003]  [jk_worker.c (132)]: Into > 
>> wc_get_worker_for_name loadbalancer
>> > [Mon Apr 14 09:44:06 2003]  [jk_worker.c (136)]: 
>> wc_get_worker_for_name, > done did not found a worker
>> >
>> > Does that make more sense?
>> >
>> > Thanks for your patience, as usual.
>> >
>> > Ben Ricker
>> > Wellinx.com
>> >
>> >
>> >> On 14 Apr 2003 08:45:24 -0500, Ben Ricker <br...@wellinx.com> 
>> wrote:
>> >>
>> >> > On Mon, 2003-04-14 at 07:58, John Turner wrote:
>> >> >> Where is the other Tomcat?  Your config only shows one worker, and 
>> >> one >> Connector on port 11009.  Where's the other one?
>> >> >>
>> >> >> John
>> >> >
>> >> > Here is the issue: I only want the connector to attach to one 
>> Tomcat.
>> >> > This is only to use the manager to attach to a single Tomcat 
>> instance >> to
>> >> > run the manager app and launch some internal to the app monitoring
>> >> > servlets. Can the ajp13 connector run with only one worker?
>> >> >
>> >> > Another possibility is to put in two workers but lb one really high 
>> >> and
>> >> > set the second one really low (like 100 and 0?).
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Ben Ricker
>> >> >
>> >> >> On 11 Apr 2003 14:51:33 -0500, Ben Ricker <br...@wellinx.com> >> 
>> wrote:
>> >> >>
>> >> >> > I am setting up Apache 1.3.27 using mod_jk 1.2.1 on Solaris 8. 
>> This
>> >> >> > setup is to allow developers to access 2 Tomcat instances 
>> running >> on >> the
>> >> >> > same server. I used a suggestion by another list member to setup 
>> >> >> Virtual
>> >> >> > Hosts on Apache pointing to the individual Tomcats so that one 
>> can >> >> type
>> >> >> > in a URL to get to the manager for that Tomcat, as well as 
>> running >> the
>> >> >> > manager app.
>> >> >> >
>> >> >> > One possible issue is that I am using ajp13 as the connector on 
>> >> Tomcat
>> >> >> > 4.0.5 and do not want to add mod_webapp or anything like that (I 
>> do >> >> not
>> >> >> > want to change Tomcat's config at all, if possible). However, 
>> since >> >> each
>> >> >> > VHost will talk to only one Tomcat, I am load balancing across 
>> one
>> >> >> > Tomcat, hence one worker. is this causing the problem (see 
>> below)?
>> >> >> >
>> >> >> > When I try to access the manager app, I get a 500 internal 
>> Server >> >> Error.
>> >> >> > There are no errors in the mod_jk error logs (they are still 0 
>> >> bytes).
>> >> >> > The only error message I see in on startup of Apache in the >> 
>> error_log:
>> >> >> >
>> >> >> > [Fri Apr 11 14:23:50 2003] [notice] SIGHUP received.  Attempting 
>> to >> > >> restart
>> >> >> > [Fri Apr 11 14:23:50 2003] [error] (9)Bad file number: Error 
>> while >> > >> opening the workers, jk will not work
>> >> >> > [Fri Apr 11 14:23:50 2003] [notice] Apache/1.3.27 (Unix) 
>> configured >> -- >> > resuming normal operations
>> >> >> > [Fri Apr 11 14:23:50 2003] [notice] Accept mutex: fcntl 
>> (Default: >> >> fcntl)
>> >> >> >
>> >> >> > Here is the config in the Virtual Hosts section:
>> >> >> >
>> >> >> > <VirtualHost qa-tomcat1.wellinx.com>
>> >> >> > ServerAdmin linuxadmin@wellinx.com
>> >> >> > DocumentRoot /usr/local/apache/htdocs
>> >> >> > ServerName qa-tomcat1.wellinx.com
>> >> >> > ErrorLog logs/tomcat1-error_log
>> >> >> > CustomLog logs/tomcat1-access_log common
>> >> >> > #
>> >> >> > # Configure mod_jk
>> >> >> > #
>> >> >> > # Where to find workers.properties
>> >> >> > JkWorkersFile /usr/local/apache/conf/tomcat1-workers.properties
>> >> >> > # Where to log, what level, and format
>> >> >> > JkLogFile logs/tomcat1-mod_jk.log
>> >> >> > JkLogLevel info
>> >> >> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>> >> >> > #JkOptions +ForwardURICompat -ForwardDirectories
>> >> >> > # JkRequestLogFormat set the request format
>> >> >> > JkRequestLogFormat "%w %V %T"
>> >> >> > # Send JSPs for context /examples to worker named worker1
>> >> >> > JkMount /manager/* loadbalancer
>> >> >> > #
>> >> >> > # Set up loadbalncer for JkMount
>> >> >> > #
>> >> >> > JkMount /*.jsp loadbalancer
>> >> >> > JkMount /servlets/* loadbalancer
>> >> >> >
>> >> >> > </VirtualHost>
>> >> >> >
>> >> >> > Here is the workers.properties file
>> >> >> > /usr/local/apache/conf/tomcat1-workers.properties:
>> >> >> >
>> >> >> > #
>> >> >> > # workers.properties #
>> >> >> >
>> >> >> > # In Unix, we use forward slashes:
>> >> >> > ps=/
>> >> >> >
>> >> >> > # list the workers by name
>> >> >> >
>> >> >> > worker.list=tomcat1
>> >> >> >
>> >> >> > # ------------------------
>> >> >> > # First tomcat server
>> >> >> > # ------------------------
>> >> >> > worker.tomcat1.port=11009
>> >> >> > worker.tomcat1.host=10.1.2.4
>> >> >> > worker.tomcat1.type=ajp13
>> >> >> >
>> >> >> > # Specify the size of the open connection cache.
>> >> >> > #worker.tomcat1.cachesize
>> >> >> >
>> >> >> > #
>> >> >> > # Specifies the load balance factor when used with
>> >> >> > # a load balancing worker.
>> >> >> > # Note:
>> >> >> > #  ----> lbfactor must be > 0
>> >> >> > #  ----> Low lbfactor means less work done by the worker.
>> >> >> > worker.tomcat1.lbfactor=100
>> >> >> >
>> >> >> >
>> >> >> > #
>> >> >> > # The loadbalancer (type lb) worker performs weighted round- 
>> robin
>> >> >> > # load balancing with sticky sessions.
>> >> >> > # Note:
>> >> >> > #  ----> If a worker dies, the load balancer will check its 
>> state
>> >> >> > #        once in a while. Until then all work is redirected to 
>> peer
>> >> >> > #        worker.
>> >> >> > worker.loadbalancer.type=lb
>> >> >> > worker.loadbalancer.balanced_workers=tomcat1
>> >> >> > #
>> >> >> > # END workers.properties
>> >> >> >
>> >> >> > Thanks,
>> >> >> >
>> >> >> > Ben Ricker



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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


Re: mod_jk 1.2.1 and worker problem

Posted by Ben Ricker <br...@wellinx.com>.
On Mon, 2003-04-14 at 10:00, John Turner wrote:
> Gotcha.  My fault, I tend to be really literal at times.  Looks to me like 
> JK is telling you that you are using a worker it doesn't know about.

Is that what the error on Apache's error.log is saying with the line:

[Mon Apr 14 10:08:46 2003] [error] (9)Bad file number: Error while opening the workers, jk will not work

I do not understand what this error is saying...Bad file number?

I still get the same error after changing the workers.properties file to
the following:

worker.list=tomcat1,loadbalancer

I did not have the loadbalancer listed in the first iteration.

The errors look the same. Mod_jk logs that it cannot find a worker to
process the request.

Ben Ricker

> Try adding "loadbalancer" to worker.list.  Probably won't solve your 
> problem totally, but I bet it gets you a different log message which will 
> indicate the next step to take.
> 
> John
> 
> On 14 Apr 2003 09:42:51 -0500, Ben Ricker <br...@wellinx.com> wrote:
> 
> > On Mon, 2003-04-14 at 09:00, John Turner wrote:
> >> Sure, you can run with just one worker, I guess my question is what are 
> >> you doing with 2 Tomcats?  You've mentioned that you have two, but in 
> >> your config only one is being accessed, and since you're running Apache 
> >> neither Tomcat is on port 80, so how are both Tomcats being reached?
> >>
> >> Or am I being too literal?  Do you have duplicates of the configuration 
> >> files you posted, but for a second Tomcat, with the appropriate changes?
> >
> > Yes.
> >
> > I see the confusion, probably due to my lack of clarity. I have a setup
> > with two Apache servers load balancing to two Tomcat servers with 4
> > total Tomcat instances. What I want to do is to put Apache on each Java
> > server and setup two VHosts to talk each respective Tomcat. That way, we
> > can manage the Tomcats individually.
> >
> > I setup the Apache Vhost as I posted earlier. I did not include the
> > second Apache config because I am trying to get the first one to work.
> > If I get a working config for one, it is trivial to cut-and-paste the
> > config so that the second Vhost can talk to the second Tomcat.
> >
> > However, I cannot get the first Apache Vhost to talk to the first
> > Tomcat. I just get the 500 Internal Server error.
> >
> > I turned on debug and the problem seems to be that mod_jk is not getting
> > loaded. Here is the error from the Apache error_log:
> >
> > SIGUSR1 received.  Doing graceful restart
> > [Mon Apr 14 09:39:48 2003] [error] (9)Bad file number: Error while 
> > opening the workers, jk will not work
> > [Mon Apr 14 09:39:48 2003] [notice] Apache/1.3.27 (Unix) configured -- 
> > resuming normal operations
> > [Mon Apr 14 09:39:48 2003] [notice] Accept mutex: fcntl (Default: fcntl)
> >
> > The debug on mod_jk throws the "worker not found" error, even though it
> > does parse the request. Here is the pertinent debug output:
> >
> > [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (460)]: Into 
> > jk_uri_worker_map_t::map_uri_to_worker
> > [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (477)]: Attempting to 
> > map URI '/manager/list'
> > [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (502)]: 
> > jk_uri_worker_map_t::map_uri_to_worker, Found a context match 
> > loadbalancer -> /manager/
> > [Mon Apr 14 09:44:06 2003]  [jk_worker.c (132)]: Into 
> > wc_get_worker_for_name loadbalancer
> > [Mon Apr 14 09:44:06 2003]  [jk_worker.c (136)]: wc_get_worker_for_name, 
> > done did not found a worker
> >
> > Does that make more sense?
> >
> > Thanks for your patience, as usual.
> >
> > Ben Ricker
> > Wellinx.com
> >
> >
> >> On 14 Apr 2003 08:45:24 -0500, Ben Ricker <br...@wellinx.com> wrote:
> >>
> >> > On Mon, 2003-04-14 at 07:58, John Turner wrote:
> >> >> Where is the other Tomcat?  Your config only shows one worker, and 
> >> one >> Connector on port 11009.  Where's the other one?
> >> >>
> >> >> John
> >> >
> >> > Here is the issue: I only want the connector to attach to one Tomcat.
> >> > This is only to use the manager to attach to a single Tomcat instance 
> >> to
> >> > run the manager app and launch some internal to the app monitoring
> >> > servlets. Can the ajp13 connector run with only one worker?
> >> >
> >> > Another possibility is to put in two workers but lb one really high 
> >> and
> >> > set the second one really low (like 100 and 0?).
> >> >
> >> > Thanks,
> >> >
> >> > Ben Ricker
> >> >
> >> >> On 11 Apr 2003 14:51:33 -0500, Ben Ricker <br...@wellinx.com> 
> >> wrote:
> >> >>
> >> >> > I am setting up Apache 1.3.27 using mod_jk 1.2.1 on Solaris 8. This
> >> >> > setup is to allow developers to access 2 Tomcat instances running 
> >> on >> the
> >> >> > same server. I used a suggestion by another list member to setup >> 
> >> Virtual
> >> >> > Hosts on Apache pointing to the individual Tomcats so that one can 
> >> >> type
> >> >> > in a URL to get to the manager for that Tomcat, as well as running 
> >> the
> >> >> > manager app.
> >> >> >
> >> >> > One possible issue is that I am using ajp13 as the connector on 
> >> Tomcat
> >> >> > 4.0.5 and do not want to add mod_webapp or anything like that (I do 
> >> >> not
> >> >> > want to change Tomcat's config at all, if possible). However, since 
> >> >> each
> >> >> > VHost will talk to only one Tomcat, I am load balancing across one
> >> >> > Tomcat, hence one worker. is this causing the problem (see below)?
> >> >> >
> >> >> > When I try to access the manager app, I get a 500 internal Server 
> >> >> Error.
> >> >> > There are no errors in the mod_jk error logs (they are still 0 
> >> bytes).
> >> >> > The only error message I see in on startup of Apache in the 
> >> error_log:
> >> >> >
> >> >> > [Fri Apr 11 14:23:50 2003] [notice] SIGHUP received.  Attempting to 
> >> > >> restart
> >> >> > [Fri Apr 11 14:23:50 2003] [error] (9)Bad file number: Error while 
> >> > >> opening the workers, jk will not work
> >> >> > [Fri Apr 11 14:23:50 2003] [notice] Apache/1.3.27 (Unix) configured 
> >> -- >> > resuming normal operations
> >> >> > [Fri Apr 11 14:23:50 2003] [notice] Accept mutex: fcntl (Default: 
> >> >> fcntl)
> >> >> >
> >> >> > Here is the config in the Virtual Hosts section:
> >> >> >
> >> >> > <VirtualHost qa-tomcat1.wellinx.com>
> >> >> > ServerAdmin linuxadmin@wellinx.com
> >> >> > DocumentRoot /usr/local/apache/htdocs
> >> >> > ServerName qa-tomcat1.wellinx.com
> >> >> > ErrorLog logs/tomcat1-error_log
> >> >> > CustomLog logs/tomcat1-access_log common
> >> >> > #
> >> >> > # Configure mod_jk
> >> >> > #
> >> >> > # Where to find workers.properties
> >> >> > JkWorkersFile /usr/local/apache/conf/tomcat1-workers.properties
> >> >> > # Where to log, what level, and format
> >> >> > JkLogFile logs/tomcat1-mod_jk.log
> >> >> > JkLogLevel info
> >> >> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> >> >> > #JkOptions +ForwardURICompat -ForwardDirectories
> >> >> > # JkRequestLogFormat set the request format
> >> >> > JkRequestLogFormat "%w %V %T"
> >> >> > # Send JSPs for context /examples to worker named worker1
> >> >> > JkMount /manager/* loadbalancer
> >> >> > #
> >> >> > # Set up loadbalncer for JkMount
> >> >> > #
> >> >> > JkMount /*.jsp loadbalancer
> >> >> > JkMount /servlets/* loadbalancer
> >> >> >
> >> >> > </VirtualHost>
> >> >> >
> >> >> > Here is the workers.properties file
> >> >> > /usr/local/apache/conf/tomcat1-workers.properties:
> >> >> >
> >> >> > #
> >> >> > # workers.properties #
> >> >> >
> >> >> > # In Unix, we use forward slashes:
> >> >> > ps=/
> >> >> >
> >> >> > # list the workers by name
> >> >> >
> >> >> > worker.list=tomcat1
> >> >> >
> >> >> > # ------------------------
> >> >> > # First tomcat server
> >> >> > # ------------------------
> >> >> > worker.tomcat1.port=11009
> >> >> > worker.tomcat1.host=10.1.2.4
> >> >> > worker.tomcat1.type=ajp13
> >> >> >
> >> >> > # Specify the size of the open connection cache.
> >> >> > #worker.tomcat1.cachesize
> >> >> >
> >> >> > #
> >> >> > # Specifies the load balance factor when used with
> >> >> > # a load balancing worker.
> >> >> > # Note:
> >> >> > #  ----> lbfactor must be > 0
> >> >> > #  ----> Low lbfactor means less work done by the worker.
> >> >> > worker.tomcat1.lbfactor=100
> >> >> >
> >> >> >
> >> >> > #
> >> >> > # The loadbalancer (type lb) worker performs weighted round-robin
> >> >> > # load balancing with sticky sessions.
> >> >> > # Note:
> >> >> > #  ----> If a worker dies, the load balancer will check its state
> >> >> > #        once in a while. Until then all work is redirected to peer
> >> >> > #        worker.
> >> >> > worker.loadbalancer.type=lb
> >> >> > worker.loadbalancer.balanced_workers=tomcat1
> >> >> > #
> >> >> > # END workers.properties
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > Ben Ricker
-- 
Ben Ricker <br...@wellinx.com>
Wellinx.com


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


Re: mod_jk 1.2.1 and worker problem

Posted by John Turner <to...@johnturner.com>.
Gotcha.  My fault, I tend to be really literal at times.  Looks to me like 
JK is telling you that you are using a worker it doesn't know about.

Try adding "loadbalancer" to worker.list.  Probably won't solve your 
problem totally, but I bet it gets you a different log message which will 
indicate the next step to take.

John

On 14 Apr 2003 09:42:51 -0500, Ben Ricker <br...@wellinx.com> wrote:

> On Mon, 2003-04-14 at 09:00, John Turner wrote:
>> Sure, you can run with just one worker, I guess my question is what are 
>> you doing with 2 Tomcats?  You've mentioned that you have two, but in 
>> your config only one is being accessed, and since you're running Apache 
>> neither Tomcat is on port 80, so how are both Tomcats being reached?
>>
>> Or am I being too literal?  Do you have duplicates of the configuration 
>> files you posted, but for a second Tomcat, with the appropriate changes?
>
> Yes.
>
> I see the confusion, probably due to my lack of clarity. I have a setup
> with two Apache servers load balancing to two Tomcat servers with 4
> total Tomcat instances. What I want to do is to put Apache on each Java
> server and setup two VHosts to talk each respective Tomcat. That way, we
> can manage the Tomcats individually.
>
> I setup the Apache Vhost as I posted earlier. I did not include the
> second Apache config because I am trying to get the first one to work.
> If I get a working config for one, it is trivial to cut-and-paste the
> config so that the second Vhost can talk to the second Tomcat.
>
> However, I cannot get the first Apache Vhost to talk to the first
> Tomcat. I just get the 500 Internal Server error.
>
> I turned on debug and the problem seems to be that mod_jk is not getting
> loaded. Here is the error from the Apache error_log:
>
> SIGUSR1 received.  Doing graceful restart
> [Mon Apr 14 09:39:48 2003] [error] (9)Bad file number: Error while 
> opening the workers, jk will not work
> [Mon Apr 14 09:39:48 2003] [notice] Apache/1.3.27 (Unix) configured -- 
> resuming normal operations
> [Mon Apr 14 09:39:48 2003] [notice] Accept mutex: fcntl (Default: fcntl)
>
> The debug on mod_jk throws the "worker not found" error, even though it
> does parse the request. Here is the pertinent debug output:
>
> [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (460)]: Into 
> jk_uri_worker_map_t::map_uri_to_worker
> [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (477)]: Attempting to 
> map URI '/manager/list'
> [Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (502)]: 
> jk_uri_worker_map_t::map_uri_to_worker, Found a context match 
> loadbalancer -> /manager/
> [Mon Apr 14 09:44:06 2003]  [jk_worker.c (132)]: Into 
> wc_get_worker_for_name loadbalancer
> [Mon Apr 14 09:44:06 2003]  [jk_worker.c (136)]: wc_get_worker_for_name, 
> done did not found a worker
>
> Does that make more sense?
>
> Thanks for your patience, as usual.
>
> Ben Ricker
> Wellinx.com
>
>
>> On 14 Apr 2003 08:45:24 -0500, Ben Ricker <br...@wellinx.com> wrote:
>>
>> > On Mon, 2003-04-14 at 07:58, John Turner wrote:
>> >> Where is the other Tomcat?  Your config only shows one worker, and 
>> one >> Connector on port 11009.  Where's the other one?
>> >>
>> >> John
>> >
>> > Here is the issue: I only want the connector to attach to one Tomcat.
>> > This is only to use the manager to attach to a single Tomcat instance 
>> to
>> > run the manager app and launch some internal to the app monitoring
>> > servlets. Can the ajp13 connector run with only one worker?
>> >
>> > Another possibility is to put in two workers but lb one really high 
>> and
>> > set the second one really low (like 100 and 0?).
>> >
>> > Thanks,
>> >
>> > Ben Ricker
>> >
>> >> On 11 Apr 2003 14:51:33 -0500, Ben Ricker <br...@wellinx.com> 
>> wrote:
>> >>
>> >> > I am setting up Apache 1.3.27 using mod_jk 1.2.1 on Solaris 8. This
>> >> > setup is to allow developers to access 2 Tomcat instances running 
>> on >> the
>> >> > same server. I used a suggestion by another list member to setup >> 
>> Virtual
>> >> > Hosts on Apache pointing to the individual Tomcats so that one can 
>> >> type
>> >> > in a URL to get to the manager for that Tomcat, as well as running 
>> the
>> >> > manager app.
>> >> >
>> >> > One possible issue is that I am using ajp13 as the connector on 
>> Tomcat
>> >> > 4.0.5 and do not want to add mod_webapp or anything like that (I do 
>> >> not
>> >> > want to change Tomcat's config at all, if possible). However, since 
>> >> each
>> >> > VHost will talk to only one Tomcat, I am load balancing across one
>> >> > Tomcat, hence one worker. is this causing the problem (see below)?
>> >> >
>> >> > When I try to access the manager app, I get a 500 internal Server 
>> >> Error.
>> >> > There are no errors in the mod_jk error logs (they are still 0 
>> bytes).
>> >> > The only error message I see in on startup of Apache in the 
>> error_log:
>> >> >
>> >> > [Fri Apr 11 14:23:50 2003] [notice] SIGHUP received.  Attempting to 
>> > >> restart
>> >> > [Fri Apr 11 14:23:50 2003] [error] (9)Bad file number: Error while 
>> > >> opening the workers, jk will not work
>> >> > [Fri Apr 11 14:23:50 2003] [notice] Apache/1.3.27 (Unix) configured 
>> -- >> > resuming normal operations
>> >> > [Fri Apr 11 14:23:50 2003] [notice] Accept mutex: fcntl (Default: 
>> >> fcntl)
>> >> >
>> >> > Here is the config in the Virtual Hosts section:
>> >> >
>> >> > <VirtualHost qa-tomcat1.wellinx.com>
>> >> > ServerAdmin linuxadmin@wellinx.com
>> >> > DocumentRoot /usr/local/apache/htdocs
>> >> > ServerName qa-tomcat1.wellinx.com
>> >> > ErrorLog logs/tomcat1-error_log
>> >> > CustomLog logs/tomcat1-access_log common
>> >> > #
>> >> > # Configure mod_jk
>> >> > #
>> >> > # Where to find workers.properties
>> >> > JkWorkersFile /usr/local/apache/conf/tomcat1-workers.properties
>> >> > # Where to log, what level, and format
>> >> > JkLogFile logs/tomcat1-mod_jk.log
>> >> > JkLogLevel info
>> >> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>> >> > #JkOptions +ForwardURICompat -ForwardDirectories
>> >> > # JkRequestLogFormat set the request format
>> >> > JkRequestLogFormat "%w %V %T"
>> >> > # Send JSPs for context /examples to worker named worker1
>> >> > JkMount /manager/* loadbalancer
>> >> > #
>> >> > # Set up loadbalncer for JkMount
>> >> > #
>> >> > JkMount /*.jsp loadbalancer
>> >> > JkMount /servlets/* loadbalancer
>> >> >
>> >> > </VirtualHost>
>> >> >
>> >> > Here is the workers.properties file
>> >> > /usr/local/apache/conf/tomcat1-workers.properties:
>> >> >
>> >> > #
>> >> > # workers.properties #
>> >> >
>> >> > # In Unix, we use forward slashes:
>> >> > ps=/
>> >> >
>> >> > # list the workers by name
>> >> >
>> >> > worker.list=tomcat1
>> >> >
>> >> > # ------------------------
>> >> > # First tomcat server
>> >> > # ------------------------
>> >> > worker.tomcat1.port=11009
>> >> > worker.tomcat1.host=10.1.2.4
>> >> > worker.tomcat1.type=ajp13
>> >> >
>> >> > # Specify the size of the open connection cache.
>> >> > #worker.tomcat1.cachesize
>> >> >
>> >> > #
>> >> > # Specifies the load balance factor when used with
>> >> > # a load balancing worker.
>> >> > # Note:
>> >> > #  ----> lbfactor must be > 0
>> >> > #  ----> Low lbfactor means less work done by the worker.
>> >> > worker.tomcat1.lbfactor=100
>> >> >
>> >> >
>> >> > #
>> >> > # The loadbalancer (type lb) worker performs weighted round-robin
>> >> > # load balancing with sticky sessions.
>> >> > # Note:
>> >> > #  ----> If a worker dies, the load balancer will check its state
>> >> > #        once in a while. Until then all work is redirected to peer
>> >> > #        worker.
>> >> > worker.loadbalancer.type=lb
>> >> > worker.loadbalancer.balanced_workers=tomcat1
>> >> > #
>> >> > # END workers.properties
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Ben Ricker



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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


Re: mod_jk 1.2.1 and worker problem

Posted by Ben Ricker <br...@wellinx.com>.
On Mon, 2003-04-14 at 09:00, John Turner wrote:
> Sure, you can run with just one worker, I guess my question is what are you 
> doing with 2 Tomcats?  You've mentioned that you have two, but in your 
> config only one is being accessed, and since you're running Apache neither 
> Tomcat is on port 80, so how are both Tomcats being reached?
> 
> Or am I being too literal?  Do you have duplicates of the configuration 
> files you posted, but for a second Tomcat, with the appropriate changes?

Yes.

I see the confusion, probably due to my lack of clarity. I have a setup
with two Apache servers load balancing to two Tomcat servers with 4
total Tomcat instances. What I want to do is to put Apache on each Java
server and setup two VHosts to talk each respective Tomcat. That way, we
can manage the Tomcats individually.

I setup the Apache Vhost as I posted earlier. I did not include the
second Apache config because I am trying to get the first one to work.
If I get a working config for one, it is trivial to cut-and-paste the
config so that the second Vhost can talk to the second Tomcat.

However, I cannot get the first Apache Vhost to talk to the first
Tomcat. I just get the 500 Internal Server error.

I turned on debug and the problem seems to be that mod_jk is not getting
loaded. Here is the error from the Apache error_log:

SIGUSR1 received.  Doing graceful restart
[Mon Apr 14 09:39:48 2003] [error] (9)Bad file number: Error while opening the workers, jk will not work
[Mon Apr 14 09:39:48 2003] [notice] Apache/1.3.27 (Unix) configured -- resuming normal operations
[Mon Apr 14 09:39:48 2003] [notice] Accept mutex: fcntl (Default: fcntl)

The debug on mod_jk throws the "worker not found" error, even though it
does parse the request. Here is the pertinent debug output:

[Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker
[Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (477)]: Attempting to map URI '/manager/list'
[Mon Apr 14 09:44:06 2003]  [jk_uri_worker_map.c (502)]: jk_uri_worker_map_t::map_uri_to_worker, Found a context match loadbalancer -> /manager/
[Mon Apr 14 09:44:06 2003]  [jk_worker.c (132)]: Into wc_get_worker_for_name loadbalancer
[Mon Apr 14 09:44:06 2003]  [jk_worker.c (136)]: wc_get_worker_for_name, done did not found a worker

Does that make more sense?

Thanks for your patience, as usual.

Ben Ricker
Wellinx.com
 

> On 14 Apr 2003 08:45:24 -0500, Ben Ricker <br...@wellinx.com> wrote:
> 
> > On Mon, 2003-04-14 at 07:58, John Turner wrote:
> >> Where is the other Tomcat?  Your config only shows one worker, and one 
> >> Connector on port 11009.  Where's the other one?
> >>
> >> John
> >
> > Here is the issue: I only want the connector to attach to one Tomcat.
> > This is only to use the manager to attach to a single Tomcat instance to
> > run the manager app and launch some internal to the app monitoring
> > servlets. Can the ajp13 connector run with only one worker?
> >
> > Another possibility is to put in two workers but lb one really high and
> > set the second one really low (like 100 and 0?).
> >
> > Thanks,
> >
> > Ben Ricker
> >
> >> On 11 Apr 2003 14:51:33 -0500, Ben Ricker <br...@wellinx.com> wrote:
> >>
> >> > I am setting up Apache 1.3.27 using mod_jk 1.2.1 on Solaris 8. This
> >> > setup is to allow developers to access 2 Tomcat instances running on 
> >> the
> >> > same server. I used a suggestion by another list member to setup 
> >> Virtual
> >> > Hosts on Apache pointing to the individual Tomcats so that one can 
> >> type
> >> > in a URL to get to the manager for that Tomcat, as well as running the
> >> > manager app.
> >> >
> >> > One possible issue is that I am using ajp13 as the connector on Tomcat
> >> > 4.0.5 and do not want to add mod_webapp or anything like that (I do 
> >> not
> >> > want to change Tomcat's config at all, if possible). However, since 
> >> each
> >> > VHost will talk to only one Tomcat, I am load balancing across one
> >> > Tomcat, hence one worker. is this causing the problem (see below)?
> >> >
> >> > When I try to access the manager app, I get a 500 internal Server 
> >> Error.
> >> > There are no errors in the mod_jk error logs (they are still 0 bytes).
> >> > The only error message I see in on startup of Apache in the error_log:
> >> >
> >> > [Fri Apr 11 14:23:50 2003] [notice] SIGHUP received.  Attempting to > 
> >> restart
> >> > [Fri Apr 11 14:23:50 2003] [error] (9)Bad file number: Error while > 
> >> opening the workers, jk will not work
> >> > [Fri Apr 11 14:23:50 2003] [notice] Apache/1.3.27 (Unix) configured -- 
> >> > resuming normal operations
> >> > [Fri Apr 11 14:23:50 2003] [notice] Accept mutex: fcntl (Default: 
> >> fcntl)
> >> >
> >> > Here is the config in the Virtual Hosts section:
> >> >
> >> > <VirtualHost qa-tomcat1.wellinx.com>
> >> > ServerAdmin linuxadmin@wellinx.com
> >> > DocumentRoot /usr/local/apache/htdocs
> >> > ServerName qa-tomcat1.wellinx.com
> >> > ErrorLog logs/tomcat1-error_log
> >> > CustomLog logs/tomcat1-access_log common
> >> > #
> >> > # Configure mod_jk
> >> > #
> >> > # Where to find workers.properties
> >> > JkWorkersFile /usr/local/apache/conf/tomcat1-workers.properties
> >> > # Where to log, what level, and format
> >> > JkLogFile logs/tomcat1-mod_jk.log
> >> > JkLogLevel info
> >> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> >> > #JkOptions +ForwardURICompat -ForwardDirectories
> >> > # JkRequestLogFormat set the request format
> >> > JkRequestLogFormat "%w %V %T"
> >> > # Send JSPs for context /examples to worker named worker1
> >> > JkMount /manager/* loadbalancer
> >> > #
> >> > # Set up loadbalncer for JkMount
> >> > #
> >> > JkMount /*.jsp loadbalancer
> >> > JkMount /servlets/* loadbalancer
> >> >
> >> > </VirtualHost>
> >> >
> >> > Here is the workers.properties file
> >> > /usr/local/apache/conf/tomcat1-workers.properties:
> >> >
> >> > #
> >> > # workers.properties #
> >> >
> >> > # In Unix, we use forward slashes:
> >> > ps=/
> >> >
> >> > # list the workers by name
> >> >
> >> > worker.list=tomcat1
> >> >
> >> > # ------------------------
> >> > # First tomcat server
> >> > # ------------------------
> >> > worker.tomcat1.port=11009
> >> > worker.tomcat1.host=10.1.2.4
> >> > worker.tomcat1.type=ajp13
> >> >
> >> > # Specify the size of the open connection cache.
> >> > #worker.tomcat1.cachesize
> >> >
> >> > #
> >> > # Specifies the load balance factor when used with
> >> > # a load balancing worker.
> >> > # Note:
> >> > #  ----> lbfactor must be > 0
> >> > #  ----> Low lbfactor means less work done by the worker.
> >> > worker.tomcat1.lbfactor=100
> >> >
> >> >
> >> > #
> >> > # The loadbalancer (type lb) worker performs weighted round-robin
> >> > # load balancing with sticky sessions.
> >> > # Note:
> >> > #  ----> If a worker dies, the load balancer will check its state
> >> > #        once in a while. Until then all work is redirected to peer
> >> > #        worker.
> >> > worker.loadbalancer.type=lb
> >> > worker.loadbalancer.balanced_workers=tomcat1
> >> > #
> >> > # END workers.properties
> >> >
> >> > Thanks,
> >> >
> >> > Ben Ricker
-- 
Ben Ricker <br...@wellinx.com>
Wellinx.com


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


Re: mod_jk 1.2.1 and worker problem

Posted by John Turner <to...@johnturner.com>.
Sure, you can run with just one worker, I guess my question is what are you 
doing with 2 Tomcats?  You've mentioned that you have two, but in your 
config only one is being accessed, and since you're running Apache neither 
Tomcat is on port 80, so how are both Tomcats being reached?

You could easily restrict the /manager URL to a certain Apache virtual host 
(like admin.mydomain.com or monitor.mydomain.com)...I'm not seeing the 
advantage to running two Tomcats if you only have one accessible via a 
connector to Apache.

Or am I being too literal?  Do you have duplicates of the configuration 
files you posted, but for a second Tomcat, with the appropriate changes?

John

On 14 Apr 2003 08:45:24 -0500, Ben Ricker <br...@wellinx.com> wrote:

> On Mon, 2003-04-14 at 07:58, John Turner wrote:
>> Where is the other Tomcat?  Your config only shows one worker, and one 
>> Connector on port 11009.  Where's the other one?
>>
>> John
>
> Here is the issue: I only want the connector to attach to one Tomcat.
> This is only to use the manager to attach to a single Tomcat instance to
> run the manager app and launch some internal to the app monitoring
> servlets. Can the ajp13 connector run with only one worker?
>
> Another possibility is to put in two workers but lb one really high and
> set the second one really low (like 100 and 0?).
>
> Thanks,
>
> Ben Ricker
>
>> On 11 Apr 2003 14:51:33 -0500, Ben Ricker <br...@wellinx.com> wrote:
>>
>> > I am setting up Apache 1.3.27 using mod_jk 1.2.1 on Solaris 8. This
>> > setup is to allow developers to access 2 Tomcat instances running on 
>> the
>> > same server. I used a suggestion by another list member to setup 
>> Virtual
>> > Hosts on Apache pointing to the individual Tomcats so that one can 
>> type
>> > in a URL to get to the manager for that Tomcat, as well as running the
>> > manager app.
>> >
>> > One possible issue is that I am using ajp13 as the connector on Tomcat
>> > 4.0.5 and do not want to add mod_webapp or anything like that (I do 
>> not
>> > want to change Tomcat's config at all, if possible). However, since 
>> each
>> > VHost will talk to only one Tomcat, I am load balancing across one
>> > Tomcat, hence one worker. is this causing the problem (see below)?
>> >
>> > When I try to access the manager app, I get a 500 internal Server 
>> Error.
>> > There are no errors in the mod_jk error logs (they are still 0 bytes).
>> > The only error message I see in on startup of Apache in the error_log:
>> >
>> > [Fri Apr 11 14:23:50 2003] [notice] SIGHUP received.  Attempting to > 
>> restart
>> > [Fri Apr 11 14:23:50 2003] [error] (9)Bad file number: Error while > 
>> opening the workers, jk will not work
>> > [Fri Apr 11 14:23:50 2003] [notice] Apache/1.3.27 (Unix) configured -- 
>> > resuming normal operations
>> > [Fri Apr 11 14:23:50 2003] [notice] Accept mutex: fcntl (Default: 
>> fcntl)
>> >
>> > Here is the config in the Virtual Hosts section:
>> >
>> > <VirtualHost qa-tomcat1.wellinx.com>
>> > ServerAdmin linuxadmin@wellinx.com
>> > DocumentRoot /usr/local/apache/htdocs
>> > ServerName qa-tomcat1.wellinx.com
>> > ErrorLog logs/tomcat1-error_log
>> > CustomLog logs/tomcat1-access_log common
>> > #
>> > # Configure mod_jk
>> > #
>> > # Where to find workers.properties
>> > JkWorkersFile /usr/local/apache/conf/tomcat1-workers.properties
>> > # Where to log, what level, and format
>> > JkLogFile logs/tomcat1-mod_jk.log
>> > JkLogLevel info
>> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>> > #JkOptions +ForwardURICompat -ForwardDirectories
>> > # JkRequestLogFormat set the request format
>> > JkRequestLogFormat "%w %V %T"
>> > # Send JSPs for context /examples to worker named worker1
>> > JkMount /manager/* loadbalancer
>> > #
>> > # Set up loadbalncer for JkMount
>> > #
>> > JkMount /*.jsp loadbalancer
>> > JkMount /servlets/* loadbalancer
>> >
>> > </VirtualHost>
>> >
>> > Here is the workers.properties file
>> > /usr/local/apache/conf/tomcat1-workers.properties:
>> >
>> > #
>> > # workers.properties #
>> >
>> > # In Unix, we use forward slashes:
>> > ps=/
>> >
>> > # list the workers by name
>> >
>> > worker.list=tomcat1
>> >
>> > # ------------------------
>> > # First tomcat server
>> > # ------------------------
>> > worker.tomcat1.port=11009
>> > worker.tomcat1.host=10.1.2.4
>> > worker.tomcat1.type=ajp13
>> >
>> > # Specify the size of the open connection cache.
>> > #worker.tomcat1.cachesize
>> >
>> > #
>> > # Specifies the load balance factor when used with
>> > # a load balancing worker.
>> > # Note:
>> > #  ----> lbfactor must be > 0
>> > #  ----> Low lbfactor means less work done by the worker.
>> > worker.tomcat1.lbfactor=100
>> >
>> >
>> > #
>> > # The loadbalancer (type lb) worker performs weighted round-robin
>> > # load balancing with sticky sessions.
>> > # Note:
>> > #  ----> If a worker dies, the load balancer will check its state
>> > #        once in a while. Until then all work is redirected to peer
>> > #        worker.
>> > worker.loadbalancer.type=lb
>> > worker.loadbalancer.balanced_workers=tomcat1
>> > #
>> > # END workers.properties
>> >
>> > Thanks,
>> >
>> > Ben Ricker



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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


Re: mod_jk 1.2.1 and worker problem

Posted by Ben Ricker <br...@wellinx.com>.
On Mon, 2003-04-14 at 07:58, John Turner wrote:
> Where is the other Tomcat?  Your config only shows one worker, and one 
> Connector on port 11009.  Where's the other one?
> 
> John

Here is the issue: I only want the connector to attach to one Tomcat.
This is only to use the manager to attach to a single Tomcat instance to
run the manager app and launch some internal to the app monitoring
servlets. Can the ajp13 connector run with only one worker? 

Another possibility is to put in two workers but lb one really high and
set the second one really low (like 100 and 0?).

Thanks,

Ben Ricker

> On 11 Apr 2003 14:51:33 -0500, Ben Ricker <br...@wellinx.com> wrote:
> 
> > I am setting up Apache 1.3.27 using mod_jk 1.2.1 on Solaris 8. This
> > setup is to allow developers to access 2 Tomcat instances running on the
> > same server. I used a suggestion by another list member to setup Virtual
> > Hosts on Apache pointing to the individual Tomcats so that one can type
> > in a URL to get to the manager for that Tomcat, as well as running the
> > manager app.
> >
> > One possible issue is that I am using ajp13 as the connector on Tomcat
> > 4.0.5 and do not want to add mod_webapp or anything like that (I do not
> > want to change Tomcat's config at all, if possible). However, since each
> > VHost will talk to only one Tomcat, I am load balancing across one
> > Tomcat, hence one worker. is this causing the problem (see below)?
> >
> > When I try to access the manager app, I get a 500 internal Server Error.
> > There are no errors in the mod_jk error logs (they are still 0 bytes).
> > The only error message I see in on startup of Apache in the error_log:
> >
> > [Fri Apr 11 14:23:50 2003] [notice] SIGHUP received.  Attempting to 
> > restart
> > [Fri Apr 11 14:23:50 2003] [error] (9)Bad file number: Error while 
> > opening the workers, jk will not work
> > [Fri Apr 11 14:23:50 2003] [notice] Apache/1.3.27 (Unix) configured -- 
> > resuming normal operations
> > [Fri Apr 11 14:23:50 2003] [notice] Accept mutex: fcntl (Default: fcntl)
> >
> > Here is the config in the Virtual Hosts section:
> >
> > <VirtualHost qa-tomcat1.wellinx.com>
> > ServerAdmin linuxadmin@wellinx.com
> > DocumentRoot /usr/local/apache/htdocs
> > ServerName qa-tomcat1.wellinx.com
> > ErrorLog logs/tomcat1-error_log
> > CustomLog logs/tomcat1-access_log common
> > #
> > # Configure mod_jk
> > #
> > # Where to find workers.properties
> > JkWorkersFile /usr/local/apache/conf/tomcat1-workers.properties
> > # Where to log, what level, and format
> > JkLogFile logs/tomcat1-mod_jk.log
> > JkLogLevel info
> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> > #JkOptions +ForwardURICompat -ForwardDirectories
> > # JkRequestLogFormat set the request format
> > JkRequestLogFormat "%w %V %T"
> > # Send JSPs for context /examples to worker named worker1
> > JkMount /manager/* loadbalancer
> > #
> > # Set up loadbalncer for JkMount
> > #
> > JkMount /*.jsp loadbalancer
> > JkMount /servlets/* loadbalancer
> >
> > </VirtualHost>
> >
> > Here is the workers.properties file
> > /usr/local/apache/conf/tomcat1-workers.properties:
> >
> > #
> > # workers.properties #
> >
> > # In Unix, we use forward slashes:
> > ps=/
> >
> > # list the workers by name
> >
> > worker.list=tomcat1
> >
> > # ------------------------
> > # First tomcat server
> > # ------------------------
> > worker.tomcat1.port=11009
> > worker.tomcat1.host=10.1.2.4
> > worker.tomcat1.type=ajp13
> >
> > # Specify the size of the open connection cache.
> > #worker.tomcat1.cachesize
> >
> > #
> > # Specifies the load balance factor when used with
> > # a load balancing worker.
> > # Note:
> > #  ----> lbfactor must be > 0
> > #  ----> Low lbfactor means less work done by the worker.
> > worker.tomcat1.lbfactor=100
> >
> >
> > #
> > # The loadbalancer (type lb) worker performs weighted round-robin
> > # load balancing with sticky sessions.
> > # Note:
> > #  ----> If a worker dies, the load balancer will check its state
> > #        once in a while. Until then all work is redirected to peer
> > #        worker.
> > worker.loadbalancer.type=lb
> > worker.loadbalancer.balanced_workers=tomcat1
> > #
> > # END workers.properties
> >
> > Thanks,
> >
> > Ben Ricker
-- 
Ben Ricker <br...@wellinx.com>
Wellinx.com


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


Re: mod_jk 1.2.1 and worker problem

Posted by John Turner <to...@johnturner.com>.
Where is the other Tomcat?  Your config only shows one worker, and one 
Connector on port 11009.  Where's the other one?

John

On 11 Apr 2003 14:51:33 -0500, Ben Ricker <br...@wellinx.com> wrote:

> I am setting up Apache 1.3.27 using mod_jk 1.2.1 on Solaris 8. This
> setup is to allow developers to access 2 Tomcat instances running on the
> same server. I used a suggestion by another list member to setup Virtual
> Hosts on Apache pointing to the individual Tomcats so that one can type
> in a URL to get to the manager for that Tomcat, as well as running the
> manager app.
>
> One possible issue is that I am using ajp13 as the connector on Tomcat
> 4.0.5 and do not want to add mod_webapp or anything like that (I do not
> want to change Tomcat's config at all, if possible). However, since each
> VHost will talk to only one Tomcat, I am load balancing across one
> Tomcat, hence one worker. is this causing the problem (see below)?
>
> When I try to access the manager app, I get a 500 internal Server Error.
> There are no errors in the mod_jk error logs (they are still 0 bytes).
> The only error message I see in on startup of Apache in the error_log:
>
> [Fri Apr 11 14:23:50 2003] [notice] SIGHUP received.  Attempting to 
> restart
> [Fri Apr 11 14:23:50 2003] [error] (9)Bad file number: Error while 
> opening the workers, jk will not work
> [Fri Apr 11 14:23:50 2003] [notice] Apache/1.3.27 (Unix) configured -- 
> resuming normal operations
> [Fri Apr 11 14:23:50 2003] [notice] Accept mutex: fcntl (Default: fcntl)
>
> Here is the config in the Virtual Hosts section:
>
> <VirtualHost qa-tomcat1.wellinx.com>
> ServerAdmin linuxadmin@wellinx.com
> DocumentRoot /usr/local/apache/htdocs
> ServerName qa-tomcat1.wellinx.com
> ErrorLog logs/tomcat1-error_log
> CustomLog logs/tomcat1-access_log common
> #
> # Configure mod_jk
> #
> # Where to find workers.properties
> JkWorkersFile /usr/local/apache/conf/tomcat1-workers.properties
> # Where to log, what level, and format
> JkLogFile logs/tomcat1-mod_jk.log
> JkLogLevel info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> #JkOptions +ForwardURICompat -ForwardDirectories
> # JkRequestLogFormat set the request format
> JkRequestLogFormat "%w %V %T"
> # Send JSPs for context /examples to worker named worker1
> JkMount /manager/* loadbalancer
> #
> # Set up loadbalncer for JkMount
> #
> JkMount /*.jsp loadbalancer
> JkMount /servlets/* loadbalancer
>
> </VirtualHost>
>
> Here is the workers.properties file
> /usr/local/apache/conf/tomcat1-workers.properties:
>
> #
> # workers.properties #
>
> # In Unix, we use forward slashes:
> ps=/
>
> # list the workers by name
>
> worker.list=tomcat1
>
> # ------------------------
> # First tomcat server
> # ------------------------
> worker.tomcat1.port=11009
> worker.tomcat1.host=10.1.2.4
> worker.tomcat1.type=ajp13
>
> # Specify the size of the open connection cache.
> #worker.tomcat1.cachesize
>
> #
> # Specifies the load balance factor when used with
> # a load balancing worker.
> # Note:
> #  ----> lbfactor must be > 0
> #  ----> Low lbfactor means less work done by the worker.
> worker.tomcat1.lbfactor=100
>
>
> #
> # The loadbalancer (type lb) worker performs weighted round-robin
> # load balancing with sticky sessions.
> # Note:
> #  ----> If a worker dies, the load balancer will check its state
> #        once in a while. Until then all work is redirected to peer
> #        worker.
> worker.loadbalancer.type=lb
> worker.loadbalancer.balanced_workers=tomcat1
> #
> # END workers.properties
>
> Thanks,
>
> Ben Ricker



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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