tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Cassidy" <david.cass...@db.com>
Subject RE: mod_jk will only connect to tomcat on the localhost
Date Tue, 23 Dec 2003 15:05:10 GMT

Can you run - on the tomcat server
if linux
netstat -tln

if anything else !
netstat -an | grep tcp | grep LISTEN

then we can see if you are actually listening on anything other than localhost :)

david




                                                                                         
                                                                             
                      "Peter Anning"                                                     
                                                                             
                      <lists@peterannin        To:       "'Tomcat Developers List'" <tomcat-dev@jakarta.apache.org>
                                                   
                      g.com>                   cc:                                    
                                                                                
                                               Subject:  RE: mod_jk will only connect to tomcat
on the localhost                                                       
                      23/12/2003 14:05                                                   
                                                                             
                      Please respond to                                                  
                                                                             
                      "Tomcat                                                            
                                                                             
                      Developers List"                                                   
                                                                             
                                                                                         
                                                                             
                                                                                         
                                                                             




I have investigated this a bit already and am pretty sure there is no
firewall running on either machine:

iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

P

On Tue, 23 Dec 2003 07:25:45 -0700, George Sexton wrote
> Looks to me like you have a firewall running. What does iptables -L
> show?
>
> -----Original Message-----
> From: Peter Anning [mailto:lists@peteranning.com]
> Sent: Tuesday, December 23, 2003 6:29 AM
> To: tomcat-dev@jakarta.apache.org
> Subject: mod_jk will only connect to tomcat on the localhost
>
> 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: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


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






--

This e-mail may contain confidential and/or privileged information. If you are not the intended
recipient (or have received this e-mail in error) please notify the sender immediately and
destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.



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


Mime
View raw message