piątek, maja 30, 2014

Tibco BW Tomcat runs out of local TCP/IP ports

caused by: java.net.BindException: Address already in use
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
        at java.net.Socket.bind(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:79)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:121)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)

Workaround:
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo 10 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 1024 > /proc/sys/net/ipv4/tcp_max_orphans
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse

or change engine from Tomcat to HTTPComponent.

0 komentarze: