NoRouteToHostException: Cannot assign requested address
On socket
s.setReuseAddress(true);
check and set max number of file handles ulimit
sudo su
echo "1" >/proc/sys/net/ipv4/tcp_tw_reuse
echo "1" >/proc/sys/net/ipv4/tcp_tw_recycle
Other OS settings
s.setReuseAddress(true);
check and set max number of file handles ulimit
sudo su
echo "1" >/proc/sys/net/ipv4/tcp_tw_reuse
echo "1" >/proc/sys/net/ipv4/tcp_tw_recycle
Other OS settings
Comments