tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Turner <tomcat-u...@johnturner.com>
Subject Re: mod_jk 1.2.1 and worker problem
Date Mon, 14 Apr 2003 14:00:56 GMT

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


Mime
View raw message