Closed wjf989 closed 5 years ago
从你提供的异常日志来看,你的Kafka集群JMX端口没有开启,可以参考这边博客开启JMX:《Kafka Eagle安装详解》
解决了,good。还有一个问题,我搭建了一个虚拟机,配置跟上面的一样,但是web端打开的时候 ,总是提示Apache Tomcat的SpringMVC问题
提示报什么错误呢?
WEB
HTTP Status 500 - Servlet.init() for servlet SpringMvc threw exception
type Exception report
message Servlet.init() for servlet SpringMvc threw exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception javax.servlet.ServletException: Servlet.init() for servlet SpringMvc threw exception org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Thread.java:748)
root cause org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mappingJacksonHttpMessageConverter' defined in class path resource [spring-mvc.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.fasterxml.jackson.annotation.JsonInclude$Value org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1101) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755) org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677) org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548) org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489) org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) javax.servlet.GenericServlet.init(GenericServlet.java:158) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Thread.java:748)
同时后台的error.log提示信息:
[2019-05-22 23:18:57] DispatcherServlet.localhost-startStop-1 - ERROR - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mappingJacksonHttpMessageConverter' defined in class path resource [spring-mvc.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter]: Constructor threw exception; nested exception is java.lang.NoSuchFieldError: USE_DEFAULTS
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1101)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1194)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1110)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1000)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4902)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5212)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
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)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter]: Constructor threw exception; nested exception is java.lang.NoSuchFieldError: USE_DEFAULTS
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1094)
... 33 more
Caused by: java.lang.NoSuchFieldError: USE_DEFAULTS
at com.fasterxml.jackson.annotation.JsonInclude$Value.
解决了,good。还有一个问题,我搭建了一个虚拟机,配置跟上面的一样,但是web端打开的时候 ,总是提示Apache Tomcat的SpringMVC问题
请教怎么解决不显示消息的问题?
kafka版本:kafka_2.12-2.2.0 zookeeper版本:zookeeper-3.4.14 kafka-eagel:1.3.2 JDK:1.8.0_141 系统:CentOS release 6.9 (Final) 环境:单机模式 描述: web端界面能过打开,但是里面的Dashboard没有信息
Eagle中的配置信息:
######################################
multi zookeeper&kafka cluster list
###################################### kafka.eagle.zk.cluster.alias=cluster1 cluster1.zk.list=192.168.1.71:2181
######################################
zk client thread limit
###################################### kafka.zk.limit.size=25
######################################
kafka eagle webui port
###################################### kafka.eagle.webui.port=8048
######################################
kafka offset storage
###################################### cluster1.kafka.eagle.offset.storage=kafka
######################################
enable kafka metrics
###################################### kafka.eagle.metrics.charts=false kafka.eagle.sql.fix.error=false
######################################
kafka sql topic records max
###################################### kafka.eagle.sql.topic.records.max=5000
######################################
alarm email configure
###################################### kafka.eagle.mail.enable=false kafka.eagle.mail.sa=alert_sa@163.com kafka.eagle.mail.username=alert_sa@163.com kafka.eagle.mail.password=mqslimczkdqabbbh kafka.eagle.mail.server.host=smtp.163.com kafka.eagle.mail.server.port=25
######################################
alarm im configure
######################################
kafka.eagle.im.dingding.enable=true
kafka.eagle.im.dingding.url=https://oapi.dingtalk.com/robot/send?access_token=
kafka.eagle.im.wechat.enable=true
kafka.eagle.im.wechat.token=https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=xxx&corpsecret=xxx
kafka.eagle.im.wechat.url=https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=
kafka.eagle.im.wechat.touser=
kafka.eagle.im.wechat.toparty=
kafka.eagle.im.wechat.totag=
kafka.eagle.im.wechat.agentid=
######################################
delete kafka topic token
###################################### kafka.eagle.topic.token=keadmin
######################################
kafka sasl authenticate
###################################### cluster1.kafka.eagle.sasl.enable=false cluster1.kafka.eagle.sasl.protocol=SASL_PLAINTEXT cluster1.kafka.eagle.sasl.mechanism=PLAIN cluster1.kafka.eagle.sasl.client=/opt/kafka-eagle/conf/kafka_client_jaas.conf
######################################
kafka jdbc driver address
###################################### kafka.eagle.driver=org.sqlite.JDBC kafka.eagle.url=jdbc:sqlite:/opt/kafka-eagle/db/ke.db kafka.eagle.username=root kafka.eagle.password=smartloli
提示的错误信息: [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:10] ZooKeeperClient.localhost-startStop-1-EventThread - ERROR - [ZooKeeperClient] Auth failed. [2019-05-20 17:34:59] KafkaServiceImpl.http-nio-8048-exec-8 - ERROR - Get kafka version from jmx has error, msg is Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 192.168.1.71; nested exception is: [2019-05-20 17:34:59] KafkaServiceImpl.http-nio-8048-exec-8 - ERROR - Get kafka version from jmx has error, msg is Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 192.168.1.71; nested exception is: [2019-05-20 17:34:59] KafkaServiceImpl.http-nio-8048-exec-8 - ERROR - Get kafka version from jmx has error, msg is Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 192.168.1.71; nested exception is: