[Hadoop] problem record: hadoop startup error under root user: File/user/root/input/slaves cocould only be replicated to 0 nodes, in

Source: Internet
Author: User
Tags hadoop fs

A virtual machine was started on Shanda cloud. The default user is root. An error occurred while running hadoop:

[Error description]

Root @ snda:/data/soft/hadoop- # bin/hadoop FS-put conf Input
11/08/03 09:58:33 warn HDFS. dfsclient: datastreamer exception: Org. apache. hadoop. IPC. remoteException: Java. io. ioexception: File/user/root/input/slaves cocould only be replicated to 0 nodes, instead of 1


This error occurs when hadoop datanode is started.

Root @ snda:/data/soft/hadoop- #./bin/hadoop-daemon.sh start datanode
Starting datanode, logging to/data/soft/hadoop-
Unrecognized option:-JVM
Cocould not create the Java Virtual Machine.


Take a closer look.-The JVM parameter is displayed in Bin/hadoop.

Class = 'org. Apache. hadoop. HDFS. server. datanode. datanode'
If [[$ EUID-EQ 0]; then
Hadoop_opts = "$ hadoop_opts-JVM server $ hadoop_datanode_opts"
Hadoop_opts = "$ hadoop_opts-server $ hadoop_datanode_opts"

In the script, if it is EUID
= 0, that is to say, run the statement with-JVM as the root user; otherwise, the statement with-server is executed.

As to why-the JVM will say it is not recognized, it is not clear, but it can solve the problem:

1) modify the script and change the-JVM parameter to-server.

2) run it with a non-root account.

It's okay to use a non-root account for confirmation. The method for modifying the script is not sure if it will cause other problems.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.