Hadoop installation Issue:

て烟熏妆下的殇ゞ 提交于 2019-12-11 02:37:17

问题


I followed this tutorial for installation of Hadoop. Unfortunately, when I run the start-all.sh script - The following error was printed on console:

hduser@dennis-HP:/usr/local/hadoop/sbin$ start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
hadoop config script is run...
hdfs script is run...
Config parameter : 
16/04/10 23:45:40 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [localhost]
localhost: mkdir: cannot create directory ‘/usr/local/hadoop/logs’: Permission denied
localhost: chown: cannot access ‘/usr/local/hadoop/logs’: No such file or directory
localhost: starting namenode, logging to /usr/local/hadoop/logs/hadoop-hduser-namenode-dennis-HP.out
localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 159: /usr/local/hadoop/logs/hadoop-hduser-namenode-dennis-HP.out: No such file or directory
localhost: head: cannot open ‘/usr/local/hadoop/logs/hadoop-hduser-namenode-dennis-HP.out’ for reading: No such file or directory
localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 177: /usr/local/hadoop/logs/hadoop-hduser-namenode-dennis-HP.out: No such file or directory
localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 178: /usr/local/hadoop/logs/hadoop-hduser-namenode-dennis-HP.out: No such file or directory
localhost: mkdir: cannot create directory ‘/usr/local/hadoop/logs’: Permission denied
localhost: chown: cannot access ‘/usr/local/hadoop/logs’: No such file or directory
localhost: starting datanode, logging to /usr/local/hadoop/logs/hadoop-hduser-datanode-dennis-HP.out
localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 159: /usr/local/hadoop/logs/hadoop-hduser-datanode-dennis-HP.out: No such file or directory
localhost: head: cannot open ‘/usr/local/hadoop/logs/hadoop-hduser-datanode-dennis-HP.out’ for reading: No such file or directory
localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 177: /usr/local/hadoop/logs/hadoop-hduser-datanode-dennis-HP.out: No such file or directory
localhost: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 178: /usr/local/hadoop/logs/hadoop-hduser-datanode-dennis-HP.out: No such file or directory
Starting secondary namenodes [0.0.0.0]
0.0.0.0: mkdir: cannot create directory ‘/usr/local/hadoop/logs’: Permission denied
0.0.0.0: chown: cannot access ‘/usr/local/hadoop/logs’: No such file or directory
0.0.0.0: starting secondarynamenode, logging to /usr/local/hadoop/logs/hadoop-hduser-secondarynamenode-dennis-HP.out
0.0.0.0: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 159: /usr/local/hadoop/logs/hadoop-hduser-secondarynamenode-dennis-HP.out: No such file or directory
0.0.0.0: head: cannot open ‘/usr/local/hadoop/logs/hadoop-hduser-secondarynamenode-dennis-HP.out’ for reading: No such file or directory
0.0.0.0: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 177: /usr/local/hadoop/logs/hadoop-hduser-secondarynamenode-dennis-HP.out: No such file or directory
0.0.0.0: /usr/local/hadoop/sbin/hadoop-daemon.sh: line 178: /usr/local/hadoop/logs/hadoop-hduser-secondarynamenode-dennis-HP.out: No such file or directory
16/04/10 23:45:55 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
yarn script is run...
starting yarn daemons
mkdir: cannot create directory ‘/usr/local/hadoop/logs’: Permission denied
chown: cannot access ‘/usr/local/hadoop/logs’: No such file or directory
starting resourcemanager, logging to /usr/local/hadoop/logs/yarn-hduser-resourcemanager-dennis-HP.out
/usr/local/hadoop/sbin/yarn-daemon.sh: line 124: /usr/local/hadoop/logs/yarn-hduser-resourcemanager-dennis-HP.out: No such file or directory
head: cannot open ‘/usr/local/hadoop/logs/yarn-hduser-resourcemanager-dennis-HP.out’ for reading: No such file or directory
/usr/local/hadoop/sbin/yarn-daemon.sh: line 129: /usr/local/hadoop/logs/yarn-hduser-resourcemanager-dennis-HP.out: No such file or directory
/usr/local/hadoop/sbin/yarn-daemon.sh: line 130: /usr/local/hadoop/logs/yarn-hduser-resourcemanager-dennis-HP.out: No such file or directory
localhost: mkdir: cannot create directory ‘/usr/local/hadoop/logs’: Permission denied
localhost: chown: cannot access ‘/usr/local/hadoop/logs’: No such file or directory
localhost: starting nodemanager, logging to /usr/local/hadoop/logs/yarn-hduser-nodemanager-dennis-HP.out
localhost: /usr/local/hadoop/sbin/yarn-daemon.sh: line 124: /usr/local/hadoop/logs/yarn-hduser-nodemanager-dennis-HP.out: No such file or directory
localhost: head: cannot open ‘/usr/local/hadoop/logs/yarn-hduser-nodemanager-dennis-HP.out’ for reading: No such file or directory
localhost: /usr/local/hadoop/sbin/yarn-daemon.sh: line 129: /usr/local/hadoop/logs/yarn-hduser-nodemanager-dennis-HP.out: No such file or directory
localhost: /usr/local/hadoop/sbin/yarn-daemon.sh: line 130: /usr/local/hadoop/logs/yarn-hduser-nodemanager-dennis-HP.out: No such file or directory

And when I executed the JPS command, the following error was thrown

hduser@dennis-HP:/usr/local/hadoop/sbin$ jps
3802 Jps

I am new to hadoop so please point me to an article that will help me to install hadoop without issues

Or if possible (and more preferable) to resolve the issue faced, please let me know what went wrong and how to fix it?


回答1:


Your current user has limited permissions to /usr/local/hadoop. Try changing permissions.

sudo chmod 777 -R /usr/local/hadoop/




回答2:


Please check permission are properly set on the folder using commands chmod or chown.

Hadoop provides individual nodes to start and stop services viz., Hadoop-daemon.sh start [Node]

Similarly there are scripts to start/stop yarn. Below post has step by stem details Install Apache Hadoop http://www.hadoopstrata.com/staticpost?postNbr=7




回答3:


Check /usr/local/hadoop/logs permissions . If it is not under hduser change the ownership.

sudo chown -R username:group directory




回答4:


Quite honestly I do not know why I got that error.. but I removed my entire installation using the instructions provided in askUbuntu and re-installed it by using the installation method described in the official site - HERE

But you were right @Krishna, the logs were created automatically after installation. My guess is that the installation that I used earlier had configuration details that were outdated and in all likeliness messed with the installation of Hadoop




回答5:


have you tried start-dfs.sh try the following commands and see whats the response

hdfs namenode -format
start-dfs.sh
start-yarn.sh


来源:https://stackoverflow.com/questions/36533748/hadoop-installation-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!