开发者社区> 问答> 正文

kafka连接不上

环境信息

canal version 1.1.1 mysql version 5.5 kafka version 2.13_1.1.1

问题描述

kafka总是提示是连接不上,请问是为啥???

期待结果

2018-12-11 21:37:32.154 [kafka-producer-network-thread | producer-1] DEBUG org.apache.kafka.common.network.Selector - [Producer clientId=producer-1] Connection with localhost/127.0.0.1 disconnected java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_74] at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_74] at org.apache.kafka.common.network.PlaintextTransportLayer.finishConnect(PlaintextTransportLayer.java:50) ~[kafka-clients-1.1.1.jar:na] at org.apache.kafka.common.network.KafkaChannel.finishConnect(KafkaChannel.java:106) ~[kafka-clients-1.1.1.jar:na] at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:470) [kafka-clients-1.1.1.jar:na] at org.apache.kafka.common.network.Selector.poll(Selector.java:424) [kafka-clients-1.1.1.jar:na] at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:460) [kafka-clients-1.1.1.jar:na] at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:239) [kafka-clients-1.1.1.jar:na] at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:163) [kafka-clients-1.1.1.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74] 2018-12-11 21:37:32.154 [kafka-producer-network-thread | producer-1] DEBUG org.apache.kafka.common.network.Selector - [Producer clientId=producer-1] Connection with localhost/127.0.0.1 disconnected java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_74] at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_74] at org.apache.kafka.common.network.PlaintextTransportLayer.finishConnect(PlaintextTransportLayer.java:50) ~[kafka-clients-1.1.1.jar:na] at org.apache.kafka.common.network.KafkaChannel.finishConnect(KafkaChannel.java:106) ~[kafka-clients-1.1.1.jar:na] at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:470) [kafka-clients-1.1.1.jar:na] at org.apache.kafka.common.network.Selector.poll(Selector.java:424) [kafka-clients-1.1.1.jar:na] at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:460) [kafka-clients-1.1.1.jar:na] at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:239) [kafka-clients-1.1.1.jar:na] at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:163) [kafka-clients-1.1.1.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74] 2018-12-11 21:37:32.154 [kafka-producer-network-thread | producer-1] DEBUG org.apache.kafka.clients.NetworkClient - [Producer clientId=producer-1] Node -1 disconnected. 2018-12-11 21:37:32.154 [kafka-producer-network-thread | producer-1] DEBUG org.apache.kafka.clients.NetworkClient - [Producer clientId=producer-1] Node -1 disconnected. 2018-12-11 21:37:32.154 [kafka-producer-network-thread | producer-1] WARN org.apache.kafka.clients.NetworkClient - [Producer clientId=producer-1] Con

原提问者GitHub用户yysen919

展开
收起
古拉古拉 2023-05-08 16:55:52 121 0
1 条回答
写回答
取消 提交回答
  • 查一查防火墙配置吧,然后看一看kafka实例机器的netstat

    原回答者GitHub用户zwangbo

    2023-05-09 18:26:20
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Java Spring Boot开发实战系列课程【第16讲】:Spring Boot 2.0 实战Apache Kafka百万级高并发消息中间件与原理解析 立即下载
MaxCompute技术公开课第四季 之 如何将Kafka数据同步至MaxCompute 立即下载
消息队列kafka介绍 立即下载