1. 程式人生 > >curl: (7) Failed connect to 172.16.100.199:9200; 沒有到主機的路由

curl: (7) Failed connect to 172.16.100.199:9200; 沒有到主機的路由

ble stat ber ret iptable stop int iter OS

沒有到主機的路由這種問題很常見,多數是由機器的防火墻沒有關閉。

Ubuntu

  • 查看防火墻狀態
ufw status
  • 關閉防火墻
ufw disable

centos6

  • 查看防火墻狀態
service iptables status
  • 關閉防火墻
chkconfig iptables off 

centos7

  • 查看防火墻狀態
firewall-cmd --state
  • 關閉防火墻
systemctl stop firewalld.service

curl: (7) Failed connect to 172.16.100.199:9200; 沒有到主機的路由