I tried many ports. I am sure that all the ports I tried were free. And this port is a shut down port. My machine:SunOS uni6505l1-sun1 5.10 Generic sun4u sparc SUNW,Sun-Fire-V440 2008-02-28 13:22:21,380 6047 [main] ERROR org.apache.catalina.core.StandardServer - StandardServer.await: create[17008]: java.net.BindException: Cannot assign requested address at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at org.apache.catalina.core.StandardServer.await(StandardServer.java:373) at org.apache.catalina.startup.Catalina.await(Catalina.java:630) at org.apache.catalina.startup.Catalina.start(Catalina.java:590) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) below is my ifconfig -a. removed some parts of the address. 1 inet6 ::1/128 ce0: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2 inet6 fe80::214:4fff:fe74:dc80/10 ether 0:14:4f:74:dc:80 ce0:1: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2 inet6 2001:d(removed this part)c80/64 ce0:2: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2 inet6 2002(removed this part)dc80/64 ce0:3: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2 inet6 fd00(removed this part)dc80/128 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6206527 <<<< is this something to do? thanks.
I happened to see that there is no IPv6 code at these lines of code. IPv6 loop-back address is also needed to be tried. file : StandardServer.java lines : 370 to 380 ServerSocket serverSocket = null; try { serverSocket = new ServerSocket(port, 1, InetAddress.getByName("127.0.0.1")); } catch (IOException e) { log.error("StandardServer.await: create[" + port + "]: ", e); System.exit(1); }
If it is the loop-back address we are trying to bind to, "InetAddress.getByName(null);" in ServerSocket constructor will do it for us in protocol independent way.
InetAddress.getByName(null); might be more elegant but I believe the fix for the duplicate also addresses this. The fix is in 6.0.16 onwards. *** This bug has been marked as a duplicate of bug 43588 ***