i.n.channel.DefaultChannelPipeline - An exception was thrown by a user handler's exceptionCaught() method while handling the fol


#1

HI – my java client (running under Tomcat) occasionally and as a result of no apparent problem my side, generates the following in the server logs:

[nioEventLoopGroup-2-14] WARN i.n.channel.DefaultChannelPipeline - An exception was thrown by a user handler's exceptionCaught() method while handling the following exception: com.datasift.client.exceptions.AuthException: Please provide a valid username and API key at com.datasift.client.DataSiftApiClient$1.apply(DataSiftApiClient.java:65) ~[datasift-java-3.0.0-Beta2.jar:na] at com.datasift.client.DataSiftApiClient$1.apply(DataSiftApiClient.java:41) ~[datasift-java-3.0.0-Beta2.jar:na] at io.higgs.http.client.future.PageReader.done(PageReader.java:29) ~[http-client-0.0.7.jar:na] at io.higgs.http.client.future.Reader.setCompleted(Reader.java:52) ~[http-client-0.0.7.jar:na] at io.higgs.http.client.Response.setCompleted(Response.java:69) ~[http-client-0.0.7.jar:na] at io.higgs.http.client.ClientHandler.channelRead0(ClientHandler.java:57) ~[http-client-0.0.7.jar:na] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) ~[netty-all-4.0.12.Final.jar:na] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [netty-all-4.0.12.Final.jar:na] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [netty-all-4.0.12.Final.jar:na] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:153) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:148) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [netty-all-4.0.12.Final.jar:na] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:153) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:122) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:485) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:452) [netty-all-4.0.12.Final.jar:na] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:346) [netty-all-4.0.12.Final.jar:na] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [netty-all-4.0.12.Final.jar:na] at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]

First, the ‘no valid user/api key’ error is bogus as at this point the client has been running for hours if not days successfully on a stream…

Second, this event, when it happens, appears to kill the thread on which its running… how might I avoid or trap this condition so i can simply log it and get on with life… or is this a bug that needs fixing in your api libs?

FWIW this is with the 3.0.0-Beta2 lib via maven


#2

Could you let us know which API calls you issued when you received this error? It appears this may have been caused by transient issues on the DataSift side.


#3

i’ve just updated to (again via maven, which incidentally includes a dependency on a version of high-scale-lib (1.0.3) which is no longer available… i had to manually pull in v 1.0.6 to add the necessary dependency library). If the error happens again I will provide the api calls which preceded it. Regards


#4

actually, thinking about when it happened and the program flow, all that would have been happening would have been listening on an already subscribed stream to which my client connected hours earlier… there would have been no actual API calls made at that time of day from my end. Hope that helps?


#5

Thanks. I've raised an issue on Giithub asking for the high-scale-lib dependency to be updated. 

We will continue to investigate the authentication issue you experienced at our end.