Hadoop reports Name node is in safe mode Error

Source: Internet
Author: User
When running a hadoop program, the following error is reported:
Org. apache. hadoop. dfs. SafeModeException: Cannot delete/user/hadoop/input. Name node is in safe mode
This error should be common (at least I did this when running)

Let's analyze this error and understand it literally:
Name node is in safe mode

It indicates that Hadoop's NameNode is in safe mode.
So what is the Hadoop security mode?
When the Distributed File System is started, there will be security mode at the beginning. When the Distributed File System is in security mode, the content in the file system cannot be modified or deleted, until the Security Mode ends. The security mode is mainly used to check the validity of data blocks on each DataNode when the system starts, and to copy or delete some data blocks as required by the policy. You can also enter security mode through commands during runtime. In practice, when the system starts, an error message indicating that the file cannot be modified in security mode is displayed when you modify or delete the file. You only need to wait for a while.

Now we know that we need to solve this problem. I want to keep Hadoop in safe mode. Can I solve it without waiting?
The answer is yes, as long as you enter the following in the Hadoop directory:
Bin/hadoop dfsadmin-safemode leave

That is to say, disable the Hadoop security mode and solve the problem.

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.