didi / KnowStreaming

一站式云原生实时流数据平台,通过0侵入、插件化构建企业级Kafka服务,极大降低操作、存储和管理实时流数据门槛
https://knowstreaming.com
GNU Affero General Public License v3.0
6.99k stars 1.28k forks source link

连接jmx访问返回9999端口报错,显示连接拒绝,这是什么原因呢? #1213

Open lianglinhuan opened 11 months ago

lianglinhuan commented 11 months ago

在这里提出你的问题

ERROR 60649 --- [-1-9-thread-109] c.x.k.s.km.common.jmx.JmxConnectorWrap : JMX connect exception, clientLogIdent:clusterPhyId: 10 brokerId: 1 host:wyc.kafka.1.com port:9999. java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused (Connection refused) at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619) at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:209) at java.rmi/sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:196) at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:129) at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:209) at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:161) at com.sun.proxy.$Proxy241.newClient(Unknown Source) at java.management.rmi/javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2105) at java.management.rmi/javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:321) at java.management/javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270) at com.xiaojukeji.know.streaming.km.common.jmx.JmxConnectorWrap.createJmxConnector(JmxConnectorWrap.java:176) at com.xiaojukeji.know.streaming.km.common.jmx.JmxConnectorWrap.checkJmxConnectionAndInitIfNeed(JmxConnectorWrap.java:74) at com.xiaojukeji.know.streaming.km.persistence.kafka.KafkaJMXClient.getClientWithCheck(KafkaJMXClient.java:38)

lianglinhuan commented 11 months ago

网络是通的,telnet是可以正常访问的,在jmx的9999端口也是可以看到有连接数过来,但是knowstream还是会报这个错误

ZQKC commented 10 months ago

1 host:wyc.kafka.1.com port:9999. java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused (Connection refused) at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEnd

见无数据排查文档,上面有关于JMX连接错误的说明。

lianglinhuan commented 10 months ago

@ZQKC 是因为knowstream需要雨kakfa的9999端口需要双向交互的网络开通?

ZQKC commented 10 months ago

@ZQKC 是因为knowstream需要雨kakfa的9999端口需要双向交互的网络开通?

是的。也和配置有关系,具体可以看一下上面提到的那个文档。

lianglinhuan commented 8 months ago

@ZQKC 我看官方文档,这里说的,是hostsname配置的问题,是kafka服务端的hostsname还是streaming的hostname的呢?

错误二:错误提示的是127.0.0.1这个IP,这个是机器的hostname配置的可能有问题。

2021-01-27 10:06:20.730 ERROR 50901 --- [ics-Thread-1-62] c.x.k.m.c.utils.jmx.JmxConnectorWrap : JMX connect exception, host:127.0.0.1 port:9999. java.rmi.ConnectException: Connection refused to host: 127.0.0.1;; nested exception is:

ZQKC commented 8 months ago

@ZQKC 我看官方文档,这里说的,是hostsname配置的问题,是kafka服务端的hostsname还是streaming的hostname的呢?

错误二:错误提示的是127.0.0.1这个IP,这个是机器的hostname配置的可能有问题。

2021-01-27 10:06:20.730 ERROR 50901 --- [ics-Thread-1-62] c.x.k.m.c.utils.jmx.JmxConnectorWrap : JMX connect exception, host:127.0.0.1 port:9999. java.rmi.ConnectException: Connection refused to host: 127.0.0.1;; nested exception is:

kafka的