Open zhaoyu810373097 opened 1 year ago
zookeeper配合kafka都开启的sasl权限认证,kafka可以设置sasl认证配置,zookeeper在哪里设置
我的zookeeper用的是org.apache.kafka.common.security.plain.PlainLoginModule,其它配置按照文档中进行配置,出现下面报错 2023-06-30 14:26:59.939 [MetadataTaskTP-6-thread-21] ERROR class=c.x.k.s.k.c.utils.zookeeper.FourLetterWordUtil||method=executeFourLetterCmd||clusterPhyId=2||host=192.168.22.123||port=2181||cmd=srvr||secure=true||timeout=5000||errMsg=exception! javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake at sun.security.ssl.SSLSocketImpl.handleEOF(SSLSocketImpl.java:1379) at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1206) at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1107) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:400) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:372) at com.xiaojukeji.know.streaming.km.common.utils.zookeeper.FourLetterWordUtil.send4LetterWord(FourLetterWordUtil.java:94) at com.xiaojukeji.know.streaming.km.common.utils.zookeeper.FourLetterWordUtil.executeFourLetterCmd(FourLetterWordUtil.java:48) at com.xiaojukeji.know.streaming.km.core.service.zookeeper.impl.ZookeeperServiceImpl.getFromZookeeperCluster(ZookeeperServiceImpl.java:150) at com.xiaojukeji.know.streaming.km.core.service.zookeeper.impl.ZookeeperServiceImpl.listFromZookeeper(ZookeeperServiceImpl.java:53) at com.xiaojukeji.know.streaming.km.task.kafka.metadata.SyncZookeeperTask.processClusterTask(SyncZookeeperTask.java:33) at com.xiaojukeji.know.streaming.km.task.kafka.metadata.AbstractAsyncMetadataDispatchTask.lambda$asyncProcessSubTask$0(AbstractAsyncMetadataDispatchTask.java:33) 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) Suppressed: java.net.SocketException: Broken pipe (Write failed) at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) at java.net.SocketOutputStream.write(SocketOutputStream.java:155) at sun.security.ssl.SSLSocketOutputRecord.encodeAlert(SSLSocketOutputRecord.java:81) at sun.security.ssl.TransportContext.fatal(TransportContext.java:358) at sun.security.ssl.TransportContext.fatal(TransportContext.java:270) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:410) ... 12 common frames omitted Caused by: java.io.EOFException: SSL peer shut down incorrectly at sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:471) at sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:460) at sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:159) at sun.security.ssl.SSLTransport.decode(SSLTransport.java:110) at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1198) ... 14 common frames omitted
我的zookeeper用的是org.apache.kafka.common.security.plain.PlainLoginModule,其它配置按照文档中进行配置,出现下面报错 2023-06-30 14:26:59.939 [MetadataTaskTP-6-thread-21] ERROR class=c.x.k.s.k.c.utils.zookeeper.FourLetterWordUtil||method=executeFourLetterCmd||clusterPhyId=2||host=192.168.22.123||port=2181||cmd=srvr||secure=true||timeout=5000||errMsg=exception! javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake at sun.security.ssl.SSLSocketImpl.handleEOF(SSLSocketImpl.java:1379) at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1206) at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1107) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:400) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:372) at com.xiaojukeji.know.streaming.km.common.utils.zookeeper.FourLetterWordUtil.send4LetterWord(FourLetterWordUtil.java:94) at com.xiaojukeji.know.streaming.km.common.utils.zookeeper.FourLetterWordUtil.executeFourLetterCmd(FourLetterWordUtil.java:48) at com.xiaojukeji.know.streaming.km.core.service.zookeeper.impl.ZookeeperServiceImpl.getFromZookeeperCluster(ZookeeperServiceImpl.java:150) at com.xiaojukeji.know.streaming.km.core.service.zookeeper.impl.ZookeeperServiceImpl.listFromZookeeper(ZookeeperServiceImpl.java:53) at com.xiaojukeji.know.streaming.km.task.kafka.metadata.SyncZookeeperTask.processClusterTask(SyncZookeeperTask.java:33) at com.xiaojukeji.know.streaming.km.task.kafka.metadata.AbstractAsyncMetadataDispatchTask.lambda$asyncProcessSubTask$0(AbstractAsyncMetadataDispatchTask.java:33) 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) Suppressed: java.net.SocketException: Broken pipe (Write failed) at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) at java.net.SocketOutputStream.write(SocketOutputStream.java:155) at sun.security.ssl.SSLSocketOutputRecord.encodeAlert(SSLSocketOutputRecord.java:81) at sun.security.ssl.TransportContext.fatal(TransportContext.java:358) at sun.security.ssl.TransportContext.fatal(TransportContext.java:270) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:410) ... 12 common frames omitted Caused by: java.io.EOFException: SSL peer shut down incorrectly at sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:471) at sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:460) at sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:159) at sun.security.ssl.SSLTransport.decode(SSLTransport.java:110) at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1198) ... 14 common frames omitted
ZK的四字命令可以使用么?看看在终端如何使用四字命令
是KS的一个BUG,后续修复一下,老哥有兴趣的话,也欢迎贡献PR。
修改 KnowStreaming 的启动脚本
KnowStreaming/bin/startup.sh
中的 47 行的 JAVA_OPT 中追加如下设置-Djava.security.auth.login.config=/xxx/zk_client_jaas.conf
请问这里采用docker运行的话应该如何配置
修改 KnowStreaming 的启动脚本
KnowStreaming/bin/startup.sh
中的 47 行的 JAVA_OPT 中追加如下设置-Djava.security.auth.login.config=/xxx/zk_client_jaas.conf
请问这里采用docker运行的话应该如何配置
对容器不是很了解。 觉得可以参照application.yml这个文件怎么生效的来增加zk_client_jaas.conf这个文件(觉得可以使用ADD命令加进来),先试着看能否成功加进来,然后再在startup.sh里面,增加-Djava.security.auth.login.config=/xxx/zk_client_jaas.conf这个参数。
zookeeper配合kafka都开启的sasl权限认证,kafka可以设置sasl认证配置,zookeeper在哪里设置