views:

119

answers:

1

Working Tomcat setup stopped working after dist-upgrade on Debian (to Squeeze). 8005 is the shutdown port but it is not occupied. Any ideas on what it may be? It's not quite self-speaking exception. This is log from catalina:

org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8005]:                          
java.net.SocketException: Invalid argument                                      
        at java.net.PlainSocketImpl.socketBind(Native Method)        
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
        at org.apache.catalina.startup.Catalina.await(Catalina.java:662)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:614)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                               
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
A: 

Problem solved, it's related to some IPv6 stuff so to skip this you need to add -Djava.net.preferIPv4Stack=true option to JAVA_OPTS variable in catalina.sh script or alter kernel configuration. More on this:

http://confluence.atlassian.com/pages/viewpage.action?pageId=214863647

Zeratul