복붙노트

[HADOOP] Hadoop 2.2.0 : "이름 또는 서비스를 알 수 없음"경고

HADOOP

Hadoop 2.2.0 : "이름 또는 서비스를 알 수 없음"경고

내 목표는 우분투 12.4에서 hadoop 2.2.0을 실행하는 것입니다. 나는 그것을 할 수 있지만 다음 명령을 실행할 때 : rushi @ 우분투 : / usr / local / hadoop $ sbin / start-dfs.sh

내 dfs는 namenode, scondarynamenode 및 datanode를 시작하지만 문제는 다음과 같은 경고가 표시됩니다.

rushi@ubuntu:/usr/local/hadoop$ sbin/start-dfs.sh    
14/01/24 12:05:46 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
    Starting namenodes on [Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /usr/local/hadoop-2.2.0/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.
    It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
    localhost]
    sed: -e expression #1, char 6: unknown option to `s'
    Java: ssh: Could not resolve hostname Java: Name or service not known
    library: ssh: Could not resolve hostname library: Name or service not known
    warning:: ssh: Could not resolve hostname warning:: Name or service not known
    which: ssh: Could not resolve hostname which: Name or service not known
    have: ssh: Could not resolve hostname have: Name or service not known
    might: ssh: Could not resolve hostname might: Name or service not known
    You: ssh: Could not resolve hostname You: Name or service not known
    loaded: ssh: Could not resolve hostname loaded: Name or service not known
    Server: ssh: Could not resolve hostname Server: Name or service not known
    HotSpot(TM): ssh: Could not resolve hostname HotSpot(TM): Name or service not known
    have: ssh: Could not resolve hostname have: Name or service not known
    64-Bit: ssh: Could not resolve hostname 64-Bit: Name or service not known
    VM: ssh: Could not resolve hostname VM: Name or service not known
    disabled: ssh: Could not resolve hostname disabled: Name or service not known
    VM: ssh: Could not resolve hostname VM: Name or service not known
    stack: ssh: Could not resolve hostname stack: Name or service not known
    The: ssh: Could not resolve hostname The: Name or service not known
    fix: ssh: Could not resolve hostname fix: Name or service not known
    try: ssh: Could not resolve hostname try: Name or service not known
    guard.: ssh: Could not resolve hostname guard.: Name or service not known
    to: ssh: Could not resolve hostname to: Name or service not known
    now.: ssh: Could not resolve hostname now.: Name or service not known
    will: ssh: Could not resolve hostname will: Name or service not known
    that: ssh: Could not resolve hostname that: Name or service not known
    stack: ssh: Could not resolve hostname stack: Name or service not known
    the: ssh: Could not resolve hostname the: Name or service not known
    you: ssh: Could not resolve hostname you: Name or service not known
    -c: Unknown cipher type 'cd'
    guard: ssh: Could not resolve hostname guard: Name or service not known
    It's: ssh: Could not resolve hostname It's: Name or service not known
    highly: ssh: Could not resolve hostname highly: Name or service not known
    fix: ssh: Could not resolve hostname fix: Name or service not known
    recommended: ssh: Could not resolve hostname recommended: Name or service not known
    or: ssh: Could not resolve hostname or: Name or service not known
    the: ssh: Could not resolve hostname the: Name or service not known
    library: ssh: Could not resolve hostname library: Name or service not known
    link: ssh: Could not resolve hostname link: Name or service not known
    'execstack: ssh: Could not resolve hostname 'execstack: Name or service not known
    with: ssh: Could not resolve hostname with: Name or service not known
    <libfile>',: ssh: Could not resolve hostname <libfile>',: Name or service not known
    it: ssh: Could not resolve hostname it: Name or service not known
    noexecstack'.: ssh: Could not resolve hostname noexecstack'.: Name or service not known
    with: ssh: Could not resolve hostname with: Name or service not known
    '-z: ssh: Could not resolve hostname '-z: Name or service not known
    localhost: starting namenode, logging to /usr/local/hadoop-2.2.0/logs/hadoop-rushi-namenode-ubuntu.out
    localhost: starting datanode, logging to /usr/local/hadoop-2.2.0/logs/hadoop-rushi-datanode-ubuntu.out
    Starting secondary namenodes [Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /usr/local/hadoop-2.2.0/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.
    It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
    0.0.0.0

]

무엇이 문제 일 수 있으며 어떻게 해결할 수 있습니까? 도와주세요.

해결법

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

    1.하나의 이유는 Hadoop의 기본 네이티브 라이브러리가 32 비트 용으로 구축 된 것일 수 있습니다.

    하나의 이유는 Hadoop의 기본 네이티브 라이브러리가 32 비트 용으로 구축 된 것일 수 있습니다.

    .bashrc 또는 .bash_profile에 다음 행을 추가하십시오.

    export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_INSTALL/lib/native
    export HADOOP_OPTS="-Djava.library.path=$HADOOP_INSTALL/lib"
    

    이것은 나를 위해 우분투 12.04에서 일했습니다.

    $ HADOOP_INSTALL은 Hadoop을 설치하는 위치입니다 (일반적으로 / usr / local / hadoop).

    심지어 HADOOP_INSTALL 대신 HADOOP_HOME이있을 수도 있습니다.

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

    2.이것은이 링크에서 주어진 것과 같은 질문입니다. 그것은 다른 방법으로 요청되었습니다.

    이것은이 링크에서 주어진 것과 같은 질문입니다. 그것은 다른 방법으로 요청되었습니다.

    이 링크를 계속 따라 가면 다음과 같은 경고 메시지가 나타날 수 있습니다.

    WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
    

    이 경고를 해결하려면이 링크를 따르십시오.

  3. ==============================

    3.나는 여기서 유일한 문제는이 질문에서와 같다고 생각한다. 그래서 해결책 또한 같다.

    나는 여기서 유일한 문제는이 질문에서와 같다고 생각한다. 그래서 해결책 또한 같다.

    JVM이 스택 가드 경고를 stdout / stderr로 출력하지 못하게하십시오. 이것이 HDFS 시작 스크립트를 중단시키기 때문입니다.

    etc / hadoop / hadoop-env.sh 줄을 바꾸면됩니다 :

    export HADOOP_OPTS="$HADOOP_OPTS -Djava.net.preferIPv4Stack=true"
    

    와:

    export HADOOP_OPTS="$HADOOP_OPTS -XX:-PrintWarnings -Djava.net.preferIPv4Stack=true"
    

    (이 해결책은 Sumit Chawla의 블로그에서 발견되었습니다)

  4. ==============================

    4.이 오류는 주로 .bashrc의 잘못된 구성으로 인해 발생합니다.

    이 오류는 주로 .bashrc의 잘못된 구성으로 인해 발생합니다.

    마지막에 .bashrc 파일에 아래 코드를 추가하십시오.

    #HADOOP VARIABLES START
    export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
    export HADOOP_INSTALL=/usr/local/hadoop
    export PATH=$PATH:$HADOOP_INSTALL/bin
    export PATH=$PATH:$HADOOP_INSTALL/sbin
    export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
    export HADOOP_COMMON_HOME=$HADOOP_INSTALL
    export HADOOP_HDFS_HOME=$HADOOP_INSTALL
    export YARN_HOME=$HADOOP_INSTALL
    export HADOOP_HOME=$HADOOP_INSTALL
    export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_INSTALL/lib/native
    export HADOOP_OPTS="-Djava.library.path=$HADOOP_INSTALL/lib/native"
    #HADOOP VARIABLES END
    

    호스트에 대한 오류를 제거하려면. apache2 서버를 설치하십시오. localhost의 모든 기본 구성을 구성합니다.

    sudo apt-get install apache2. 
    

    이 URL에서 확인하십시오 : http : // localhost

    처음부터 구성 할 전체 기사 아래를 읽으십시오. http://www.bogotobogo.com/Hadoop/BigData_hadoop_Install_on_ubuntu_single_node_cluster.php

  5. ==============================

    5.이 스크립트는 더 이상 사용되지 않습니다. 대신 start-dfs.sh 및 start-yarn.sh를 사용하십시오.

    이 스크립트는 더 이상 사용되지 않습니다. 대신 start-dfs.sh 및 start-yarn.sh를 사용하십시오.

    try-yarn.sh를 시도하십시오.

  6. from https://stackoverflow.com/questions/21326274/hadoop-2-2-0-name-or-service-not-known-warning by cc-by-sa and MIT license