Hello,

I almost couldn't believe it, but I solved the problem. The issue was Apache 
missing a flag in its config file, Win32DisableAcceptEx. When I put this into 
the httpd.conf, everything worked fine!

This crazy stuff took me 2 days to figure out... 

Does anyone by any chance know what this is doing exactly?? Does it have an 
impact on performance and/or stability of Apache?

Regards,
Nino


-----Ursprüngliche Nachricht-----
Von: Johnny Kewl [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 3. Juli 2007 16:46
An: Tomcat Users List
Betreff: Re: Tomcat - Apache: IP replacement


----- Original Message ----- 
From: "Nino Ulsamer" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Tuesday, July 03, 2007 2:25 PM
Subject: AW: Tomcat - Apache: IP replacement


Hi,
thanks for your help!

I now tried the following: I set up the configuration as you told me on my 
local machine (running Windows XP) and everything works like expected 
(getting some IP-address), like you described.

If, however, I move to one of our servers (I tried two different servers 
now), both running a Windows 2000 Server operating system, I get the 0.0.0.0 
IP, using exactly the same configuration as on my local machine.

--------
Dont know.... if those are established servers, settings are probably OK, 
only thing I can think of is that JK MOD and Apache.... are a mismatched 
pair
mod_jk.so has no versioning info in the file, so its not possible to check 
it.
Right click on each httpd.exe file (apache/bin) and check the version.
Then go to
 
http://apache.mirrors.hoobly.com/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.23/and
 get the MOD_JK file with the closest number to that Apache version.Replace the 
mod_jk.so with the matching version, and restart apache...--------Any 
ideas????Thanks,Nino-----Ursprüngliche Nachricht-----Von: Johnny Kewl 
[mailto:[EMAIL PROTECTED]: Dienstag, 3. Juli 2007 13:14An: Tomcat Users 
ListBetreff: Re: Tomcat - Apache: IP replacementHi Nino,Just to make sure my 
memory served me correctly, I setup a test case forApache -> JK -> TC.... on a 
machine (XP SP2) with IPV6 enabled.Apache, Browser and TC... are all on same 
machine to simulate your test.Apache is not IPv6 enabledThe machines name is 
Animal.... ipv4 10.0.0.4... IPv6 2001:918:0:12:1::2I have a simple webapp that 
returns the getRemoteAddrTurns out I was close, but my memory is actually crap 
;)This is what happens...==== Direct to TC  Local 
Browser===http://localhost:8080/TestRemoteIp/   gives  Remote IP is 0:0:0:0:0:
 0:0:1http://animal:8080/TestRemoteIp/   gives  Remote IP is 
0:0:0:0:0:0:0:1(See my memory sucks.... I remembered that as 0.0.0.0)This is 
different from IPv4.... normally that will return 10.0.0.4...... ifI remember 
correctly ;)So IPv6 seems to map it all to the loop back 
addresshttp://10.0.0.4:8080/TestRemoteIp/   gives Remote IP is 10.0.0.4Thank 
goodness ;)http://[2001:918:0:12:1::2]:8080/TestRemoteIp/  gives Remote IP 
is2001:918:0:12:1:0:0:2=== Thru Apache Local 
Browser===http://localhost/TestRemoteIp/  gives Remote IP is 127.0.0.1It 
actually fixes it ;)http://animal/TestRemoteIp/  gives Remote IP is 127.0.0.1So 
with IPv6 the machine name is now mapping to loop back... on IPv4 itwould be 
10.0.0.4http://10.0.0.4/TestRemoteIp/  gives Remote IP is 
10.0.0.4http://[2001:918:0:12:1::2]/TestRemoteIp/   FAILS expected because 
thisapache is not IPv6 enabled=== Thru Apache REMOTE machine Browser===When 
Calling "Animal", or "10.0.0.4".... always gives the correct IPV4address of 
remot
 e machine (which is not IPv6 enabled)So as you can see.... a few things are 
different on IPV6..... which I nowbelieve you not on ;).... the 0.0.0.0 you 
getting is just very strangeEven though the little differences will make 
developers pull their hair out;).... its definitely is working, even on IPv6 
and the differences are onlywhen testing from a local browser.Just to make 
sure.... I downloaded Apache and Mod_JK again for the test....Used Apache 
apache_2.2.4-win32-x86-no_ssl.msiand mod_jk-apache-2.2.4.soNOTICE THAT even 
though JK is now at version JK-1.2.23.... the binary fileyou download must 
match the version of Apache.as you can see from the notes on this 
pagehttp://apache.mirrors.hoobly.com/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.23/=======
 MOD_JK.conf ========<IfModule !mod_jk.c>  LoadModule jk_module 
"D:/DEV/Apache2.2.4/modules/mod_jk.so"</IfModule>JkWorkersFile 
conf/jk/workers.propertiesJkLogFile conf/jk/mod_jk.logJkLogLevel 
info#JkLogLevel debugJkLogStampF
 ormat "[%a %b %d %H:%M:%S %Y]"JkOptions +ForwardKeySize +ForwardURICompat 
-ForwardDirectoriesJkRequestLogFormat "%w %V %T"JkMount /TestRemoteIp/*  
worker1========== WORKERS.Properties ========worker.list=worker1# Set 
WORKER1worker.worker1.port=8009worker.worker1.host=animalworker.worker1.type=ajp13===============
 Test JSP =================<[EMAIL PROTECTED] contentType="text/html"%><[EMAIL 
PROTECTED] pageEncoding="UTF-8"%><html>    <head>        <meta 
http-equiv="Content-Type" content="text/html; charset=UTF-8">        
<title>TEST getRemoteAddr</title>    </head>    <body>    <h1>TEST 
getRemoteAddr</h1><%String callerIP = request.getRemoteAddr();%>    <p>Remote 
IP is <%=callerIP%></p>    </body></html>I couldnt simulate what you 
getting.... can only suggest you download thestuff again... the above 
definitely works, and I'm guessing you got a bumfile, or a mismatch between 
Apache and JK module......Good Luck----- Original Message -----From: "Nino 
Ulsamer" <[EMAIL PROTECTED]>To: "Tomcat U
 sers List" <users@tomcat.apache.org>Sent: Monday, July 02, 2007 5:43 
PMSubject: AW: Tomcat - Apache: IP replacementHey,thanks for your support so 
far.I just played around with the settings some more and could find out 
moreinteresting stuff...First of all, about our configuration: we have an 
Apache and Tomcat runningon the same machine, with JK 1.2 in between. If I log 
requests in Apache,the IP address is correct. If I go directly to Tomcat (via 
port 8080), theIP is correct. But if I go through JK, the address gets changed 
to 0.0.0.0.I checked the JK log file, and it logs the following before 
forwarding toTomcat:[Mon Jul 02 17:28:36 2007] [0848:1240] [debug] mod_jk.c 
(604): Serviceprotocol=HTTP/1.1 method=GET host=(null) addr=0.0.0.0 
name=xxx.xxx.xxx.xxxport=80 auth=(null) user=(null) laddr=xxx.xxx.xxx.xxx 
raddr=0.0.0.0So even here, this strange 0.0.0.0 is coming up.One more 
intersting to notice. From the logfiles I saw that this wholeproblem started 
when we switched from JK 
 2 to JK 1.2 (which is supposed tobe the newer version).But we are using very 
basic settings of JK, according to the howto of thewebsite. A single 
loadbalancer-worker, so nothing special.Any 
hints???Nino---------------------------------------------------------------------To
 start a new topic, e-mail: [EMAIL PROTECTED] unsubscribe, e-mail: [EMAIL 
PROTECTED] additional commands, e-mail: [EMAIL PROTECTED] start a new topic, 
e-mail: [EMAIL PROTECTED] unsubscribe, e-mail: [EMAIL PROTECTED] additional 
commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to