You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/02/19 08:05:17 UTC
DO NOT REPLY [Bug 17193] New: -
java.net.bindException during shutdown in Tomcat 4.1.18
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17193>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17193
java.net.bindException during shutdown in Tomcat 4.1.18
Summary: java.net.bindException during shutdown in Tomcat 4.1.18
Product: Tomcat 4
Version: 4.1.18
Platform: All
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Connector:Coyote JK 2
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: ankur_goel@intersolutions.stpn.soft.net
Following error was encountered while shutdown, i m giving complete log message
from startup to shutdown
[INFO] Registry - -Loading registry information
[INFO] Registry - -Creating new Registry instance
[INFO] Registry - -Creating MBeanServer
[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.18
[INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080
[INFO] ChannelSocket - -JK2: ajp13 listening on 0.0.0.0/0.0.0.0:8009
[INFO] JkMain - -Jk running ID=0 time=10/100 config=d:\Tomcat 4.1.18
\conf\jk2.properties
Stopping service Tomcat-Standalone
java.net.BindException: Cannot assign requested address: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:350)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:137)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:124)
at java.net.Socket.<init>(Socket.java:268)
at java.net.Socket.<init>(Socket.java:122)
at org.apache.jk.common.ChannelSocket.destroy(ChannelSocket.java:417)
at org.apache.jk.server.JkMain.stop(JkMain.java:308)
at org.apache.jk.server.JkCoyoteHandler.destroy
(JkCoyoteHandler.java:179)
at org.apache.coyote.tomcat4.CoyoteConnector.stop
(CoyoteConnector.java:1081)
at org.apache.catalina.core.StandardService.stop
(StandardService.java:546)
at org.apache.catalina.core.StandardServer.stop
(StandardServer.java:2224)
at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run
(Catalina.java:624)
what i figured out by looking at the code of "ChannelSocket.java" was that in
method "init" of class "ChannelSocket" the following code
if (getAddress() == null)
setAddress("0.0.0.0");
is setting 'inet' variable to address 0.0.0.0, which is creating problems at
the time of shutdown when method "destroy" is called and a new socket creation
is tried which results in the above mentioned "Bind Exception"...
if (inet == null) {
s=new Socket("127.0.0.1", port );
}else{
s=new Socket(inet, port );
// setting soLinger to a small value will help shutdown the
// connection quicker
s.setSoLinger(true, 0);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org