Open abhishekvaid opened 7 years ago
Are you sending messages to your topic without setting a key? I don't know if we ever tested that scenario.
FWIW, this should be fixed by a recent pull request. (https://github.com/HomeAdvisor/Kafdrop/pull/3)
Here's another view of the message when I click on a topic
`Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Dec 14 16:44:59 UTC 2016 There was an unexpected error (type=Internal Server Error, status=500). com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'user_group_analysis_channel': was expecting ('true', 'false' or 'null') at [Source: [B@5d61502a; line: 1, column: 55]`
@dhayha Any resolution. Kafdrop is virtually unusable for me right now.
@abhishekvaid Are you using the latest from master?
AViDs-MacBookPro:Kafdrop avid$ git pull origin master
From https://github.com/HomeAdvisor/Kafdrop
* branch master -> FETCH_HEAD
Already up-to-date.
AViDs-MacBookPro:Kafdrop avid$ git log -2
commit 43e4ec465a0b45fd83e476be521106fee4d51ed7
Author: Michael Pratt <mpratt@homeadvisor.com>
Date: Fri Nov 18 09:59:00 2016 -0700
Update Spotify docker-maven-plugin to 0.4.13
Work around for this issue with Docker on Mac:
https://forums.docker.com/t/spotify-docker-maven-plugin-cant-connect-to-localhost-2375/9093
commit 6f669434e6d83c755c7afaa16f569abf45ae8462
Author: Michael Pratt <mpratt@homeadvisor.com>
Date: Fri Nov 18 09:57:11 2016 -0700
Update README.md
Add Docker build and run information.
@michael-pratt Yes, I'm using the latest. Please check message before
I'm having trouble reproducing this error using the latest master commit. If the key is null, it just displays nothing after the "key" label.
Maybe it would help if you used the DumpLogSegments tool to dump the log segment file for the message you're trying to view in Kafdrop?
/usr/local/kafka/bin/kafka-run-class.sh kafka.tools.DumpLogSegments --files /path/to/kafka/data/data/topic.name-0/00000000000000012982.log --print-data-log
I'm receiving roughly the same error. The home page is fine but if I click on any topic it get this error.
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Jan 18 16:58:19 UTC 2017 There was an unexpected error (type=Internal Server Error, status=500). com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'dat': was expecting ('true', 'false' or 'null') at [Source: [B@469c5ab; line: 1, column: 5]
This is the full error from the server. I have 4 different instances and only having issues with one. Any insight on this would be greatly appreciated.
[2017-01-18 18:34:48.873] - 12394 ERROR [http-nio-8000-exec-10] --- [dispatcherServlet]: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'dat': was expecting ('true', 'false' or 'null') at [Source: [B@fe63e6b; line: 1, column: 5]] with root cause com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'dat': was expecting ('true', 'false' or 'null') at [Source: [B@fe63e6b; line: 1, column: 5] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1581) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:533) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidToken(UTF8StreamJsonParser.java:3451) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2610) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:841) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:737) at com.fasterxml.jackson.databind.ObjectReader._initForReading(ObjectReader.java:378) at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1494) at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1153) at com.homeadvisor.kafdrop.service.CuratorKafkaMonitor.readConsumerRegistration(CuratorKafkaMonitor.java:570) at com.homeadvisor.kafdrop.service.CuratorKafkaMonitor.lambda$null$23(CuratorKafkaMonitor.java:529) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.Iterator.forEachRemaining(Iterator.java:116) at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at com.homeadvisor.kafdrop.service.CuratorKafkaMonitor.lambda$getConsumerByTopic$24(CuratorKafkaMonitor.java:530) at java.util.Optional.ifPresent(Optional.java:159) at com.homeadvisor.kafdrop.service.CuratorKafkaMonitor.getConsumerByTopic(CuratorKafkaMonitor.java:526) at com.homeadvisor.kafdrop.service.CuratorKafkaMonitor.lambda$getConsumerStream$22(CuratorKafkaMonitor.java:497) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.Iterator.forEachRemaining(Iterator.java:116) at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at com.homeadvisor.kafdrop.service.CuratorKafkaMonitor.getConsumers(CuratorKafkaMonitor.java:485) at com.homeadvisor.kafdrop.controller.TopicController.topicDetails(TopicController.java:43) 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.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:832) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:743) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:961) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:895) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858) at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextHeaderFilter.doFilterInternal(EndpointWebMvcAutoConfiguration.java:281) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:115) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:87) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)
Any thoughts on this? I've tried using the docker version of Kafdrop as well and get the same result.
@doug2525 , what version of Kafka are you using? What version of the client library are you using to consume messages?
Currently the environment that is having the issue is confluent stack 3.0.0 client library 0.10.0.0.
FWIW, we've only tested Kafdrop up through version 0.8.2.2. It sounds like there have been some changes to the consumer data structures stored in Zookeeper that Kafdrop doesn't know how to read. Not sure if this is due to changes in Kafka, the new consumer group concepts or something about the newer consumer clients.
If you have any insight into what may have changed, let us know! (cough pull request cough)
Hmm, if I figure anything out I'll definitely pass it along. Odd though so we 4 environments all together two of the environments are running 3.1.1 and clients 0.10.1.0 - kafdrop is working perfect in these environments. Then the other two environments are both using 3.0.0 and 0.10.0.0 only one of these is having the issue. Generally the topics are replicated between the two environments, though there are instances where the topic would be unique to the environment.
I'm not sure how useful this will be but I thought I'd update the thread. So after a while the kafdrop instance started working without issue. My best guess is that there was a record that was causing the error and it was removed after it reached the retention period. I really have no way to verify that is truly what happened but kafdrop has been working without issue for a couple of months now.
Thanks for the update @doug2525 , glad to hear it's working. Definitely sounds like a particular message was the culprit, we'll see if there's any additional logging or protection we can add to try and prevent the whole UI from becoming unusable in these cases.
Every now and then, I keep getting an error while view messages.