【Bug记录】org.apache.hadoop.hdfs.server.namenode.SafeModeException

在启动Hadoop后,尽管所有进程正常,但执行Hive时出现错误。错误信息显示Namenode处于安全模式。为解决问题,需要关闭Namenode的安全模式。

情况的发生

启动hadoop,查看jps所有进程都是正常运行。
输入hive报错:


biglucky@ubuntu:/opt/hadoop-2.7.1/sbin$ hive
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/apache-hive-2.1.0-bin/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/biglucky/CDH/hbase/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/hadoop-2.7.1/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]

Logging initialized using configuration in file:/opt/apache-hive-2.1.0-bin/conf/hive-log4j2.properties Async: true
Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.SafeModeException): Cannot create directory /tmp/hive/biglucky/384faa47-51d4-4652-9ff8-74fd7027725d. Name node is in safe mode.
The reported blocks 709 has reached the threshold 0.9990 of total blocks 709. The number of live datanodes 1 has reached the minimum number 0. In safe mode extension. Safe mode will be turned off automatically in 8 seconds.
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkNameNodeSafeMode(FSNamesystem.java:1327)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:3899)
        at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs(NameNodeRpcServer.java:978)
        at org.apache
2025-03-12 19:29:47,693 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: registered UNIX signal handlers for [TERM, HUP, INT] 2025-03-12 19:29:47,748 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: createNameNode [] 2025-03-12 19:29:47,851 INFO org.apache.hadoop.metrics2.impl.MetricsConfig: Loaded properties from hadoop-metrics2.properties 2025-03-12 19:29:47,920 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Scheduled Metric snapshot period at 10 second(s). 2025-03-12 19:29:47,920 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: NameNode metrics system started 2025-03-12 19:29:47,931 INFO org.apache.hadoop.hdfs.server.namenode.NameNodeUtils: fs.defaultFS is hdfs://hadoop:8020 2025-03-12 19:29:47,931 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: Clients should use hadoop:8020 to access this namenode/service. 2025-03-12 19:29:48,049 INFO org.apache.hadoop.util.JvmPauseMonitor: Starting JVM pause monitor 2025-03-12 19:29:58,112 INFO org.apache.hadoop.hdfs.DFSUtil: Filter initializers set : org.apache.hadoop.http.lib.StaticUserWebFilter,org.apache.hadoop.hdfs.web.AuthFilterInitializer 2025-03-12 19:29:58,135 INFO org.apache.hadoop.hdfs.DFSUtil: Starting Web-server for hdfs at: http://node:9870 2025-03-12 19:29:58,163 INFO org.eclipse.jetty.util.log: Logging initialized @10871ms to org.eclipse.jetty.util.log.Slf4jLog 2025-03-12 19:29:58,372 WARN org.apache.hadoop.security.authentication.server.AuthenticationFilter: Unable to initialize FileSignerSecretProvider, falling back to use random secrets. Reason: Could not read signature secret file: /home/hadoop/hadoop-http-auth-signature-secret 2025-03-12 19:29:58,393 INFO org.apache.hadoop.http.HttpRequestLog: Http request log for http.requests.namenode is not defined 2025-03-12 19:29:58,400 INFO org.apache.hadoop.http.HttpServer2: Added global filter 'safety' (class=org.apache.hadoop.http.HttpServer2$QuotingInputFilter) 2025-03-12 19:29:58,404 INFO org.apache.hadoop.http.HttpServer2: Added
03-14
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值