[
http://jira.jboss.com/jira/browse/JBESB-1378?page=comments#action_12393641 ]
Daniel Bevenius commented on JBESB-1378:
----------------------------------------
I've verified that this issue occurs when using Apache APR on Linux.
The problem seems to be that org.apache.tomcat.util.net.AprEndpoint$Acceptor's run
method is blocking on accept:
public void run() {
log.info( "Aceptor.run...");
// Loop until we receive a shutdown command
while (running) {
// Loop if endpoint is paused
while (paused) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// Ignore
}
}
try {
// Allocate a new worker thread
// Accept the next incoming connection from the server socket
// Hand this socket off to an appropriate processor
log.info( "Aceptor.run.accept serverSock : " + serverSock + ", port :
" + port);
getWorkerThread().assign(Socket.accept(serverSock), true);
} catch (Throwable t) {
log.error(sm.getString("endpoint.accept.fail"), t);
}
// The processor will recycle itself when it finishes
}
log.info( "Aceptor.run...done");
}
After 'ant-undeploy' the following netstat call produces:
#netstat -na | grep 8765
tcp 0 0 127.0.0.1:8765 0.0.0.0:* LISTEN
Now, telneting like this:
telnet localhost 8765
will exit the accept block and the check "if (running) will make the method exit, and
the quickstart can be redeployed as the port is now free.
I'll post to the jbossweb forum and see if they can help us out. There might be a way
to make the accept call no-blocking or there might be a way to force the method to exit
which might be what "The processor will recycle itself when it finishes" is
indicating. I've been trying to play around with various settings for the AprEndpoint
class but without success.
JBossRemotingGatewayListener not disconnecting properly on undeploy
--------------------------------------------------------------------
Key: JBESB-1378
URL:
http://jira.jboss.com/jira/browse/JBESB-1378
Project: JBoss ESB
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Transports
Affects Versions: 4.2.1
Reporter: Tom Fennelly
Assigned To: Daniel Bevenius
Fix For: 4.2.1 CP1
Looks as though the jbr-listener is not closing/stopping/disconnecting properly on the
doStop event.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira