1、启动kafka的脚本程序报如下所示的错误:

 [hadoop@slaver1 script_hadoop]$ kafka-start.sh
start kafkaServer...
[-- ::,] INFO Verifying properties (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property broker.id is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property log.cleaner.enable is overridden to false (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property log.dirs is overridden to /tmp/kafka-logs (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property log.retention.check.interval.ms is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property log.retention.hours is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property log.segment.bytes is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property num.io.threads is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property num.network.threads is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property num.partitions is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property port is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property socket.receive.buffer.bytes is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property socket.request.max.bytes is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property socket.send.buffer.bytes is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property zookeeper.connect is overridden to slaver1:,slaver2:,slaver3: (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property zookeeper.connection.timeout.ms is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO [Kafka Server ], starting (kafka.server.KafkaServer)
[-- ::,] INFO [Kafka Server ], Connecting to zookeeper on slaver1:,slaver2:,slaver3: (kafka.server.KafkaServer)
[-- ::,] INFO Starting ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
[-- ::,] INFO Client environment:zookeeper.version=3.3.-, built on // : GMT (org.apache.zookeeper.ZooKeeper)
[-- ::,] INFO Client environment:host.name=slaver1 (org.apache.zookeeper.ZooKeeper)
[-- ::,] INFO Client environment:java.version=1.7.0_79 (org.apache.zookeeper.ZooKeeper)
[-- ::,] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper)
[-- ::,] INFO Client environment:java.home=/home/hadoop/soft/jdk1..0_79/jre (org.apache.zookeeper.ZooKeeper)
[-- ::,] INFO Client environment:java.class.path=:/home/hadoop/soft/kafka_2.9.2-0.8./bin/../core/build/dependant-libs-2.8./*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../perf/build/libs//kafka-perf_2.8.0*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../clients/build/libs//kafka-clients*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../examples/build/libs//kafka-examples*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../contrib/hadoop-consumer/build/libs//kafka-hadoop-consumer*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../contrib/hadoop-producer/build/libs//kafka-hadoop-producer*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/jopt-simple-3.2.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/kafka_2.9.2-0.8.1.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/log4j-1.2.15.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/metrics-annotation-2.2.0.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/metrics-core-2.2.0.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/scala-library-2.9.2.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/slf4j-api-1.7.2.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/slf4j-nop-1.7.6.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/snappy-java-1.0.5.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/zkclient-0.3.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/zookeeper-3.3.4.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../core/build/libs/kafka_2.8.0*.jar (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:29:09,227] INFO Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:29:09,227] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:29:09,227] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:29:09,227] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:29:09,227] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:29:09,228] INFO Client environment:os.version=2.6.32-358.el6.x86_64 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:29:09,228] INFO Client environment:user.name=hadoop (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:29:09,228] INFO Client environment:user.home=/home/hadoop (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:29:09,228] INFO Client environment:user.dir=/home/hadoop (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:29:09,230] INFO Initiating client connection, connectString=slaver1:2181,slaver2:2181,slaver3:2181 sessionTimeout=6000 watcher=org.I0Itec.zkclient.ZkClient@458dd138 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:29:09,377] INFO Opening socket connection to server slaver1/192.168.19.131:2181 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:29:09,443] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1146)
[2018-05-22 09:29:10,410] INFO Opening socket connection to server slaver2/192.168.19.132:2181 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:29:10,415] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1146)
[2018-05-22 09:29:11,111] INFO Opening socket connection to server slaver3/192.168.19.133:2181 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:29:11,112] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1146)
[2018-05-22 09:29:13,211] INFO Opening socket connection to server slaver1/192.168.19.131:2181 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:29:13,212] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1146)
[2018-05-22 09:29:14,198] INFO Opening socket connection to server slaver2/192.168.19.132:2181 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:29:14,199] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1146)
[2018-05-22 09:29:14,981] INFO Opening socket connection to server slaver3/192.168.19.133:2181 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:29:14,982] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1146)
[2018-05-22 09:29:16,581] INFO Opening socket connection to server slaver1/192.168.19.131:2181 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:29:16,582] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1146)
[2018-05-22 09:29:16,891] INFO Opening socket connection to server slaver2/192.168.19.132:2181 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:29:16,893] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1146)
[2018-05-22 09:29:17,756] INFO Opening socket connection to server slaver3/192.168.19.133:2181 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:29:17,757] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1146)
^CKilled by signal 2.
^CKilled by signal 2.
^CKilled by signal 2.
[hadoop@slaver1 script_hadoop]$ ^C
[hadoop@slaver1 script_hadoop]$

2、根据错误分析,说zookeeper的问题,之前我没有启动zookeeper集群,所以先启动zookeeper集群,然后启动kafka解决问题;

WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn) java.net.ConnectException: Connection refused的更多相关文章

  1. 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) ...

  2. 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 ...

  3. hadoop mapreduce 写入hbase报错 Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect

    现象:map任务构造数据正常,reduce任务,开始也正常,速度很快 ,在hbase 的管理界面,可以看到,5W以上的请求数 当reduce 执行到 70% 左右的时候,就堵住了,查看yarn的web ...

  4. error: not found: value sqlContext/import sqlContext.implicits._/error: not found: value sqlContext /import sqlContext.sql/Caused by: java.net.ConnectException: Connection refused

    1.今天启动启动spark的spark-shell命令的时候报下面的错误,百度了很多,也没解决问题,最后想着是不是没有启动hadoop集群的问题 ,可是之前启动spark-shell命令是不用启动ha ...

  5. ERROR org.apache.zookeeper.ClientCnxn:532 - Error while calling watcher

    一.背景 使用zookeeper操作时提示这个错误信息 ERROR org.apache.zookeeper.ClientCnxn: - Error while calling watcher jav ...

  6. 运行SparkStreaming的NetworkWordCount实例出错:Error connecting to localhost:9999 java.net.ConnectException: Connection refused 解决办法

    一.背景 首先按照Spark的官方文档来运行此实例,具体方法参见这里,当运行命令$ nc -lk 9999开启端口后,再运行命令$ ./bin/run-example streaming.Networ ...

  7. 全网最详细的启动zkfc进程时,出现INFO zookeeper.ClientCnxn: Opening socket connection to server***/192.168.80.151:2181. Will not attempt to authenticate using SASL (unknown error)解决办法(图文详解)

    不多说,直接上干货! at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:) at org ...

  8. eclipse链接Hadoop集群时报错Error:Call From xxx/xxx.xxx.xxx.xxx to hostname1:9000 failed on connection exception

    今天用eclipse连接Hadoop集群的时候突然给我报了这样一个错误:Error:Call From xxx/xxx.xxx.xxx.xxx to hostname1:9000 failed on ...

  9. Jenkins [Error] at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:192)

    Deploying /root/.jenkins/workspace/zgg-crm-pre/target/crm.war to container Tomcat 7.x Remote with co ...

随机推荐

  1. shell-自动按省市建立文件夹,并在每个城市下创建当前日期文件夹

    Code: #!/bin/bash date=`date +%Y%m%d` ProName="广东市" CityName="广州市 汕尾市 阳江市 揭阳市 茂名市 江门市 ...

  2. Nand flash 三种类型SLC,MLC,TLC【转】

    转自:https://blog.csdn.net/fc34235/article/details/79584758 转载自:http://diy.pconline.com.cn/750/7501340 ...

  3. 网页块元素定位建议使用的xpath方式

    取上图的新手上路文字 使用xpath "//div[@class='pbm mbm bbda cl']//li[contains(string(),'用户组')]/span/a/text() ...

  4. DFS不怂之《leetcode-岛屿的个数》

    leetcode刷到这道题: 给定一个由 '1'(陆地)和 '0'(水)组成的的二维网格,计算岛屿的数量.一个岛被水包围,并且它是通过水平方向或垂直方向上相邻的陆地连接而成的.你可以假设网格的四个边均 ...

  5. FHQ Treap摘要

    原理 以随机数维护平衡,使树高期望为logn级别 不依靠旋转,只有两个核心操作merge(合并)和split(拆分) 因此可持久化 先介绍变量 ; int n; struct Node { int v ...

  6. RT-thread嵌入式操作系统相关的问题

    面试中问到 RT-thread嵌入式操作系统相关的问题 RT-thread操作系统调度器的实现细节 RT-Thread中提供的线程调度器是基于优先级的全抢占式调度: 在系统中除了中断处理函数.调度器上 ...

  7. URLConnection和HttpURLConnection

    URLConnection和HttpURLConnection使用的都是java.net中的类,属于标准的java接口. HttpURLConnection继承自URLConnection,差别在与H ...

  8. java 编程思想

    博主介绍了很多Java的基础知识,很适合初学者. http://blog.csdn.net/iaiti/article/details/38260599

  9. pwnable.kr simple login writeup

    这道题是pwnable.kr Rookiss部分的simple login,需要我们去覆盖程序的ebp,eip,esp去改变程序的执行流程   主要逻辑是输入一个字符串,base64解码后看是否与题目 ...

  10. 阿里云主机Nginx下配置NodeJS、Express和Forever

    https://cnodejs.org/topic/5059ce39fd37ea6b2f07e1a3 AngularJS中文社区即运行在阿里云主机上,本站使用Nginx引擎,为了AngularJS,我 ...