CentOSへの接続に失敗しました:ホストへのルートがありません
Centos Connecting Failed
背景:作成者のCentOSバージョン6.8は、Webアプリケーションサーバーcentosにデプロイされた場合、次のエラーへのwgetローカルアクセスを使用します
# Wget command execution wget http://127.0.0.1:8600 # Error Connecting to 127.0.0.1:8600... failed: No route to host
解決策:ポートへのアクセスを許可するために必要なローカルファイアウォール構成で、次のようになります。
# Iptables configuration file editing vim /etc/sysconfig/iptables # Add the following configuration, open the local port 8600, and then save ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8600 # Restart the firewall service iptables restart