Org.apache.hadoop.hdfs.server.namenode.SafeModeException:Cannot Create Directory

Source: Internet
Author: User

How to resolve:

HDFs dfsadmin-safemode leave off Safe mode

The error is as follows:

Logging initialized using configuration in jar:file:/opt/modules/apache-hive-3.0.0-bin/lib/hive-common-3.0.0.jar!/ Hive-log4j2.properties Async:true
Exception in thread "main" java.lang.RuntimeException:org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create Directory/tmp/hive/hadoop/79c2c5de-a626-48fc-ad1a-b7a38201cf35. Name node is in safe mode.
Resources is low on NN. Please add or free to more resourcesthen turn off Safe mode manually. Note:if you turn off Safe mode before adding resources, the NN would immediately return to safe mode. Use "HDFs dfsadmin-safemode leave" To turn safe mode off. Namenodehostname:sherry-virtual-machine
At Org.apache.hadoop.hdfs.server.namenode.FSNamesystem.newSafemodeException (fsnamesystem.java:1450)
At Org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkNameNodeSafeMode (fsnamesystem.java:1437)
At Org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs (fsnamesystem.java:3131)
At Org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs (namenoderpcserver.java:1126)
At Org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.mkdirs ( clientnamenodeprotocolserversidetranslatorpb.java:705)
At org.apache.hadoop.hdfs.protocol.proto.clientnamenodeprotocolprotos$clientnamenodeprotocol$2. Callblockingmethod (Clientnamenodeprotocolprotos.java)
At Org.apache.hadoop.ipc.protobufrpcengine$server$protobufrpcinvoker.call (protobufrpcengine.java:523)
At Org.apache.hadoop.ipc.rpc$server.call (rpc.java:991)
At Org.apache.hadoop.ipc.server$rpccall.run (server.java:869)
At Org.apache.hadoop.ipc.server$rpccall.run (server.java:815)
At java.security.AccessController.doPrivileged (Native Method)
At Javax.security.auth.Subject.doAs (subject.java:422)
At Org.apache.hadoop.security.UserGroupInformation.doAs (usergroupinformation.java:1682)
At Org.apache.hadoop.ipc.server$handler.run (server.java:2675)

At Org.apache.hadoop.hive.ql.session.SessionState.start (sessionstate.java:644)
At Org.apache.hadoop.hive.ql.session.SessionState.beginStart (sessionstate.java:585)
At Org.apache.hadoop.hive.cli.CliDriver.run (clidriver.java:747)
At Org.apache.hadoop.hive.cli.CliDriver.main (clidriver.java:683)
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:62)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:43)
At Java.lang.reflect.Method.invoke (method.java:498)
At Org.apache.hadoop.util.RunJar.run (runjar.java:308)
At Org.apache.hadoop.util.RunJar.main (runjar.java:222)
caused By:org.apache.hadoop.hdfs.server.namenode.SafeModeException:Cannot Create directory/tmp/hive/hadoop/ 79c2c5de-a626-48fc-ad1a-b7a38201cf35. Name node is in safe mode.
Resources is low on NN. Please add or free to more resourcesthen turn off Safe mode manually. Note:if you turn off Safe mode before adding resources, the NN would immediately return to safe mode. Use "HDFs dfsadmin-safemode leave" To turn safe mode off. Namenodehostname:sherry-virtual-machine
At Org.apache.hadoop.hdfs.server.namenode.FSNamesystem.newSafemodeException (fsnamesystem.java:1450)
At Org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkNameNodeSafeMode (fsnamesystem.java:1437)
At Org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs (fsnamesystem.java:3131)
At Org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs (namenoderpcserver.java:1126)
At Org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.mkdirs ( clientnamenodeprotocolserversidetranslatorpb.java:705)
At org.apache.hadoop.hdfs.protocol.proto.clientnamenodeprotocolprotos$clientnamenodeprotocol$2. Callblockingmethod (Clientnamenodeprotocolprotos.java)
At Org.apache.hadoop.ipc.protobufrpcengine$server$protobufrpcinvoker.call (protobufrpcengine.java:523)
At Org.apache.hadoop.ipc.rpc$server.call (rpc.java:991)
At Org.apache.hadoop.ipc.server$rpccall.run (server.java:869)
At Org.apache.hadoop.ipc.server$rpccall.run (server.java:815)
At java.security.AccessController.doPrivileged (Native Method)
At Javax.security.auth.Subject.doAs (subject.java:422)
At Org.apache.hadoop.security.UserGroupInformation.doAs (usergroupinformation.java:1682)
At Org.apache.hadoop.ipc.server$handler.run (server.java:2675)

At Sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
At Sun.reflect.NativeConstructorAccessorImpl.newInstance (nativeconstructoraccessorimpl.java:62)
At Sun.reflect.DelegatingConstructorAccessorImpl.newInstance (delegatingconstructoraccessorimpl.java:45)
At Java.lang.reflect.Constructor.newInstance (constructor.java:423)
At Org.apache.hadoop.ipc.RemoteException.instantiateException (remoteexception.java:121)
At Org.apache.hadoop.ipc.RemoteException.unwrapRemoteException (remoteexception.java:88)
At Org.apache.hadoop.hdfs.DFSClient.primitiveMkdir (dfsclient.java:2373)
At Org.apache.hadoop.hdfs.DFSClient.mkdirs (dfsclient.java:2347)
At Org.apache.hadoop.hdfs.distributedfilesystem$27.docall (distributedfilesystem.java:1321)
At Org.apache.hadoop.hdfs.distributedfilesystem$27.docall (distributedfilesystem.java:1318)
At Org.apache.hadoop.fs.FileSystemLinkResolver.resolve (filesystemlinkresolver.java:81)
At Org.apache.hadoop.hdfs.DistributedFileSystem.mkdirsInternal (distributedfilesystem.java:1335)
At Org.apache.hadoop.hdfs.DistributedFileSystem.mkdirs (distributedfilesystem.java:1310)
At Org.apache.hadoop.hive.ql.session.SessionState.createPath (sessionstate.java:779)
At Org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs (sessionstate.java:714)
At Org.apache.hadoop.hive.ql.session.SessionState.start (sessionstate.java:620)
... 9 more
caused By:org.apache.hadoop.ipc.RemoteException (org.apache.hadoop.hdfs.server.namenode.SafeModeException): Cannot create Directory/tmp/hive/hadoop/79c2c5de-a626-48fc-ad1a-b7a38201cf35. Name node is in safe mode.
Resources is low on NN. Please add or free to more resourcesthen turn off Safe mode manually. Note:if you turn off Safe mode before adding resources, the NN would immediately return to safe mode. Use "HDFs dfsadmin-safemode leave" To turn safe mode off. Namenodehostname:sherry-virtual-machine
At Org.apache.hadoop.hdfs.server.namenode.FSNamesystem.newSafemodeException (fsnamesystem.java:1450)
At Org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkNameNodeSafeMode (fsnamesystem.java:1437)
At Org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs (fsnamesystem.java:3131)
At Org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs (namenoderpcserver.java:1126)
At Org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.mkdirs ( clientnamenodeprotocolserversidetranslatorpb.java:705)
At org.apache.hadoop.hdfs.protocol.proto.clientnamenodeprotocolprotos$clientnamenodeprotocol$2. Callblockingmethod (Clientnamenodeprotocolprotos.java)
At Org.apache.hadoop.ipc.protobufrpcengine$server$protobufrpcinvoker.call (protobufrpcengine.java:523)
At Org.apache.hadoop.ipc.rpc$server.call (rpc.java:991)
At Org.apache.hadoop.ipc.server$rpccall.run (server.java:869)
At Org.apache.hadoop.ipc.server$rpccall.run (server.java:815)
At java.security.AccessController.doPrivileged (Native Method)
At Javax.security.auth.Subject.doAs (subject.java:422)
At Org.apache.hadoop.security.UserGroupInformation.doAs (usergroupinformation.java:1682)
At Org.apache.hadoop.ipc.server$handler.run (server.java:2675)

At Org.apache.hadoop.ipc.Client.getRpcResponse (client.java:1491)
At Org.apache.hadoop.ipc.Client.call (client.java:1437)
At Org.apache.hadoop.ipc.Client.call (client.java:1347)
At Org.apache.hadoop.ipc.protobufrpcengine$invoker.invoke (protobufrpcengine.java:228)
At Org.apache.hadoop.ipc.protobufrpcengine$invoker.invoke (protobufrpcengine.java:116)
At Com.sun.proxy. $Proxy 29.mkdirs (Unknown Source)
At Org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.mkdirs ( clientnamenodeprotocoltranslatorpb.java:647)
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:62)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:43)
At Java.lang.reflect.Method.invoke (method.java:498)
At Org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod (retryinvocationhandler.java:422)
At Org.apache.hadoop.io.retry.retryinvocationhandler$call.invokemethod (retryinvocationhandler.java:165)
At Org.apache.hadoop.io.retry.retryinvocationhandler$call.invoke (retryinvocationhandler.java:157)
At Org.apache.hadoop.io.retry.retryinvocationhandler$call.invokeonce (retryinvocationhandler.java:95)
At Org.apache.hadoop.io.retry.RetryInvocationHandler.invoke (retryinvocationhandler.java:359)
At Com.sun.proxy. $Proxy 30.mkdirs (Unknown Source)
At Org.apache.hadoop.hdfs.DFSClient.primitiveMkdir (dfsclient.java:2371)
... More

Org.apache.hadoop.hdfs.server.namenode.SafeModeException:Cannot Create Directory

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.