http://stackoverflow.com/questions/1572215/how-to-avoid-a-noroutetohostexception
端口不够用,注意一定要关闭所有不用的连接,如果还是不行reuseaddr设为true。
http://blog.csdn.net/gzh0222/article/details/8491178
编辑文件,加入以下内容:
vi /etc/sysctl.conf
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
然后执行/sbin/sysctl -p让参数生效。
[why time wait 2msl?] http://blog.csdn.net/overstack/article/details/8833894