But nothing worked. The strange thing is that it seemed that the connection was refused. The logs of Tomcat didn't show any activity, neither did any of the system logs. I struggled to understand this and even resorted to trying a different JDK (Sun's own) on another VM, but that attempt failed even sooner with (what I now understand is the same bug) being unable to open a IPv4 socket.
The reason is that in the upstream package(s) for (I think) the JDKs - both OpenJava and Sun's own - the flag for opening only IPv6 sockets has been set to true! No wonder that my 'measly' attempts at connecting using the exotic and obsolete IPv4 failed (pah!)
Here's the bug (which I should have looked at first, I know) that took me half a day to find:
And here's a workaround to disable this behaviour system-wide (it basically disallows 'only' opening IPv6 sockets, as far as I can see):
Once I did that (and re-started Tomcat) it all worked. Phew.
Hopefully people with the same problem will find this and be saved as well. (Drop a comment if you do. I like to know if I helped a suffering soul)
6 comments:
Thank you, thank you, thank you. It made my day (or night I should say)
thnx you... you safe my days
GRACIAS!!!! TENIA UN MES CON ESTE PROBLEMA
Thank you. I had a run-in with this while trying to get eclipse software update/install to work, but did not realize this was the cause for Tomcat6 as well. The issue is fixed for openjdk, apparently, because tomcat only worked with that. Now it runs with Sun Java too! \m/
Thank you. I had a run-in with this issue while trying to get eclipse software installation to work, but did not realize the same thing caused problems for Sun Java with Tomcat6 as well. Guess i'm slow. Apparently it has been fixed for OpenJDK because Tomcat worked with that. But now i know how to use Sun Java with Tomcat6! \m/
All I have to say is <3.
Headache is now gone.
Post a Comment