Hbase master启动报错:Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster Caused by: java.net.UnknownHostException:-阿里云开发者社区

开发者社区> 云栖-lxl> 正文

Hbase master启动报错:Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster Caused by: java.net.UnknownHostException:

简介: Hbase master启动报错: java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.
+关注继续查看

Hbase master启动报错:

java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster
        at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2893)
        at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:186)
        at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:135)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126)
        at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2907)
Caused by: java.net.UnknownHostException: nameservice
        at org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUtil.java:380)
        at org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:259)
        at org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:153)
        at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:547)
        at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:492)
        at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:139)
        at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2591)
        at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:89)
        at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2643)
        at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2625)
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:368)
        at org.apache.hadoop.fs.Path.getFileSystem(Path.java:296)
        at org.apache.hadoop.hbase.util.FSUtils.getRootDir(FSUtils.java:941)
        at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:537)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2888)
        ... 5 more

 报错原因是hbase找不到hdfs的nameservice。

解决方法,在hbase的启动CLASSPATH中加入hdfs的配置文件的路径,core-site.xml和hdfs-site.xml。

如果是在docker中启动,还需要将hdfs的配置文件的路径挂载出来:

mountPath: /var/log/hbase
hostPath: /var/log/hbase

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
解决Mac启动Eclipse Memory Analyzer报错问题
转载至https://www.jianshu.com/p/9bbbe3c4cc8b
5055 0
silverlight问题解决: 对话框必须由用户启动 SecurityException: Dialogs must be user-initiated
转自:http://www.dotblogs.com.tw/junegoat/archive/2010/10/07/securityexception-dialogs-must-be-user-initiated.
890 0
weblogic启动失败:Could not obtain the localhost address 解决办法
linux下weblogic启动如果出现这个错误,多半是hosts文件不对 1、先输入hostname,查看本机计算机名(比如:server123) 2、sudo vi /etc/hosts 编辑hosts文件,在最后加一行 127.
973 0
【tomcat】启动报错:Failed to initialize end point associated with ProtocolHandler ["http-apr-8080"] java.lang.Exception: Socket bind failed 和java.net.BindE
背景:【新手】 将开发机子上的Tomcat连同其中的项目,一起拷贝到服务器上,启动tomcat的start.bat,然后报错如下: 问题1: Failed to initialize end point associated with ProtocolHandler ["http-apr-8080"] java.
2778 0
【hibernate 报错】No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer 【get和load的区别】
报错: 1 HTTP Status 500 - Could not write content: No serializer found for class org.hibernate.proxy.
1034 0
HBase启动报错:ERROR: org.apache.hadoop.hbase.ipc.ServerNotRunningYetException: Server is not running yet
欢迎关注大数据和人工智能技术文章发布的微信公众号:清研学堂,在这里你可以学到夜白(作者笔名)精心整理的笔记,让我们每天进步一点点,让优秀成为一种习惯! 今天进入hbase shell中输入命令报错:ERROR: org.
4200 0
+关注
云栖-lxl
java程序员
319
文章
2
问答
文章排行榜
最热
最新
相关电子书
更多
《2021云上架构与运维峰会演讲合集》
立即下载
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载