Hi, 

I have configured Apache 1.3 with mod_jk on SuSE Linux SLES8 on a zSeries. 

mod_jk will only connect to tomcat on the localhost. 

<detail> 
One Linux instance runs the Web Server and one runs Tomcat 4.1.27 
In order to test the config I installed tomcat on the web server machine and 
mapped the application /examples/ to forward to the local tomcat. this works 
fine. However when changing the config to point to a remote machine (see 
config below) I always get an error in the mod_jk error log 
(ajp_connect_to_endpoint, failed errno = 111.) The full log file is below I 
have used 
tcpdump -i any 'dst port 8009' (see output below) and this always indicates 
that mod_jk is trying to connect to the localhost whatever I put in the 
workers.properties file. 

To test network connectivity I have used 'telnet 192.168.13.10 8009' and I 
can connect to tomcat and see the connection occur in the remote tomcat log 
files. I have also included a tcpdump of this below. 

Has anyone seen anything similar. 
Best Rgds 
Peter 

<config> 
mod_jk configured (workers.properties) as follows: 

worker.list=worker1 
worker.worker1.type=ajp13 
worker.worker1.host=192.168.13.10 
worker.worker1.port=8009 
worker.worker1.lbfactor=50 
worker.worker1.cachesize=10 
worker.worker1.cache_timeout=600 
worker.worker1.socket_keepalive=1 
worker.worker1.socket_timeout=300 
worker.worker1.local_worker=0 
############################################################################ 

apache mount points are configured in httpd.conf 

JkWorkersFile /etc/httpd/conf/workers.properties 
JkLogFile /var/log/mod_jk.log 

JkLogLevel debug

JkMount /examples/* worker1 
JkMount /examples/*.jsp worker1 
########################################################### 

tcpdump while accessing the /examples/ 
www02:/etc # tcpdump -n -i any 'dst port 8009' 
16:19:21.496621 127.0.0.1.33194 > 127.0.0.1.8009: S 3501290459:3501290459(0) 
win 32767 <mss 16396,sa 
ckOK,timestamp 9268978 0,nop,wscale 0> (DF) 
16:19:21.497287 127.0.0.1.33195 > 127.0.0.1.8009: S 3497571144:3497571144(0) 
win 32767 <mss 16396,sa 
ckOK,timestamp 9268978 0,nop,wscale 0> (DF) 
16:19:21.497733 127.0.0.1.33196 > 127.0.0.1.8009: S 3498859603:3498859603(0) 
win 32767 <mss 16396,sa 
ckOK,timestamp 9268978 0,nop,wscale 0> (DF) 

telnet 192.168.13.10 8009 

www02:/etc # tcpdump -n -i any 'dst port 8009' 
tcpdump: WARNING: Promiscuous mode not supported on the "any" device 
tcpdump: listening on any 
16:19:07.631821 192.168.12.11.33193 > 192.168.13.10.8009: S 
3495439382:3495439382(0) win 5840 <mss 1 
460,sackOK,timestamp 9267591 0,nop,wscale 0> (DF) [tos 0x10] 
16:19:07.635099 192.168.12.11.33193 > 192.168.13.10.8009: . ack 3495439509 
win 5840 <nop,nop,timesta 
mp 9267592 9396807> (DF) [tos 0x10]
#############################################################################
mod_jk log file

[Mon Dec 22 16:19:21 2003]  [jk_worker.c (162)]: wc_create_worker, about to 
create instance worker1 of ajp13
[Mon Dec 22 16:19:21 2003]  [jk_ajp13_worker.c (108)]: Into 
ajp13_worker_factory
[Mon Dec 22 16:19:21 2003]  [jk_worker.c (171)]: wc_create_worker, about to 
validate and init worker1
[Mon Dec 22 16:19:21 2003]  [jk_ajp_common.c (1178)]: Into 
jk_worker_t::validate
[Mon Dec 22 16:19:21 2003]  [jk_ajp_common.c (1198)]: In 
jk_worker_t::validate for worker worker1 co
ntact is 192.168.13.10:8009
[Mon Dec 22 16:19:21 2003]  [jk_ajp_common.c (1226)]: Into jk_worker_t::init
[Mon Dec 22 16:19:21 2003]  [jk_worker.c (187)]: wc_create_worker, done
[Mon Dec 22 16:19:21 2003]  [jk_worker.c (238)]: build_worker_map, removing 
old worker1 worker
[Mon Dec 22 16:19:21 2003]  [jk_worker.c (250)]: build_worker_map, done
[Mon Dec 22 16:19:21 2003]  [jk_worker.c (111)]: wc_open, done 1
[Mon Dec 22 16:20:18 2003]  [jk_uri_worker_map.c (460)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Mon Dec 22 16:20:18 2003]  [jk_uri_worker_map.c (477)]: Attempting to map 
URI '/examples/'
[Mon Dec 22 16:20:18 2003]  [jk_uri_worker_map.c (502)]: 
jk_uri_worker_map_t::map_uri_to_worker, Fou
nd a context match worker1 -> /examples/
[Mon Dec 22 16:20:18 2003]  [jk_worker.c (132)]: Into wc_get_worker_for_name 
worker1
[Mon Dec 22 16:20:18 2003]  [jk_worker.c (136)]: wc_get_worker_for_name, 
done  found a worker
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (1355)]: Into 
jk_worker_t::get_endpoint
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (1079)]: Into 
jk_endpoint_t::service
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (280)]: Into 
ajp_marshal_into_msgb
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (413)]: ajp_marshal_into_msgb - 
Done
[Mon Dec 22 16:20:18 2003]  [jk_connect.c (116)]: Into jk_open_socket
[Mon Dec 22 16:20:18 2003]  [jk_connect.c (123)]: jk_open_socket, try to 
connect socket = 7
[Mon Dec 22 16:20:18 2003]  [jk_connect.c (132)]: jk_open_socket, after 
connect ret = -1
[Mon Dec 22 16:20:18 2003]  [jk_connect.c (151)]: jk_open_socket, connect() 
failed errno = 111
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (599)]: In 
jk_endpoint_t::ajp_connect_to_endpoint, fail
ed errno = 111
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (844)]: Error connecting to the 
Tomcat process.
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (1153)]: In 
jk_endpoint_t::service, ajp_send_request fa
iled in send loop 0
[Mon Dec 22 16:20:18 2003]  [jk_connect.c (116)]: Into jk_open_socket
[Mon Dec 22 16:20:18 2003]  [jk_connect.c (123)]: jk_open_socket, try to 
connect socket = 7
[Mon Dec 22 16:20:18 2003]  [jk_connect.c (132)]: jk_open_socket, after 
connect ret = -1
[Mon Dec 22 16:20:18 2003]  [jk_connect.c (151)]: jk_open_socket, connect() 
failed errno = 111
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (599)]: In 
jk_endpoint_t::ajp_connect_to_endpoint, fail
ed errno = 111
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (844)]: Error connecting to the 
Tomcat process.
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (1153)]: In 
jk_endpoint_t::service, ajp_send_request fa
iled in send loop 1
[Mon Dec 22 16:20:18 2003]  [jk_connect.c (116)]: Into jk_open_socket
[Mon Dec 22 16:20:18 2003]  [jk_connect.c (123)]: jk_open_socket, try to 
connect socket = 7
[Mon Dec 22 16:20:18 2003]  [jk_connect.c (132)]: jk_open_socket, after 
connect ret = -1
[Mon Dec 22 16:20:18 2003]  [jk_connect.c (151)]: jk_open_socket, connect() 
failed errno = 111
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (599)]: In 
jk_endpoint_t::ajp_connect_to_endpoint, fail
ed errno = 111
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (844)]: Error connecting to the 
Tomcat process.
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (1153)]: In 
jk_endpoint_t::service, ajp_send_request fa
iled in send loop 2
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (1339)]: Into 
jk_endpoint_t::done, closing connection 0
[Mon Dec 22 16:20:18 2003]  [jk_ajp_common.c (536)]: In 
jk_endpoint_t::ajp_close_endpoint



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to