proprius
proprius

Reputation: 522

hadoop installation error message

hadoop OpenJDK Server VM warning: You have loaded library /usr/lib/hadoop/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 ', or link it with '-z noexecstack'.

I am getting this message while I was trying to install hadoop-yarn-resourcemanger due to which all other installations of hadoop packages are showing that the packages are broken on your system. How to fix this? Thanks

Upvotes: 5

Views: 989

Answers (2)

chrisinmtown
chrisinmtown

Reputation: 4324

I hit the same error while installing Hadoop 2.2 on a cluster running Ubuntu 14.04 64bit with Java 1.7.0_75. (Ain't no way I'm gonna downgrade to 32bit.) Here's how I compiled the native library.

This Hadoop 2.5 page for native libraries is helpful, it offers the required mvn command: http://hadoop.apache.org/docs/r2.5.0/hadoop-project-dist/hadoop-common/NativeLibraries.html#Build

  1. Make sure prereqs are met on linux. You must use maven version 3!

    apt-get install cmake autoconf automake libtool gcc zlib1g-dev pkg-config libssl-dev openssl maven
    
  2. Download a Hadoop source tarball from https://archive.apache.org/dist/hadoop/core

  3. Unpack and survey:

    tar xzpf hadoop-2.2.0-src.tar.gz
    cd hadoop-2.2.0-src
    
  4. Build the native library (not everything):

    cd hadoop-common-project/hadoop-common
    mvn package -Pdist,native -DskipTests=true -Dtar
    
  5. Copy the resulting .so file to the binary area.

    cp target/hadoop-common-2.2.0/lib/native/libhadoop.so.1.0.0 /home/hadoop/hadoop-2.2.0/lib/native/
    
  6. Test by starting a daemon to see if the warning 'disabled stack guard' (see above) still appears:

    /home/hadoop/hadoop-2.2.0/sbin/hadoop-daemon.sh start namenode n
    

I tested this on Hadoop source versions 2.2.0 and 2.5.2.

@user2345523 @DivyangShah hope this helps

Upvotes: 1

HadoopFan
HadoopFan

Reputation: 19

I got the same error and isn't it painful. The reason why you are getting this error is that the library file /usr/lib/hadoop/lib/native/libhadoop.so.1.0.0 is not meant for a 64 bit underlying architecture. So I know for sure you are using 64 bit Linux under for your installation. ;)

There are two things you can do. Firstly, the more right approach is that yu can rebuild the library, but then that is long procedure.

What I did was the second and the easier way out. I re-installed it on a 32-bit Ubuntu and it worked fine for me.

Upvotes: 1

Related Questions