You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by james edwards <li...@gmail.com> on 2006/09/02 03:08:34 UTC

Migration from jk2 to jk, problems with uri context

I am moving to jk (1.2.18) from jk2 & am having problems with the
workers.properties file. I have separate apache and tomcat servers. Here is
my working jk2 (workers2.properties) config:

[logger]
level=ERROR
[config:]
file=${serverRoot}/conf/workers2.properties
debug=0
debugEnv=0
[uriMap:]
info=Maps the requests. Options: debug
debug=0
[logger.file:0]
level=ERROR
file=${serverRoot}/logs/jk2.log
[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess
servers
file=${serverRoot}/logs/jk2.shm
size=1000000
debug=0
disabled=0
[workerEnv:]
info=Global server options
timing=1
debug=0
[channel.socket:whatever.whoever.com:7777]
host=whatever.whoever.com
port=7777
info=Ajp13 forwarding over socket
debug=0
tomcatId=myTomcat
[ajp13:whatever.whoever.com:7777]
channel=channel.socket:myTomcat
[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess
[status:]
info=Status worker, displays runtime informations
[vm:]
info=Parameters used to load a JVM in the server process
classpath=${CATALINA_HOME}/bin/tomcat-jni.jar
classpath=${CATALINA_HOME}/server/lib/commons-logging.jar
OPT=-Dtomcat.home=${CATALINA_HOME}
OPT=-Dcatalina.home=${CATALINA_HOME}
OPT=-Xmx768M
disabled=1
[uri:/foo/*]
context=/foo
debug=0


I am trying to get a basic config working before I convert the rest from the
old config. I cannot get
the uri part to work. Here is the config I am running (workers.properties):


worker.list= worker1
worker.worker1.type=ajp13
worker.worker1.host=whatever.whoever.com
worker.worker1.port=7777
worker.worker1.connection_pool_size=10
worker.worker1.connection_pool_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.mount=/foo/* foo

Here are the error logs from apache:

[Fri Sep 01 14:37:06 2006] [notice] Graceful restart requested, doing
restart
[Fri Sep 01 14:37:06 2006] [notice] Apache/2.0.55 (Unix) mod_ssl/2.0.55
OpenSSL/0.9.7a PHP/5.1.2 mod_jk/1.2.18 configured -- resuming normal
operations
[Fri Sep 01 14:37:17 2006] [error] [client 222.33.45.67] File does not
exist: /var/www/html/foo, referer: http://noone.whoever.com

The jk logs:

[Fri Sep 01 15:20:53 2006] [21388:34496] [error]
uri_worker_map_add::jk_uri_worker_map.c (322): invalid context foo
[Fri Sep 01 15:20:53 2006] [21388:34496] [error]
wc_create_worker::jk_worker.c (183): validate failed for worker1
[Fri Sep 01 15:20:53 2006] [21388:34496] [error]
build_worker_map::jk_worker.c (256): failed to create worker worker1
[Fri Sep 01 15:20:53 2006] [21389:34496] [error]
uri_worker_map_add::jk_uri_worker_map.c (322): invalid context foo
[Fri Sep 01 15:20:53 2006] [21389:34496] [error]
wc_create_worker::jk_worker.c (183): validate failed for worker1
[Fri Sep 01 15:20:53 2006] [21389:34496] [error]
build_worker_map::jk_worker.c (256): failed to create worker worker1

I have tried several variations with the / and * syntax here:
worker.worker1.mount=/foo/* foo

With no luck. Can someone point me in the right direction ?


-- 
James H. Edwards
Senior Network Systems Administrator
Judicial Information Division
jedwards@nmcourts.gov

Re: Migration from jk2 to jk, problems with uri context

Posted by Rainer Jung <ra...@kippdata.de>.
What about changing

worker.worker1.mount=/foo/* foo

to

worker.worker1.mount=/foo/* /foo

Regards,

Rainer

james edwards schrieb:
> I am moving to jk (1.2.18) from jk2 & am having problems with the
> workers.properties file. I have separate apache and tomcat servers. Here is
> my working jk2 (workers2.properties) config:
> 
> [logger]
> level=ERROR
> [config:]
> file=${serverRoot}/conf/workers2.properties
> debug=0
> debugEnv=0
> [uriMap:]
> info=Maps the requests. Options: debug
> debug=0
> [logger.file:0]
> level=ERROR
> file=${serverRoot}/logs/jk2.log
> [shm:]
> info=Scoreboard. Required for reconfiguration and status with multiprocess
> servers
> file=${serverRoot}/logs/jk2.shm
> size=1000000
> debug=0
> disabled=0
> [workerEnv:]
> info=Global server options
> timing=1
> debug=0
> [channel.socket:whatever.whoever.com:7777]
> host=whatever.whoever.com
> port=7777
> info=Ajp13 forwarding over socket
> debug=0
> tomcatId=myTomcat
> [ajp13:whatever.whoever.com:7777]
> channel=channel.socket:myTomcat
> [channel.jni:jni]
> info=The jni channel, used if tomcat is started inprocess
> [status:]
> info=Status worker, displays runtime informations
> [vm:]
> info=Parameters used to load a JVM in the server process
> classpath=${CATALINA_HOME}/bin/tomcat-jni.jar
> classpath=${CATALINA_HOME}/server/lib/commons-logging.jar
> OPT=-Dtomcat.home=${CATALINA_HOME}
> OPT=-Dcatalina.home=${CATALINA_HOME}
> OPT=-Xmx768M
> disabled=1
> [uri:/foo/*]
> context=/foo
> debug=0
> 
> 
> I am trying to get a basic config working before I convert the rest from
> the
> old config. I cannot get
> the uri part to work. Here is the config I am running (workers.properties):
> 
> 
> worker.list= worker1
> worker.worker1.type=ajp13
> worker.worker1.host=whatever.whoever.com
> worker.worker1.port=7777
> worker.worker1.connection_pool_size=10
> worker.worker1.connection_pool_timeout=600
> worker.worker1.socket_keepalive=1
> worker.worker1.mount=/foo/* foo
> 
> Here are the error logs from apache:
> 
> [Fri Sep 01 14:37:06 2006] [notice] Graceful restart requested, doing
> restart
> [Fri Sep 01 14:37:06 2006] [notice] Apache/2.0.55 (Unix) mod_ssl/2.0.55
> OpenSSL/0.9.7a PHP/5.1.2 mod_jk/1.2.18 configured -- resuming normal
> operations
> [Fri Sep 01 14:37:17 2006] [error] [client 222.33.45.67] File does not
> exist: /var/www/html/foo, referer: http://noone.whoever.com
> 
> The jk logs:
> 
> [Fri Sep 01 15:20:53 2006] [21388:34496] [error]
> uri_worker_map_add::jk_uri_worker_map.c (322): invalid context foo
> [Fri Sep 01 15:20:53 2006] [21388:34496] [error]
> wc_create_worker::jk_worker.c (183): validate failed for worker1
> [Fri Sep 01 15:20:53 2006] [21388:34496] [error]
> build_worker_map::jk_worker.c (256): failed to create worker worker1
> [Fri Sep 01 15:20:53 2006] [21389:34496] [error]
> uri_worker_map_add::jk_uri_worker_map.c (322): invalid context foo
> [Fri Sep 01 15:20:53 2006] [21389:34496] [error]
> wc_create_worker::jk_worker.c (183): validate failed for worker1
> [Fri Sep 01 15:20:53 2006] [21389:34496] [error]
> build_worker_map::jk_worker.c (256): failed to create worker worker1
> 
> I have tried several variations with the / and * syntax here:
> worker.worker1.mount=/foo/* foo
> 
> With no luck. Can someone point me in the right direction ?
> 
> 

---------------------------------------------------------------------
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: Migration from jk2 to jk, problems with uri context

Posted by brian bay <br...@gmail.com>.
I have this working with tomcat 5.5.17 and apache2, jk1

You need mod_jk.so in apache/modules..for me
/usr/lib/apache2/modules/mod_jk.so

In apache home ---create workers.properties

workers.tomcat.home=/path/to/tomcat
ps=/
workers.list=worker1
worker.ajp13.type=ajp13
worker.ajp13.host=whatever.whoever.com
worker.ajp13.port=8009


In httpd.conf or apache2.conf---
LoadModule jk_module "/usr/lib/apache2/modules/mod_jk.so"
JkWorkersFile /path/to/apache/workers.properties

in virtual-host section of apache
JkMount /foo*  worker1  #worker1 defined in workers.properties.
JkMount /*.jsp worker1 #if you do http://wherever.whoever.com/index.jsp
                                    #you will bring up the tomcat homepage



 On the tomcat end, there is a small amount of config in server.xml


        <Listener className="org.apache.jk.config.ApacheConfig"
                 modJk="/usr/lib/apache2/modules/mod_jk.so"
                 workersConfig="/etc/apache2/workers.properties"/>


       <Connector port="8009"
                 redirectPort="8443"
                 connectionTimeout="-1"
               protocol="AJP/1.3">
       </Connector>

make sure to stop and restart apache..

hope this helps...




On 9/1/06, james edwards <li...@gmail.com> wrote:
>
> I am moving to jk (1.2.18) from jk2 & am having problems with the
> workers.properties file. I have separate apache and tomcat servers. Here
> is
> my working jk2 (workers2.properties) config:
>
> [logger]
> level=ERROR
> [config:]
> file=${serverRoot}/conf/workers2.properties
> debug=0
> debugEnv=0
> [uriMap:]
> info=Maps the requests. Options: debug
> debug=0
> [logger.file:0]
> level=ERROR
> file=${serverRoot}/logs/jk2.log
> [shm:]
> info=Scoreboard. Required for reconfiguration and status with multiprocess
> servers
> file=${serverRoot}/logs/jk2.shm
> size=1000000
> debug=0
> disabled=0
> [workerEnv:]
> info=Global server options
> timing=1
> debug=0
> [channel.socket:whatever.whoever.com:7777]
> host=whatever.whoever.com
> port=7777
> info=Ajp13 forwarding over socket
> debug=0
> tomcatId=myTomcat
> [ajp13:whatever.whoever.com:7777]
> channel=channel.socket:myTomcat
> [channel.jni:jni]
> info=The jni channel, used if tomcat is started inprocess
> [status:]
> info=Status worker, displays runtime informations
> [vm:]
> info=Parameters used to load a JVM in the server process
> classpath=${CATALINA_HOME}/bin/tomcat-jni.jar
> classpath=${CATALINA_HOME}/server/lib/commons-logging.jar
> OPT=-Dtomcat.home=${CATALINA_HOME}
> OPT=-Dcatalina.home=${CATALINA_HOME}
> OPT=-Xmx768M
> disabled=1
> [uri:/foo/*]
> context=/foo
> debug=0
>
>
> I am trying to get a basic config working before I convert the rest from
> the
> old config. I cannot get
> the uri part to work. Here is the config I am running (workers.properties
> ):
>
>
> worker.list= worker1
> worker.worker1.type=ajp13
> worker.worker1.host=whatever.whoever.com
> worker.worker1.port=7777
> worker.worker1.connection_pool_size=10
> worker.worker1.connection_pool_timeout=600
> worker.worker1.socket_keepalive=1
> worker.worker1.mount=/foo/* foo
>
> Here are the error logs from apache:
>
> [Fri Sep 01 14:37:06 2006] [notice] Graceful restart requested, doing
> restart
> [Fri Sep 01 14:37:06 2006] [notice] Apache/2.0.55 (Unix) mod_ssl/2.0.55
> OpenSSL/0.9.7a PHP/5.1.2 mod_jk/1.2.18 configured -- resuming normal
> operations
> [Fri Sep 01 14:37:17 2006] [error] [client 222.33.45.67] File does not
> exist: /var/www/html/foo, referer: http://noone.whoever.com
>
> The jk logs:
>
> [Fri Sep 01 15:20:53 2006] [21388:34496] [error]
> uri_worker_map_add::jk_uri_worker_map.c (322): invalid context foo
> [Fri Sep 01 15:20:53 2006] [21388:34496] [error]
> wc_create_worker::jk_worker.c (183): validate failed for worker1
> [Fri Sep 01 15:20:53 2006] [21388:34496] [error]
> build_worker_map::jk_worker.c (256): failed to create worker worker1
> [Fri Sep 01 15:20:53 2006] [21389:34496] [error]
> uri_worker_map_add::jk_uri_worker_map.c (322): invalid context foo
> [Fri Sep 01 15:20:53 2006] [21389:34496] [error]
> wc_create_worker::jk_worker.c (183): validate failed for worker1
> [Fri Sep 01 15:20:53 2006] [21389:34496] [error]
> build_worker_map::jk_worker.c (256): failed to create worker worker1
>
> I have tried several variations with the / and * syntax here:
> worker.worker1.mount=/foo/* foo
>
> With no luck. Can someone point me in the right direction ?
>
>
> --
> James H. Edwards
> Senior Network Systems Administrator
> Judicial Information Division
> jedwards@nmcourts.gov
>
>