Bug 47499 - provide better insight on BindException: Cannot assign requested address
provide better insight on BindException: Cannot assign requested address
Status: RESOLVED FIXED
Product: Tomcat 6
Classification: Unclassified
Component: Connectors
unspecified
PC Linux
: P2 normal (vote)
: default
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2009-07-08 22:05 UTC by Ralf Hauser
Modified: 2009-10-03 11:06 UTC (History)
0 users



Attachments
tomcat_rfe_47499patch.txt (1.84 KB, text/plain)
2009-07-08 22:06 UTC, Ralf Hauser
Details
Alternative patch (2.24 KB, application/octet-stream)
2009-09-22 14:18 UTC, Mark Thomas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Hauser 2009-07-08 22:05:03 UTC
1) cite the address you attempt to listen (not just the port)
2) proper exception chaining

the following info is currently lost: <<java.net.BindException: Cannot assign requested address
	at java.net.PlainSocketImpl.socketBind(Native Method)
	at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
	at java.net.ServerSocket.bind(ServerSocket.java:319)
	at java.net.ServerSocket.<init>(ServerSocket.java:185)
	at javax.net.ssl.SSLServerSocket.<init>(SSLServerSocket.java:106)
	at com.privasphere.net.ssl.SSLServerSocketImpl.<init>(SSLServerSocketImpl.java:106)
	at com.privasphere.net.ssl.SSLServerSocketFactoryImpl.createServerSocket(SSLServerSocketFactoryImpl.java:71)
	at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:100)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:295)
	at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:139)
	at org.apache.catalina.connector.Connector.initialize(Connector.java:1017)
	at org.apache.catalina.core.StandardService.initialize(StandardService.java:578)>>
Comment 1 Ralf Hauser 2009-07-08 22:06:49 UTC
Created attachment 23946 [details]
tomcat_rfe_47499patch.txt

an idea how to improve the error reported
Comment 2 Ralf Hauser 2009-07-08 23:30:52 UTC
reported also to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=536328.

Some discussion that may end in fingerpointing between debian and tomcat is here
 http://marc.info/?l=tomcat-user&m=124698302231803&w=2 and http://marc.info/?l=tomcat-user&m=124698405701221&w=2
Comment 3 Mark Thomas 2009-09-22 14:18:58 UTC
Created attachment 24302 [details]
Alternative patch

I have fixed this in trunk and have attached an alternative patch for 6.0.x. I'll propose the alternative patch for 6.0.x shortly.
Comment 4 Mark Thomas 2009-10-03 11:06:07 UTC
The patch has been applied to 6.0.x and will be included in 6.0.21 onwards.