outofcoffee / corebot

A bot to trigger Rundeck and Jenkins jobs from Slack.
72 stars 15 forks source link

corebot does not like another integration on the channel.. #25

Closed ThomasADavis closed 7 years ago

ThomasADavis commented 7 years ago

I've integrated nagios in the same channel as corebot. When a nagios notification comes in, corebot complains that it does not understand, and has this in it's docker log file:

20:04:56.358 [Grizzly(2)] ERROR com.gatehill.corebot.chat.SlackChatServiceImpl - Error parsing message event: SlackMessagePostedImpl{messageContent=null, user=com.ullink.slack.simpleslackapi.impl.SlackIntegrationUser@671f5e95, bot=null, channel=SlackChannelImpl{topic='', purpose='Data and Environment OTG', id='G2NFV97QQ', name='dae'}, timestamp=1496952295.981699, reactions={}} kotlin.TypeCastException: null cannot be cast to non-null type kotlin.CharSequence at com.gatehill.corebot.chat.SlackChatServiceImpl$messagePostedListeners$1.onEvent(SlackChatServiceImpl.kt:51) [slack-0.7.2.jar:?] at com.gatehill.corebot.chat.SlackChatServiceImpl$messagePostedListeners$1.onEvent(SlackChatServiceImpl.kt:42) [slack-0.7.2.jar:?] at com.ullink.slack.simpleslackapi.impl.SlackWebSocketSessionImpl$EventDispatcher.dispatchImpl(SlackWebSocketSessionImpl.java:209) [simple-slack-api-0.6.0.jar:?] at com.ullink.slack.simpleslackapi.impl.SlackWebSocketSessionImpl$EventDispatcher.dispatch(SlackWebSocketSessionImpl.java:173) [simple-slack-api-0.6.0.jar:?] at com.ullink.slack.simpleslackapi.impl.SlackWebSocketSessionImpl.onMessage(SlackWebSocketSessionImpl.java:840) [simple-slack-api-0.6.0.jar:?] at com.ullink.slack.simpleslackapi.impl.SlackWebSocketSessionImpl.onMessage(SlackWebSocketSessionImpl.java:42) [simple-slack-api-0.6.0.jar:?] at org.glassfish.tyrus.core.TyrusSession.notifyMessageHandlers(TyrusSession.java:576) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.tyrus.core.TyrusEndpointWrapper.onMessage(TyrusEndpointWrapper.java:879) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.tyrus.core.TyrusWebSocket.onMessage(TyrusWebSocket.java:216) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.tyrus.core.frame.TextFrame.respond(TextFrame.java:139) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.tyrus.core.ProtocolHandler.process(ProtocolHandler.java:807) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.tyrus.client.TyrusClientEngine$TyrusReadHandler.handle(TyrusClientEngine.java:747) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter$ProcessTask.execute(GrizzlyClientFilter.java:476) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.tyrus.container.grizzly.client.TaskProcessor.processTask(TaskProcessor.java:114) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.tyrus.container.grizzly.client.TaskProcessor.processTask(TaskProcessor.java:91) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleRead(GrizzlyClientFilter.java:272) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) [tyrus-standalone-client-1.13.jar:?] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) [tyrus-standalone-client-1.13.jar:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]

outofcoffee commented 7 years ago

Thanks for the report, @ThomasADavis.

This looks like the message content from the Nagios integration is null - strange, but we could be a bit more defensive here.

There have been a number of changes in the current beta; could you try the 'corebot:beta' image instead of 'latest' and let me know how it goes?

outofcoffee commented 7 years ago

@ThomasADavis this should be fixed in v0.8.0 now. Thanks again.