现象:map任务构造数据正常,reduce任务,开始也正常,速度很快 ,在hbase 的管理界面,可以看到,5W以上的请求数

当reduce 执行到 70% 左右的时候,就堵住了,查看yarn的web界面,可以找到如下报错信息。

不会尝试使用SASL认证。

连接被拒绝。

错误原因,找不到zookeeper 的master。

最开始的时候,配置是这样注入的:

conf.set("hbase.zookeeper.quorum","hostname01,hostname02,hostname03");//ZKFC
conf.set("hbase.master", "ip:port");
conf.set("hbase.zookeeper.property.clientPort", "2181");

然后我觉得代码可以精简一下,就变成这样了

conf.set("hbase.zookeeper.quorum","hostname01,hostname02,hostname03");//ZKFC
conf.set("hbase.zookeeper.property.clientPort", "2181");

zookeeper master 不配,也不会报错,可以正常执行,查询使用 “hbase.zookeeper.quorum”“hbase.zookeeper.property.clientPort”,这两个配置就行。

so

就把“hbase.master”配置去掉了。too young to simple

然后就挂了。。

报错信息:

2017-12-04 13:23:42,042 INFO [main-SendThread(localhost:2181)] org.apache.zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2017-12-04 13:23:42,043 WARN [main-SendThread(localhost:2181)] org.apache.zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2017-12-04 13:23:50,953 ERROR [main] org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 4 attempts
2017-12-04 13:23:50,954 WARN [main] org.apache.hadoop.hbase.zookeeper.ZKUtil: hconnection-0x58c34bb30x0, quorum=localhost:2181, baseZNode=/hbase Unable to set watcher on znode (/hbase/hbaseid)
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1045)
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:221)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:419)
at org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:65)
at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:105)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.retrieveClusterId(ConnectionManager.java:905)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.<init>(ConnectionManager.java:648)
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:422)
at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:238)
at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:218)
at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:119)
at org.apache.hadoop.hbase.mapreduce.TableOutputFormat$TableRecordWriter.<init>(TableOutputFormat.java:106)
at org.apache.hadoop.hbase.mapreduce.TableOutputFormat.getRecordWriter(TableOutputFormat.java:153)
at org.apache.hadoop.mapred.ReduceTask$NewTrackingRecordWriter.<init>(ReduceTask.java:541)
at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:614)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:389)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
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:1657)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)

hadoop mapreduce 写入hbase报错 Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect的更多相关文章

  1. Linux下启动tomcat报错,WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect java.net.ConnectException:

    tomcat启动完了之后,一直不停的打印这种错误信息,看表面上,应该是zk节点下的数据是空的,连接不上服务,所以一直在尝试连接,然后一直又连不上: 完整的错误信息: 407662 [usf-ZooKe ...

  2. WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)

    [2017-05-19 13:32:14,933] INFO Waiting for keeper state SyncConnected (org.I0Itec.zkclient.ZkClient) ...

  3. WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn) java.net.ConnectException: Connection refused

    1.启动kafka的脚本程序报如下所示的错误: [hadoop@slaver1 script_hadoop]$ kafka-start.sh start kafkaServer... [-- ::,] ...

  4. 安装BI Publisher Desktop报错:“Template Builder Installer Failed:Unexpected Error”

    原因:office的版本未安装正确,应该安装X86版本的,如果是X64的会出现,重新安装X86版本的office后解决问题.

  5. Eclipse连接HBase 报错:org.apache.hadoop.hbase.PleaseHoldException: Master is initializing

    在eclipse中连接到HBase报错org.apache.hadoop.hbase.PleaseHoldException: Master is initializing,搜索了好久,网上其它人说的 ...

  6. mysql 报错 session halted的解决办法,实际工作中的结论。

    写后台程序,发现执行到sql语句时就报错session halted,如下图: 也上网搜过蛮多方法,都不能解决我的问题.后来自己发现了症结所在,其实很简单:执行insert的语句没有包含not nul ...

  7. 写入MySQL报错超出 max_allowed_packet 的问题

    写入MySQL报错超出 max_allowed_packet 的问题. MySQL会根据配置文件会限制server接受的数据包的大小.如果写入大数据时,因为默认的配置太小,插入和更新操作会因为 max ...

  8. Win7 64bit 安装VisualSVN出现报错:Servic 'VisualSVN Server' failed to start.解决办法

    问题描述: Win7 64bit 安装VisualSVN时出现报错: Servic 'VisualSVN Server' failed to start.Please check VisualSVN ...

  9. MYSQL导入数据报错|MYSQL导入超大文件报错|MYSQL导入大数据库报错:2006 - MySQL server has gone away

    导SQL数据库结构+数据时,如果数据是批量插入的话会报错:2006 - MySQL server has gone away. 解决办法:找到你的mysql目录下的my.ini配置文件(如果安装目录没 ...

随机推荐

  1. c++ - Linking problems due to symbols with abi::cxx11?

    看错误内容: /data/projects/LipReadingSDKGPU/lib/cwlibs/libLipReading.so: undefined reference to `tensorfl ...

  2. CentOS 6 UNEXPECTED INCONSISTENCY RUN fsck MANUALLY

    1:按Control-D,系统自动重启: 2:直接输入root的密码进入命令行 3:看网上的介绍需要输入mount |grep “on/” 找到root的分区,我试过后无效 4:直接输入fsck -y ...

  3. Codeforces Beta Round #70 (Div. 2)

    Codeforces Beta Round #70 (Div. 2) http://codeforces.com/contest/78 A #include<bits/stdc++.h> ...

  4. Android模拟器故障:waiting for target deviceto come online

    关闭再打开模拟器.删除再新建模拟器均无效. 解决办法:在AVD Manager中,选择立即冷启动(Cold Boot Now)模拟器.

  5. C语言之栈区、堆区

    一 局部变量存放在栈区中,函数调用结束后释放内存空间. #include "stdio.h"; #include "stdlib.h"; int *getNum ...

  6. f5故障排除

    1.硬件问题 1)硬盘:查看/var/log/daemon, kern日志,smartctl测试,EUD 2)PSU: 查看LCD报警,/var/log/ltm,EUD等 3)内存:可能导致设备突然重 ...

  7. ubuntu系列-安装google浏览器

    转载:http://www.linuxidc.com/Linux/2013-10/91857.htm 对于刚刚开始使用Ubuntu并想安装谷歌Chrome浏览器的新用户来说,本文所介绍的方法是最快捷的 ...

  8. python函数的万能参数

    我们通过一个简单的事例来展示一下函数的万能参数,我们先写一个最简单的函数 def test(*args,**kwargs): print(args,kwargs) 然后定义两个变量 l = [1,2, ...

  9. java获取电脑部分信息

    获取mac地址与cpu序列号 参考博客:https://www.jb51.net/article/94793.htm 另一篇参考地址没记录下来 package util; import java.io ...

  10. JAVA EXAM2 复习提纲

    [真假分数相加] //inheritence, extends, use this & super 子类的方法 //two constructors, non-default use 'thi ...