복붙노트

[HADOOP] 항상 로컬 호스트로 리디렉션 webhdfs : 50075을

HADOOP

항상 로컬 호스트로 리디렉션 webhdfs : 50075을

나는 하나의 네임 노드, 하나의 보조 네임 노드, 3 개 데이타 노드와 HDFS 클러스터 (하둡 2.7.1)를 가지고있다.

내가 webhdfs 및 테스트를 가능하게 할 때, 나는 항상 리디렉션 발견 "로컬 호스트 : 50075"데이타 노드로 구성되어 있지 않습니다.

csrd@secondarynamenode:~/lybica-hdfs-viewer$ curl -i -L "http://10.56.219.30:50070/webhdfs/v1/demo.zip?op=OPEN"
HTTP/1.1 307 TEMPORARY_REDIRECT
Cache-Control: no-cache
Expires: Tue, 01 Dec 2015 03:29:21 GMT
Date: Tue, 01 Dec 2015 03:29:21 GMT
Pragma: no-cache
Expires: Tue, 01 Dec 2015 03:29:21 GMT
Date: Tue, 01 Dec 2015 03:29:21 GMT
Pragma: no-cache
Location: http://localhost:50075/webhdfs/v1/demo.zip?op=OPEN&namenoderpcaddress=10.56.219.30:9000&offset=0
Content-Type: application/octet-stream
Content-Length: 0
Server: Jetty(6.1.26)

curl: (7) Failed to connect to localhost port 50075: Connection refused

전문 의약품 / 하둡 / 노예는 다음과 같이 구성되어 있습니다 :

10.56.219.32
10.56.219.33
10.56.219.34

여기에 대한 구성이 있습니까?

감사!

해결법

  1. ==============================

    1.음,은 / etc / hosts 파일의 실수.

    음,은 / etc / hosts 파일의 실수.

    데이타 노드의 / etc / 호스트했다 :

    127.0.0.1   localhost datanode-1
    

    그것을하는 변경 :

    127.0.0.1   datanode-1 localhost
    

    이 문제를 해결.

  2. ==============================

    2.당신은 HDFS-site.xml 파일에이 항목이 필요합니다

    당신은 HDFS-site.xml 파일에이 항목이 필요합니다

    <property>
      <name>dfs.datanode.http.address</name>
      <value>0.0.0.0:50075</value>
    </property>
    

    값은 클러스터에서 0.0.0.0해야합니다. 당신은 HDFS-site.xml 파일을 업데이트하고 클러스터의 모든 노드를 배포 한 후 클러스터를 다시 시작해야합니다.

  3. from https://stackoverflow.com/questions/34012135/webhdfs-always-redirect-to-localhost50075 by cc-by-sa and MIT license