Eu estava faltando apenas para executar este comando como root. É por isso que eu estava recebendo esse erro. Agora funciona bem após prefixar sudo
antes do comando, ou seja:
sudo /usr/local/hadoop-1.2.1/bin/start-all.sh
Eu sou novo no Hadoop e estava passando pelo processo de instalação mencionado aqui . Eu instalei hadoop-1.2.1
no meu sistema. Depois de configurar tudo quando tentei iniciar um cluster de nó único, recebi o seguinte erro:
$ /usr/local/hadoop-1.2.1/bin/start-all.sh
mkdir: cannot create directory ‘/usr/local/hadoop-1.2.1/libexec/../logs’: Permission denied
chown: cannot access ‘/usr/local/hadoop-1.2.1/libexec/../logs’: No such file or directory
starting namenode, logging to /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-namenode-asad-HP-15-Notebook-PC.out
/usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 137: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-namenode-asad-HP-15-Notebook-PC.out: No such file or directory
head: cannot open ‘/usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-namenode-asad-HP-15-Notebook-PC.out’ for reading: No such file or directory
/usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 147: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-namenode-asad-HP-15-Notebook-PC.out: No such file or directory
/usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 148: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-namenode-asad-HP-15-Notebook-PC.out: No such file or directory
localhost: mkdir: cannot create directory ‘/usr/local/hadoop-1.2.1/libexec/../logs’: Permission denied
localhost: chown: cannot access ‘/usr/local/hadoop-1.2.1/libexec/../logs’: No such file or directory
localhost: starting datanode, logging to /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-datanode-asad-HP-15-Notebook-PC.out
localhost: /usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 137: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-datanode-asad-HP-15-Notebook-PC.out: No such file or directory
localhost: head: cannot open ‘/usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-datanode-asad-HP-15-Notebook-PC.out’ for reading: No such file or directory
localhost: /usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 147: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-datanode-asad-HP-15-Notebook-PC.out: No such file or directory
localhost: /usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 148: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-datanode-asad-HP-15-Notebook-PC.out: No such file or directory
localhost: mkdir: cannot create directory ‘/usr/local/hadoop-1.2.1/libexec/../logs’: Permission denied
localhost: chown: cannot access ‘/usr/local/hadoop-1.2.1/libexec/../logs’: No such file or directory
localhost: starting secondarynamenode, logging to /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-secondarynamenode-asad-HP-15-Notebook-PC.out
localhost: /usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 137: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-secondarynamenode-asad-HP-15-Notebook-PC.out: No such file or directory
localhost: head: cannot open ‘/usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-secondarynamenode-asad-HP-15-Notebook-PC.out’ for reading: No such file or directory
localhost: /usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 147: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-secondarynamenode-asad-HP-15-Notebook-PC.out: No such file or directory
localhost: /usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 148: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-secondarynamenode-asad-HP-15-Notebook-PC.out: No such file or directory
mkdir: cannot create directory ‘/usr/local/hadoop-1.2.1/libexec/../logs’: Permission denied
chown: cannot access ‘/usr/local/hadoop-1.2.1/libexec/../logs’: No such file or directory
starting jobtracker, logging to /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-jobtracker-asad-HP-15-Notebook-PC.out
/usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 137: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-jobtracker-asad-HP-15-Notebook-PC.out: No such file or directory
head: cannot open ‘/usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-jobtracker-asad-HP-15-Notebook-PC.out’ for reading: No such file or directory
/usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 147: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-jobtracker-asad-HP-15-Notebook-PC.out: No such file or directory
/usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 148: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-jobtracker-asad-HP-15-Notebook-PC.out: No such file or directory
localhost: mkdir: cannot create directory ‘/usr/local/hadoop-1.2.1/libexec/../logs’: Permission denied
localhost: chown: cannot access ‘/usr/local/hadoop-1.2.1/libexec/../logs’: No such file or directory
localhost: starting tasktracker, logging to /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-tasktracker-asad-HP-15-Notebook-PC.out
localhost: /usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 137: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-tasktracker-asad-HP-15-Notebook-PC.out: No such file or directory
localhost: head: cannot open ‘/usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-tasktracker-asad-HP-15-Notebook-PC.out’ for reading: No such file or directory
localhost: /usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 147: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-tasktracker-asad-HP-15-Notebook-PC.out: No such file or directory
localhost: /usr/local/hadoop-1.2.1/bin/hadoop-daemon.sh: line 148: /usr/local/hadoop-1.2.1/libexec/../logs/hadoop-hduser-tasktracker-asad-HP-15-Notebook-PC.out: No such file or directory
Eu estava faltando apenas para executar este comando como root. É por isso que eu estava recebendo esse erro. Agora funciona bem após prefixar sudo
antes do comando, ou seja:
sudo /usr/local/hadoop-1.2.1/bin/start-all.sh