Results 1 to 2 of 2

Thread: Getting Java error while trying to run Hadoop

  1. #1
    Join Date
    Oct 2021
    Beans
    1

    Getting Java error while trying to run Hadoop

    Hello,

    I'm trying to install Hadoop (3.2.1) on my Ubuntu VM and I've been following the instructions here: How to Install Hadoop with Step by Step Configuration on Linux Ubuntu (guru99.com)

    I think I'm nearly finished, but when I try to run Hadoop with the command $HADOOP_HOME/sbin/start-dfs.sh, I get this error:



    I have verified that Java is installed and that the path is set through these commands:



    I have set the path in /etc/profile:



    I set the path in the ~/.bashrc file:



    And I changed the JAVA_HOME variable in $HADOOP_HOME/etc/hadoop/hadoop-env.sh to this:



    I'm not sure what I'm doing wrong.

    Any help would be greatly appreciated.

  2. #2
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Getting Java error while trying to run Hadoop

    To see where things are on that machine, do like I have done on mine...
    Code:
    mafoelffen@ubuntu$ echo $JAVA_HOME
    /usr/lib/jvm/default-java
    mafoelffen@ubuntu$ which java
    /usr/bin/java
    mafoelffen@ubuntu$ ls /usr/lib/jvm/default-java
    bin  conf  docs  include  jmods  legal  lib  man  release
    Now I have multiple accounts set up on my machines for me to use with varied permissions, so I set mine up for all users (even though I am the sole user, which many accounts)... So I set it in /etc/profile :
    Code:
    export JAVA_HOME="/usr/lib/jvm/default-java" 
    export PATH=$JAVA_HOME/bin:$PATH
    I do it to "default-java", so that, if somewhere down the road, the version of java is changed or updated, then the pointers are still there, and I don't have to update the variable $JAVA_HOME...
    Last edited by MAFoElffen; October 16th, 2021 at 10:53 PM.

    Concurrent coexistance of Windows, Linux and UNIX...
    Ubuntu user # 33563, Linux user # 533637
    Sticky: [all variants] Graphics Resolution- Upgrade /Blank Screen after reboot
    UbuntuForums system-info Script

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •