Hello,
I am trying to set up a PHP class that will ask graylog2 (via the API)
certain "questions" and return that information in the form of a JSON
object to be processed. To set this up I go "System" -> "Nodes" and then
under the "Action" drop-down, select "API-Browser". From there I want to
use "Search/Keyword" and select the first option
"/search/universal/keyword", the one with the "Response Content Type" of
"application/json"
I set up my query correctly with the correct range keyword for my needs and
press the "Try it out!" button to receive some response info. It gives a
valid 200 response code with a response body, along with the request URL
needed to get that information (this I would use for my PHP script).
The problem, however, is when I attempt to go to that URL I get a blank
page that says "Uncaught exception! HTTP 500 Internal Server Error". After
testing/checking the logs on the graylog2 server, I see this every time I
use the request url:
2014-10-06 17:07:22,394 ERROR:
org.graylog2.jersey.container.netty.NettyContainer - Uncaught exception in
transport layer. This is likely a bug, closing channel.
javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
at
org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:89)
at
org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
at
org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1154)
at
org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:621)
at
org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:377)
at
org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:420)
at
org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
at
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
at
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
at
org.graylog2.jersey.container.netty.NettyContainer.messageReceived(NettyContainer.java:356)
at
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at
org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at
org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:142)
at
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at
org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at
org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
at
org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:459)
at
org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536)
at
org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)
at
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
at
org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
at
org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
at
org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
at
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)
at
org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by:
org.glassfish.jersey.message.internal.MessageBodyProviderNotFoundException:
MessageBodyWriter not found for media type=text/csv, type=class
org.graylog2.plugin.rest.ApiError, genericType=class
org.graylog2.plugin.rest.ApiError.
at
org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:247)
at
org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
at
org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106)
at
org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
at
org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:85)
... 40 more
It seems as though the problem is caused by: *Caused by:
org.glassfish.jersey.message.internal.MessageBodyProviderNotFoundException:
MessageBodyWriter not found for media type=text/csv, type=class
org.graylog2.plugin.rest.ApiError, genericType=class
org.graylog2.plugin.rest.ApiError.*
After some Googling I have yet to come up with solid answer for this. The
JSON response + API worked fine before we upgraded (we were at version
~0.20), but after the upgrade we started getting this. It appears as though
there is some dependency missing, or that when graylog2 upgraded it
upgraded all of it's dependencies with one of them starting to throw an
error.
Not sure where else to turn, so I'm posting this here. Any help would be
GREATLY appreciated. Thank you!!
--
You received this message because you are subscribed to the Google Groups
"graylog2" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.