3

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)
zeratul021
  • 2,644
  • 3
  • 32
  • 45

2 Answers2

3

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

zeratul021
  • 2,644
  • 3
  • 32
  • 45
  • Thanks so much. I stuck in this error for the last one day and I am lucky to find your post !!! – Kamran Apr 30 '14 at 11:20
1

According to this bug report, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572048

It is preferable to: echo 0 > /proc/sys/net/ipv6/bindv6only and committing that to: /etc/sysctl.d/bindv6only.conf

Lmwangi
  • 2,486
  • 1
  • 19
  • 26