Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EFAk-3.0.1版本,我采用的mysql数据库,库名为默认的ke,但报错不能找到数据库cluster1的表 #702

Open
RichardXu186 opened this issue Apr 9, 2024 · 6 comments

Comments

@RichardXu186
Copy link

EFAk-3.0.1版本,我采用的mysql数据库,库名为默认的ke,但报错不能找到数据库cluster1的表,具体报错日志信息如下:
KafkaSchemaFactory.Thread-16068 - ERROR - Failure while loading table names for database 'cluster1': {}
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:460)
at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.sasl(KafkaStoragePlugin.java:116)
at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.getKafkaConsumerProps(KafkaStoragePlugin.java:100)
at org.smartloli.kafka.eagle.common.util.kraft.KafkaSchemaFactory.getTableNames(KafkaSchemaFactory.java:62)
at org.smartloli.kafka.eagle.core.factory.v2.BrokerServiceImpl.topicList(BrokerServiceImpl.java:370)
at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.TopicThroughputByteInTask.throughput(TopicThroughputByteInTask.java:8
6)
at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.TopicThroughputByteInTask.run(TopicThroughputByteInTask.java:68)
[2024-04-09 08:35:00] KafkaSchemaFactory.Thread-16067 - ERROR - Failure while loading table names for database 'cluster1': {}
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:460)
at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.sasl(KafkaStoragePlugin.java:116)
at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.getKafkaConsumerProps(KafkaStoragePlugin.java:100)
at org.smartloli.kafka.eagle.common.util.kraft.KafkaSchemaFactory.getTableNames(KafkaSchemaFactory.java:62)
at org.smartloli.kafka.eagle.core.factory.v2.BrokerServiceImpl.topicList(BrokerServiceImpl.java:370)
at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.TopicThroughputByteOutTask.throughput(TopicThroughputByteOutTask.java
:86)
at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.TopicThroughputByteOutTask.run(TopicThroughputByteOutTask.java:68)
[2024-04-09 08:35:00] TopicThroughputByteInTask.Thread-16068 - ERROR - Stats topic throughput has error, msg is
java.lang.NullPointerException
at java.util.ArrayList.addAll(ArrayList.java:583)
at org.smartloli.kafka.eagle.core.factory.v2.BrokerServiceImpl.topicList(BrokerServiceImpl.java:370)
at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.TopicThroughputByteInTask.throughput(TopicThroughputByteInTask.java:8
6)
at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.TopicThroughputByteInTask.run(TopicThroughputByteInTask.java:68)
[2024-04-09 08:35:00] BScreenConsumerSubTask.Thread-16076 - ERROR - Collector consumer topic data has error, msg is
java.lang.NullPointerException
这里的cluster1数据库怎么来的?

@RichardXu186
Copy link
Author

补充说明下,mysql 库ke中表都创建成功,EFAK-3.0.1也能正常使用,只是其中一些信息,如broker数量、zookeeper数量,消费者数量显示为0,topic list时没有列出topic

@laonin
Copy link

laonin commented Jun 9, 2024

解决了吗老哥

@RichardXu186
Copy link
Author

RichardXu186 commented Sep 3, 2024 via email

@caijin0
Copy link

caijin0 commented Nov 21, 2024

我遇到了同样的问题已解决
具体解决:
1、cd /opt/module/jdk1.8.0_391/jre/lib/security (即进入jdk的安装目录)
2、vim java.security
3. 找到jdk.tls.disabledAlgorithms=xxx,删除SSLv3, TLSv1, TLSv1.1
参考链接:

  1. https://blog.csdn.net/2201_75522639/article/details/134366186
  2. https://blog.csdn.net/weixin_44629395/article/details/127123945

@RichardXu186
Copy link
Author

caijin0
参考你这方法我的仍然没有解决,我的kafka集群是启用了kerberos的,对不启用Kerberos的kafka集群,不需要做那些改动都是可以的。
我认为这里有bug,我首页的dashboard中的“Topic LogSize Top10”和“opic Capacity Top10”中都能列显topic,但在最顶上的“BROKERS”、“TOPICS”等显示均为0,通过"TOPICS"数量链接进去看不到topics列表,后台报错还是“KafkaSchemaFactory.http-nio-8048-exec-6 - ERROR - Failure while loading table names for database 'cluster1”

@RichardXu186
Copy link
Author

这个问题已经找到解决办法:
需要设置cluster1.efak.sasl.client.id=""
通过分析源码,找到原因是不设置这个,默认cluster1.efak.sasl.client.id会为null,但代码中没有做判空操作,只做了""等值比较,所以会造成空指针异常,导致不能初始化缓存元数据信息

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants