2013년 1월 8일 화요일

[TechNote] Port rebind takes more than 3 minutes in WebSphere Application Server

Port rebind takes more than 3 minutes in WebSphere Application Server


Problem(Abstract)

TCP ports are not released by Linux even after stopping the Application Server.

Cause

If you start the server immediately after stopping or killing the Java™ process, some of the TCP ports are not released by the Linux operating system. Sometimes it takes more than three minutes for the port to be released by the operating system. Ordinarily, this happens only on Linux and not on any other operating system.
As soon as the JVM receives the stop signal it will pass on the information to the operating system to destroy all the listening ports. It is the responsibility of the operating system to clean up the ports that are in use. 

The following message may appear in the SystemOut.log file if startServer is issued immediately after stopping the process. 

[5/11/06 4:41:59:647 EDT] 00000018 TCPPort E TCPC0003E: TCP
Channel TCP_5 initialization failed. The socket bind failed for host 177.12.247.100 and port 9352. The port may already be in use.
[5/11/06 4:41:59:656 EDT] 00000018 ChannelFramew E CHFW0029E: Error
initializing chain DCS because of exception

com.ibm.wsspi.channel.framework.exception.RetryableChannelException: Address already in use

Once the port has been released by the operating system, WebSphere® Application Server can bind to the port. You may see the following message after few minutes:

[5/11/06 4:44:04:677 EDT] 00000018 TCPChannel A TCPC0001I: TCP Channel TCP_5 is listening on host test.ibm.com (IPv4: 999.99.999.999) port 9352.

Note: This may not happen on all Linux operating systems. No action is required if you do not see similar behavior.

Resolving the problem

It is working as designed.

To tune up the time out value, please add the following entry in sysctl.conf:

net.ipv4.tcp_fin_timeout = 30

Adding a timeout entry in sysctl.conf will not resolve the problem. It can only clean up the ports within the specified time duration. In this case, it will clean it up in 30 seconds.

댓글 없음:

댓글 쓰기