我无法通过SSL建立我的kafka经纪人和jmxtrans之间的连接性。我使用自签名证书配置了密钥库和信任库,并按照jmxtrans配置中的说明添加了配置。
因此,我在真值存储中添加了证书,并且在双方(kafka服务器和jmxtrans服务器)中添加了密钥存储和真存储。
当我检查由jmxtrans生成的日志时,我仍然遇到此错误:
[jmxtrans-query-2] level
com.googlecode.jmxtrans.jmx.ProcessQueryThread
[ProcessQueryThread.java:57] - Error executing query
Query(objectName=kafka.server:type=ReplicaManager,name=PartitionCount,
keys=[], attr=[Value], typeNames=[], resultAlias=ReplicaManager,
useObjDomainAsKey=false, allowDottedKeys=false, useAllTypeNames=false,
outputWriterInstances= [com.googlecode.jmxtrans.model.output.support.ResultTransformerOutputWriter@7a8cd229]) on server Server(pid=null, host=ip, port=9000, url=service:jmx:rmi:///jndi/rmi://ip:9000/jmxrmi, cronExpression=null, numQueryThreads=0)
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: Received fatal alert: handshake_failure]
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:369)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
at com.googlecode.jmxtrans.model.Server.getServerConnection(Server.java:347)
at com.googlecode.jmxtrans.connections.MBeanServerConnectionFactory.makeObject(MBeanServerConnectionFactory.java:46)
at com.googlecode.jmxtrans.connections.MBeanServerConnectionFactory.makeObject(MBeanServerConnectionFactory.java:33)
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
at com.googlecode.jmxtrans.model.Server.execute(Server.java:279)
at com.googlecode.jmxtrans.jmx.ProcessQueryThread.run(ProcessQueryThread.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
您能帮我弄清楚SSL配置中会涉及哪些问题吗?