failed to connect to server , error message is:No route to host
转自:http://blog.csdn.net/miaohongyu1/article/details/11472469
https://jingyan.baidu.com/article/8cdccae946963f315413cdef.html
Connect error: No route to host(errno:113) 连接错误解决办法--关闭iptables防火墙
两台机器进行socket通信时,可能在连接时出现错误:
connect error: No route to host(errno:113)
出错原因:server端的防火墙设置了过滤规则
解决办法:使用iptables关闭server端的防火墙
1.暂时关闭
$sudo service iptables stop
2.打开
$sudo service iptables start
3.永久打开和关闭
$sudo chkconfig iptables on
$sudo chkconfig iptables off