Skip to content
This repository has been archived by the owner on May 21, 2018. It is now read-only.

localhost: Error: JAVA_HOME is not set and could not be found. #274

Open
nitinmax10 opened this issue May 16, 2017 · 1 comment
Open

localhost: Error: JAVA_HOME is not set and could not be found. #274

nitinmax10 opened this issue May 16, 2017 · 1 comment

Comments

@nitinmax10
Copy link

I am using hadoop-2.7.3 and I have set JAVA_HOME path in .bashrc file and I have also exported the same in hadoop-env.sh file and I did not make any changes in that file except adding the line at the ecnd:
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
Following is the error stack:

nitin@mee:~/Software/hadoop-2.7.3/sbin$ start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
17/05/16 16:03:07 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [localhost]
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
localhost: /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' localhost: /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
localhost: Error: JAVA_HOME is not set and could not be found.
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
localhost: /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' localhost: /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
localhost: Error: JAVA_HOME is not set and could not be found.
Starting secondary namenodes [0.0.0.0]
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
0.0.0.0: /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' 0.0.0.0: /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
0.0.0.0: Error: JAVA_HOME is not set and could not be found.
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
17/05/16 16:03:11 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
starting yarn daemons
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
starting resourcemanager, logging to /home/nitin/Software/hadoop-2.7.3/logs/yarn-nitin-resourcemanager-Clavax-PC-48.out
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
/home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
localhost: /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: syntax error near unexpected token (' localhost: /home/nitin/Software/hadoop-2.7.3/etc/hadoop/hadoop-env.sh: line 1: # Licensed to the Apache Software Foundation (ASF) under one'
localhost: Error: JAVA_HOME is not set and could not be found.

Previously this conf was working fine for hadoop-2.8.0. But now I am getting error.

@triclambert
Copy link

This repo is deprecated. It will be archived on December 1, 2017.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants