Author |
|
TPL
Joined: 25 Mar 2014 Posts: 24 Location: Germany, Hamburg
|
Posted: Tue 25 Mar '14 16:32 Post subject: |
|
|
Hello,
there's maybe a bug in mod_jk Version 1.2.39.
No connections to apache tomcat available, if the workers.properties contains a server name instead of a IP address.
Example:
Code: | worker.nodetc01.host=localhost |
The /jk-status site shows a wrong/unknown IP for "Address:Port".
Name - Type - Hostname - Address:Port
nodetc01 - ajp13 - localhost - 248.76.51.0:8009
mod_jk log:
Code: | [Tue 25 Mar 2014 14:24:40][1420:6940] [info] jk_open_socket::jk_connect.c (735): connect to 248.76.51.0:8009 failed (errno=51) [Tue 25 Mar 2014 14:24:40][1420:6940] [info] ajp_connect_to_endpoint::jk_ajp_common.c (1019): Failed opening socket to (248.76.51.0:8009) (errno=51) [Tue 25 Mar 2014 14:24:40][1420:6940] [error] ajp_send_request::jk_ajp_common.c (1659): (nodetc01) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=51) |
With 1.2.37 everything works fine.
Timo |
|
Back to top |
|
godpusa
Joined: 07 Aug 2013 Posts: 3 Location: China,Suzhou
|
Posted: Wed 26 Mar '14 4:34 Post subject: confirmed |
|
|
It seems that 1.2.39 do not support something like "worker.tomcat2.host=localhost",it must be setting like "worker.tomcat2.host=192.168.3.41".
Is it related to the 1.2.39 changelog “Apache 2.4: By default forward logical client address as provided by mod_remoteip. When setting JkOptions ForwardPhysicalAddress mod_jk will instead forward the physical peer address.”? |
|
Back to top |
|
TPL
Joined: 25 Mar 2014 Posts: 24 Location: Germany, Hamburg
|
Posted: Wed 26 Mar '14 16:42 Post subject: |
|
|
I've now tested the same configuration (workers.properties + mod_jk.conf) on linux and there is no problem with 1.2.39.
SLES 11 patchlevel 2
Apache 2.4.9
Mod_jk 1.2.39
Source: http://tomcat.apache.org
Any idea? |
|
Back to top |
|
TPL
Joined: 25 Mar 2014 Posts: 24 Location: Germany, Hamburg
|
Posted: Wed 26 Mar '14 19:06 Post subject: UPDATE |
|
|
With Version 1.2.38 there's a new Parameter "prefer_ipv6".
Default value is 0.
In this case (for localhost) it must be set to 1.
Example:
Code: | worker.nodetc01.prefer_ipv6=1 |
Name - Type - Hostname - Address:Port
nodetc01 - ajp13 - localhost - ::1:8009
But better use the IP. Especially if the tomcat running on another system. |
|
Back to top |
|
bberndt
Joined: 13 Aug 2013 Posts: 5 Location: USA
|
Posted: Fri 28 Mar '14 1:03 Post subject: |
|
|
EDIT: Also mentioned, I was using IIS 7, on Windows 7.
thought I'd share my experience. I've been using 1.2.37 for ages, and no problem. Tried 1.2.39 on two laptops, that I don't have anymore (had to get them working, and get them out the door).
#1. most of my webapps worked fine, using the same workers.properties file I've always used, specifying the tomcat with localhost. a single part of it said it couldn't contact the server.
Reverted to 1.2.37.
#2. None of the tomcat were accessible by the connector, 1.2.39, it acted as if the tomcats were down. 1.2.37 worked fine.
Loaded 1.2.39 back up, and then added the worker.[worker_name].prefer_ipv6=1 to each worker. Still no worky.
Changed localhost to 127.0.0.1, and removed new parameter. 1.2.39 now works fine.
On this second laptop, I noticed that IPv6 is on, but our DHCP server isn't giving out any ipv6 ip's.
Last edited by bberndt on Fri 28 Mar '14 17:27; edited 1 time in total |
|
Back to top |
|
Qmpeltaty
Joined: 06 Feb 2008 Posts: 182 Location: Poland
|
Posted: Fri 28 Mar '14 13:51 Post subject: |
|
|
I had different question - is it possible to use 1.2.37 mod_jk with Apache 2.4.9 ? |
|
Back to top |
|
TPL
Joined: 25 Mar 2014 Posts: 24 Location: Germany, Hamburg
|
Posted: Fri 28 Mar '14 17:27 Post subject: @ Qmpeltaty |
|
|
Yes. 1.2.37 mod_jk with Apache 2.4.9 is my current configuration. |
|
Back to top |
|
TPL
Joined: 25 Mar 2014 Posts: 24 Location: Germany, Hamburg
|
|
Back to top |
|