xx / xx:9000への呼び出しが接続例外で失敗しました(hadoop)
Call Xx Xx 9000 Failed Connection Exception
シーンの説明
- eclipse + hadoopに基づく開発プロセス中、eclipseはリモートhadoopサーバーのファイルシステムにアクセスできず、ローカルCMDウィンドウTelnetが失敗します。
- 失敗プロンプト1:
- ローカルWindowsCMDウィンドウプロンプト
telnet remote_hadoop_ip 9000 # Test port connectivity # Connecting to x.x.x.x... Could not open the connection to the host. On port 9000: connection failed
- 失敗メッセージ2:
- 日食環境
1. Call to local_IP/remote_IP:9000 failed on connection exception. 2. Failed on local exception:java.ioIOExceptionHost Details:local host is 'pc_name/local_ip'destination host is 'remote_ip':9000
原因分析
- Telnetが失敗します。ポート9000は、異常な接続を報告するeclispseと同じです。
- 質問1: ホストファイルとHadoopxmlの構成は一貫している必要があります
- ホスト ファイル
# cat /etc/hosts # 192.168.1.110 Remote server IP address 192.168.1.110 master
- hadoopxml構成ファイル
- core-site.xmlファイル
<property> <name>fs.defaultFSname> <value>hdfs://master:9000value> property>
- mapred-site.xmlファイル
<property> <name>mapreduce.jobtracker.addressname> <value>master:9001value> property>
リモートサーバーIP:hadoopサービスポート
- またはリモートサーバーのIPアドレス、または0.0.0.0
- ローカルホストではありません!
質問2: ローカル例外で失敗しました:java.ioIOException
- コンピュータ名の変更が発生しました。ローカルコンピュータ名が次のパス構成と一致しているかどうかを確認してください
- hadoop.http.authentication.kerberos.keytab
- hadoop.http.authentication.signature.secret.file
- コンピュータ名の変更が発生しました。ローカルコンピュータ名が次のパス構成と一致しているかどうかを確認してください
一般的なLinuxコマンド
netstat -tunlp |grep 9000 # Display all ports and all corresponding programs, grep pipeline filters key fields firewall-cmd --state # View firewall status systemctl start firewalld.service # Start firewall systemctl stop firewalld.service # Turn off the firewall firewall-cmd --reload # Overload firewall systemctl restart firewalld # Restart firewall firewall-cmd --zone=dmz --list-ports # View all open ports firewall-cmd --help # View help