Dear developers. I made the mod_jk patch to support ipv6 between mod_jk and Tomcat. The detection of getaddrinfo() and implementation of jk_resolve() referred to APR. This patch was tested in the following environments (Do not compile in other OS's). 1.RHEL4/5 with Apache 2.x Link-Local address cannot be used. 2.Windows XP Pro with IIS 5.1 isapi_redirector.dll was constructed by VS 2005 Express + PSDK. when constructing the isapi_redirector.dll, '/D "HAVE_IPV6"' and '/D "HAVE_GETADDRINFO"' were specified. My best regards.
Created attachment 21189 [details] ipv6 support patch
Created attachment 21463 [details] patch for mod_jk-1.2.27-dev new patch for mod_jk-1.2.27-dev
Created attachment 27058 [details] patch for 1.2.30 Patch for 1.2.30. I did only an easy connection test. <<workers.properties>> worker.ajp1.host=::1 worker.ajp1.port=8009 regards.
Created attachment 27059 [details] patch for trunk Patch for trunk. I did only an easy connection test. <<workers.properties>> worker.ajp1.host=::1 worker.ajp1.port=8009 regards.
I used ipv6_for_1230.patch on 64bit's linux OS, But it also failed when workers.properties file's host is ipv6 address. my works.properties is like following: ----------- worker.list=lb1 worker.ci1.type=ajp13 worker.ci1.host=2001::178 worker.ci1.port=18009 worker.ci1.lbfactor=50 worker.ci1.socket_connect_timeout=3000 worker.ci2.type=ajp13 worker.ci2.host=2001::178 worker.ci2.port=28009 worker.ci2.lbfactor=50 worker.ci2.socket_connect_timeout=3000 worker.lb1.type=lb worker.lb1.balance_workers=ci1,ci2 worker.lb1.sticky_session=false worker.lb1.sticky_session_force=false worker.lb1.retries=0 ----------- I patched the ipv6_for_1230.patch and rebuilded jk ---- $patch -p1 < ipv6_for_1230.patch $cd tomcat-connector-1.2.30-src/native $CFLAGS="-m64" ./configure --with-apxs=$apache2.2.15_root/bin/apxs && make && make install $$apache2.2.15_root/bin/apachectl -k start ---- then,vi $apache2.2.15_root/logs/mod_jk.log, Threr are following error messages --- ajp_validate::jk_ajp_common.c (2619): worker ci1 can't resolve tomcat address 2001::178 ajp_validate::jk_ajp_common.c (2624): worker ci1 contact is disabled ...
(In reply to comment #5) (snip) > I patched the ipv6_for_1230.patch and rebuilded jk > ---- > $patch -p1 < ipv6_for_1230.patch > $cd tomcat-connector-1.2.30-src/native Before you do the configure command, execute buildconf.sh. > $CFLAGS="-m64" ./configure --with-apxs=$apache2.2.15_root/bin/apxs && make && > make install > $$apache2.2.15_root/bin/apachectl -k start > ---- > > then,vi $apache2.2.15_root/logs/mod_jk.log, Threr are following error messages > --- > ajp_validate::jk_ajp_common.c (2619): worker ci1 can't resolve tomcat address > 2001::178 > ajp_validate::jk_ajp_common.c (2624): worker ci1 contact is disabled > ... regards.
*** Bug 51261 has been marked as a duplicate of this bug. ***
Hi Eiji, in jk_connect.c your removed a big block, which was executed when HAVE_APR was defined. Below the block it saqys we should use gethostbyname_r in a multi-threaded environment, which works here at least when using APR, because then we fall back to using APR. When removing the block this is no longer true. Can you comment, why you removed that block starting at line 350? Another question: will your patch only work for Apache, or also for IIS and NSAPI? Even without that it is an improvement, just trying to understand. Regards, Rainer
Hi, I ran into this problem of mod_jk not supporting ipv6, and found this bug. Is this going to be fixed, or is mod_jk obsolete? On the Tomcat FAQ page on connectors (http://wiki.apache.org/tomcat/FAQ/Connectors), mod_jk is presented as the preferred connector: "mod_jk is mature, stable and extremely flexible.. It is under active development by members of the Tomcat community." I found out that mod_proxy and mod_proxy_ajp do work with ipv6, so I guess I will try to use those instead. Thanks,
I'm going to work on this feature this and next week, so hopefully we'll have IPV6 support inside mod_jk. First thing is that APR should be used for name resolution whenever present, so this means that the provided patch removing APR support completely will have to be modified. Next thing is how to preserve backward compatibility for existing configurations where IPV4 is preferred over IPV6 when resolving hostnames. There are two options. a) have worker.name.hostname6 = localhost b) have worker.name.hostname = ::localhost In case there is a colon inside name (eg. ::1) use IPV6 Beside that most of the Eiji's patch can be reused.
IPv6 support in mod_jk has been added in 1.2.39. Is there anything left here, or this can be closed as FIXED?
Resolving the issue since it's been implemented