0


centos配置Kafka-eagle(EFAK)无法登录

问题描述:

    在配置Kafka-eagle时候,在web端能够打开登录界面,但是输入用户名和密码以后没反应。再过会儿会报504错误。

问题排查:

    首先是看了一下错误日志(/opt/module/efak/logs/error.log),输出大致是这样的:
[2024-01-17 19:17:58] MySqlStoragePlugin.Thread-6 - ERROR - Create mysql connection has error address[hadoop102:3306],username[root],password[000000],msg is Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
 [2024-01-17 19:17:58] MySqlStoragePlugin.Thread-7 - ERROR - Create mysql connection has error address[hadoop102:3306],username[root],password[000000],msg is Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
 [2024-01-17 19:18:00] KafkaClusterSubTask.Thread-12 - ERROR - Get kafka cluster metrics has error, msg is 
 java.lang.NullPointerException
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.KafkaClusterSubTask.kafkaCluster(KafkaClusterSubTask.java:86)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.KafkaClusterSubTask.run(KafkaClusterSubTask.java:67)
[2024-01-17 19:18:00] KafkaSchemaFactory.Thread-13 - ERROR - Failure while loading table names for database 'cluster1': {}
 java.lang.NullPointerException
    at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.parseBrokerServer(KafkaStoragePlugin.java:61)
    at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.getKafkaConsumerProps(KafkaStoragePlugin.java:90)
    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.PerformanceByTopicStatsSubTask.brokerPerformanceByTopicStats(PerformanceByTopicStatsSubTask.java:71)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.PerformanceByTopicStatsSubTask.run(PerformanceByTopicStatsSubTask.java:53)
[2024-01-17 19:18:00] KafkaSchemaFactory.Thread-22 - ERROR - Failure while loading table names for database 'cluster1': {}
 java.lang.NullPointerException
    at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.parseBrokerServer(KafkaStoragePlugin.java:61)
    at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.getKafkaConsumerProps(KafkaStoragePlugin.java:90)
    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.CapacityStatsSubTask.topicCapacityStats(CapacityStatsSubTask.java:75)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.CapacityStatsSubTask.run(CapacityStatsSubTask.java:58)
[2024-01-17 19:18:00] PerformanceByTopicStatsSubTask.Thread-13 - ERROR - Collector broker spread by topic 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.PerformanceByTopicStatsSubTask.brokerPerformanceByTopicStats(PerformanceByTopicStatsSubTask.java:71)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.PerformanceByTopicStatsSubTask.run(PerformanceByTopicStatsSubTask.java:53)
[2024-01-17 19:18:00] KafkaSchemaFactory.Thread-14 - ERROR - Failure while loading table names for database 'cluster1': {}
 java.lang.NullPointerException
    at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.parseBrokerServer(KafkaStoragePlugin.java:61)
    at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.getKafkaConsumerProps(KafkaStoragePlugin.java:90)
    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-01-17 19:18:00] TopicThroughputByteOutTask.Thread-14 - 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.TopicThroughputByteOutTask.throughput(TopicThroughputByteOutTask.java:86)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.TopicThroughputByteOutTask.run(TopicThroughputByteOutTask.java:68)
[2024-01-17 19:18:00] KafkaSchemaFactory.Thread-15 - ERROR - Failure while loading table names for database 'cluster1': {}
 java.lang.NullPointerException
    at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.parseBrokerServer(KafkaStoragePlugin.java:61)
    at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.getKafkaConsumerProps(KafkaStoragePlugin.java:90)
    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:86)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.TopicThroughputByteInTask.run(TopicThroughputByteInTask.java:68)
[2024-01-17 19:18:00] TopicThroughputByteInTask.Thread-15 - 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:86)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.TopicThroughputByteInTask.run(TopicThroughputByteInTask.java:68)
[2024-01-17 19:18:00] KafkaSchemaFactory.Thread-17 - ERROR - Failure while loading table names for database 'cluster1': {}
 java.lang.NullPointerException
    at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.parseBrokerServer(KafkaStoragePlugin.java:61)
    at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.getKafkaConsumerProps(KafkaStoragePlugin.java:90)
    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.LogsizeStatsSubTask.topicLogsizeStats(LogsizeStatsSubTask.java:70)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.LogsizeStatsSubTask.run(LogsizeStatsSubTask.java:52)
[2024-01-17 19:18:00] LogsizeStatsSubTask.Thread-17 - ERROR - Collector topic logsize 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.LogsizeStatsSubTask.topicLogsizeStats(LogsizeStatsSubTask.java:70)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.LogsizeStatsSubTask.run(LogsizeStatsSubTask.java:52)
[2024-01-17 19:18:00] KafkaSchemaFactory.Thread-19 - ERROR - Failure while loading table names for database 'cluster1': {}
 java.lang.NullPointerException
    at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.parseBrokerServer(KafkaStoragePlugin.java:61)
    at org.smartloli.kafka.eagle.common.util.kraft.KafkaStoragePlugin.getKafkaConsumerProps(KafkaStoragePlugin.java:90)
    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.ProducerLogSizeStatsSubTask.topicProducerLogSizeStats(ProducerLogSizeStatsSubTask.java:72)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.ProducerLogSizeStatsSubTask.run(ProducerLogSizeStatsSubTask.java:53)
[2024-01-17 19:18:00] ProducerLogSizeStatsSubTask.Thread-19 - ERROR - Collector topic logsize 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.ProducerLogSizeStatsSubTask.topicProducerLogSizeStats(ProducerLogSizeStatsSubTask.java:72)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.ProducerLogSizeStatsSubTask.run(ProducerLogSizeStatsSubTask.java:53)
[2024-01-17 19:18:00] CapacityStatsSubTask.Thread-22 - ERROR - Collector topic capacity 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.CapacityStatsSubTask.topicCapacityStats(CapacityStatsSubTask.java:75)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.CapacityStatsSubTask.run(CapacityStatsSubTask.java:58)
[2024-01-17 19:18:00] DruidDataSource.Thread-21 - ERROR - init datasource error, url: jdbc:mysql://hadoop102:3306/ke?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
 com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
    at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
    at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
    at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
    at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:197)
    at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:118)
    at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:232)
    at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:112)
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1645)
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1709)
    at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:901)
    at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1379)
    at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1375)
    at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:79)
    at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:159)
    at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:117)
    at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
    at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:80)
    at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67)
    at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:337)
    at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:86)
    at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
    at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
    at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)
    at com.sun.proxy.$Proxy14.selectList(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:224)
    at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147)
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80)
    at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
    at com.sun.proxy.$Proxy22.getCleanTopicList(Unknown Source)
    at org.smartloli.kafka.eagle.web.service.impl.DashboardServiceImpl.getCleanTopicList(DashboardServiceImpl.java:303)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.CleanTopicSubTask.topicCleanTask(CleanTopicSubTask.java:77)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.CleanTopicSubTask.run(CleanTopicSubTask.java:60)
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
    at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
    at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
    at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
    at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:334)
    at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:164)
    at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1342)
    at com.mysql.cj.NativeSession.connect(NativeSession.java:157)
    at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:956)
    at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826)
    ... 42 more
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
    at sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:171)
    at sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:106)
    at sun.security.ssl.TransportContext.kickstart(TransportContext.java:245)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:410)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:389)
    at com.mysql.cj.protocol.ExportControlled.performTlsHandshake(ExportControlled.java:336)
    at com.mysql.cj.protocol.StandardSocketFactory.performTlsHandshake(StandardSocketFactory.java:188)
    at com.mysql.cj.protocol.a.NativeSocketConnection.performTlsHandshake(NativeSocketConnection.java:99)
    at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:325)
    ... 47 more
[2024-01-17 19:18:00] BScreenConsumerSubTask.Thread-23 - ERROR - Collector consumer topic data has error, msg is 
 java.lang.NullPointerException
    at org.smartloli.kafka.eagle.core.factory.KafkaServiceImpl.parseBrokerServer(KafkaServiceImpl.java:505)
    at org.smartloli.kafka.eagle.core.factory.KafkaServiceImpl.getKafkaConsumer(KafkaServiceImpl.java:634)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.BScreenConsumerSubTask.bscreenConsumerTopicStats(BScreenConsumerSubTask.java:101)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.BScreenConsumerSubTask.metricsConsumerTopicQuartz(BScreenConsumerSubTask.java:69)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.BScreenConsumerSubTask.run(BScreenConsumerSubTask.java:64)
[2024-01-17 19:18:00] DruidDataSource.Thread-21 - ERROR - {dataSource-1} init error
 com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
    at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
    at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
    at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
    at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:197)
    at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:118)
    at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:232)
    at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:112)
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1645)
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1709)
    at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:901)
    at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1379)
    at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1375)
    at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:79)
    at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:159)
    at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:117)
    at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
    at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:80)
    at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67)
    at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:337)
    at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:86)
    at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
    at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
    at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)
    at com.sun.proxy.$Proxy14.selectList(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:224)
    at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147)
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80)
    at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
    at com.sun.proxy.$Proxy22.getCleanTopicList(Unknown Source)
    at org.smartloli.kafka.eagle.web.service.impl.DashboardServiceImpl.getCleanTopicList(DashboardServiceImpl.java:303)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.CleanTopicSubTask.topicCleanTask(CleanTopicSubTask.java:77)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.CleanTopicSubTask.run(CleanTopicSubTask.java:60)
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
    at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
    at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
    at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
    at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:334)
    at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:164)
    at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1342)
    at com.mysql.cj.NativeSession.connect(NativeSession.java:157)
    at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:956)
    at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826)
    ... 42 more
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
    at sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:171)
    at sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:106)
    at sun.security.ssl.TransportContext.kickstart(TransportContext.java:245)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:410)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:389)
    at com.mysql.cj.protocol.ExportControlled.performTlsHandshake(ExportControlled.java:336)
    at com.mysql.cj.protocol.StandardSocketFactory.performTlsHandshake(StandardSocketFactory.java:188)
    at com.mysql.cj.protocol.a.NativeSocketConnection.performTlsHandshake(NativeSocketConnection.java:99)
    at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:325)
    ... 47 more
[2024-01-17 19:18:00] CleanTopicSubTask.Thread-21 - ERROR - Clean topic logsize has error, msg is 
 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
### The error may exist in org/smartloli/kafka/eagle/web/dao/TopicDao.xml
### The error may involve org.smartloli.kafka.eagle.web.dao.TopicDao.getCleanTopicList
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:96)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
    at com.sun.proxy.$Proxy14.selectList(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:224)
    at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147)
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80)
    at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
    at com.sun.proxy.$Proxy22.getCleanTopicList(Unknown Source)
    at org.smartloli.kafka.eagle.web.service.impl.DashboardServiceImpl.getCleanTopicList(DashboardServiceImpl.java:303)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.CleanTopicSubTask.topicCleanTask(CleanTopicSubTask.java:77)
    at org.smartloli.kafka.eagle.web.quartz.shard.task.sub.CleanTopicSubTask.run(CleanTopicSubTask.java:60)
Caused by: org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
### The error may exist in org/smartloli/kafka/eagle/web/dao/TopicDao.xml
### The error may involve org.smartloli.kafka.eagle.web.dao.TopicDao.getCleanTopicList
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:153)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)
    ... 10 more
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:83)
    at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:80)
    at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67)
    at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:337)
    at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:86)
    at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
    at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
    at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
    ... 17 more
Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
    at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
    at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
    at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
    at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:197)
    at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:118)
    at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:232)
    at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:112)
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1645)
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1709)
    at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:901)
    at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1379)
    at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1375)
    at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:79)
    at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:159)
    at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:117)
    at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
    ... 27 more
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
    at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
    at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
    at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
    at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:334)
    at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:164)
    at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1342)
    at com.mysql.cj.NativeSession.connect(NativeSession.java:157)
    at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:956)
    at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826)
    ... 42 more
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
    at sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:171)
    at sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:106)
    at sun.security.ssl.TransportContext.kickstart(TransportContext.java:245)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:410)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:389)
    at com.mysql.cj.protocol.ExportControlled.performTlsHandshake(ExportControlled.java:336)
    at com.mysql.cj.protocol.StandardSocketFactory.performTlsHandshake(StandardSocketFactory.java:188)
    at com.mysql.cj.protocol.a.NativeSocketConnection.performTlsHandshake(NativeSocketConnection.java:99)
    at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:325)
    可以看到,错误日志里面有很多“Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure”,以为是数据库配置的问题,然后就开始排查,多番检查发现数据库(我用的是MySQL)连接是没问题的。 

    然后就继续看错误日志,发现有一个问题描述:“Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)”,遂继续寻找解决办法,直到看到了这个大佬的博客:https://blog.csdn.net/weixin_44629395/article/details/127123945

    终于解决了!!!

具体解决:

    1、cd /opt/module/jdk1.8.0_391/jre/lib/security (即进入jdk的安装目录)

    2、删除SSLv3, TLSv1, TLSv1.1(如图变量里面的前三个,因为我已经删掉了就没放上来)

         命令行:vim java.security

    3、保存重启即可~
标签: kafka java centos

本文转载自: https://blog.csdn.net/2201_75522639/article/details/134366186
版权归原作者 劳资蜀道山在逃折耳根 所有, 如有侵权,请联系我们删除。

“centos配置Kafka-eagle(EFAK)无法登录”的评论:

还没有评论