didi / KnowStreaming

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

# 连接JMX的日志中,出现SSL认证失败的相关日志。TODO:欢迎补充具体日志案例。 #1070

Open turnjian opened 1 year ago

turnjian commented 1 year ago

在这里提出你的问题

JMX信息空白,查看JMX排错指南,没有相关信息。

测试端口9999开放,KS能够查看broker信息,添加删除topic等内容。KS的集群配置如下:

{ "ssl.keystore.type": "JKS", "security.protocol": "SASL_SSL", "ssl.protocol": "TLSv1.2", "ssl.truststore.location": "/PATH/client.trustkeystore.jks", "ssl.keystore.password": "password", "sasl.mechanism": "PLAIN", "ssl.enabled.protocols": "TLSv1.2", "sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"username\" password=\"password\";", "ssl.keystore.location": "/PATH/client.keystore.jks", "ssl.truststore.password": "password", "ssl.endpoint.identification.algorithm": "" }

现在KS监控信息是空白,JMX在jmx_properties中的配置:

{"jmxPort":9999,"maxConn":100,"openSSL":true,"token":"password","username":"username","useWhichEndpoint": "INTERNAL"} start.out输出日志: 2023-06-30 19:12:06.534 ERROR 12133 --- [-1-9-thread-174] c.x.k.s.k.p.kafka.KafkaJMXClient : method=getClientWithCheck||clusterPhyId=1||brokerId=3||msg=get jmx connector failed! 2023-06-30 19:12:06.535 INFO 12133 --- [adminclient-374] o.a.kafka.common.utils.AppInfoParser : App info ks-kafka.admin.client for adminclient-374 unregistered 2023-06-30 19:12:06.536 INFO 12133 --- [adminclient-374] org.apache.kafka.common.metrics.Metrics : Metrics scheduler closed 2023-06-30 19:12:06.536 INFO 12133 --- [adminclient-374] org.apache.kafka.common.metrics.Metrics : Closing reporter org.apache.kafka.common.metrics.JmxReporter 2023-06-30 19:12:06.536 INFO 12133 --- [adminclient-374] org.apache.kafka.common.metrics.Metrics : Metrics reporters closed 2023-06-30 19:12:06.538 ERROR 12133 --- [-1-9-thread-174] c.x.k.s.km.common.jmx.JmxConnectorWrap : JMX connect exception, clientLogIdent:clusterPhyId: 1 brokerId: 1 host:10.16.150.73 port:9999.

java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake] at java.management.rmi/javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:370) 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) at com.xiaojukeji.know.streaming.km.core.service.partition.impl.PartitionMetricServiceImpl.getTopicAvgMetricFromJmx(PartitionMetricServiceImpl.java:314) at com.xiaojukeji.know.streaming.km.core.service.version.impl.VersionControlServiceImpl.doHandler(VersionControlServiceImpl.java:93) at com.xiaojukeji.know.streaming.km.core.service.version.BaseVersionControlService.doVCHandler(BaseVersionControlService.java:62) at com.xiaojukeji.know.streaming.km.core.service.version.BaseKafkaVersionControlService.doVCHandler(BaseKafkaVersionControlService.java:29) at com.xiaojukeji.know.streaming.km.core.service.partition.impl.PartitionMetricServiceImpl.collectPartitionsMetricsFromKafka(PartitionMetricServiceImpl.java:146) at com.xiaojukeji.know.streaming.km.core.service.partition.impl.PartitionMetricServiceImpl.collectPartitionsMetricsFromKafkaWithCache(PartitionMetricServiceImpl.java:85) at com.xiaojukeji.know.streaming.km.collector.metric.kafka.PartitionMetricCollector.collectMetrics(PartitionMetricCollector.java:86) at com.xiaojukeji.know.streaming.km.collector.metric.kafka.PartitionMetricCollector.lambda$collectKafkaMetrics$0(PartitionMetricCollector.java:55) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: javax.naming.CommunicationException: null at jdk.naming.rmi/com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:137) at java.naming/com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:207) at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409) at java.management.rmi/javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1839) at java.management.rmi/javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1813) at java.management.rmi/javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:302) ... 17 common frames omitted Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:300) at java.rmi/sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:196) at java.rmi/sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338) at java.rmi/sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:112) at jdk.naming.rmi/com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:133) ... 22 common frames omitted Caused by: javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake at java.base/sun.security.ssl.SSLSocketImpl.handleEOF(SSLSocketImpl.java:1321) at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1160) at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402) at java.base/sun.security.ssl.SSLSocketImpl.ensureNegotiated(SSLSocketImpl.java:716) at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:970) at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81) at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142) at java.base/java.io.DataOutputStream.flush(DataOutputStream.java:123) at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:222) ... 26 common frames omitted Caused by: java.io.EOFException: SSL peer shut down incorrectly at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:167) at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:108) at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152) ... 34 common frames omitted

turnjian commented 1 year ago

@ZQKC 这个报错怎么解决?

ZQKC commented 1 year ago

@ZQKC 这个报错怎么解决?

使用jconsole连接jmx的话,是如何配置的?