Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.41k stars 1.07k forks source link

500 error on content pack overview #5600

Closed mpfz0r closed 5 years ago

mpfz0r commented 5 years ago

Clicking the content pack menu entry triggers this for me:

2019-01-25 17:51:20,913 ERROR: org.graylog2.shared.rest.exceptionmappers.AnyExceptionClassMapper - Unhandled exception in REST resource
java.lang.RuntimeException: IOException encountered while reading from a byte array input stream
    at org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:67) ~[mongojack-2.8.2.jar:?]
    at com.mongodb.DBDecoderAdapter.decode(DBDecoderAdapter.java:49) ~[mongodb-driver-3.6.4.jar:?]
    at com.mongodb.DBDecoderAdapter.decode(DBDecoderAdapter.java:29) ~[mongodb-driver-3.6.4.jar:?]
    at com.mongodb.operation.CommandResultArrayCodec.decode(CommandResultArrayCodec.java:52) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.operation.CommandResultDocumentCodec.readValue(CommandResultDocumentCodec.java:60) ~[mongodb-driver-core-3.6.4.jar:?]
    at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:84) ~[bson-3.6.4.jar:?]
    at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:41) ~[bson-3.6.4.jar:?]
    at org.bson.codecs.configuration.LazyCodec.decode(LazyCodec.java:47) ~[bson-3.6.4.jar:?]
    at org.bson.codecs.BsonDocumentCodec.readValue(BsonDocumentCodec.java:101) ~[bson-3.6.4.jar:?]
    at com.mongodb.operation.CommandResultDocumentCodec.readValue(CommandResultDocumentCodec.java:63) ~[mongodb-driver-core-3.6.4.jar:?]
    at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:84) ~[bson-3.6.4.jar:?]
    at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:41) ~[bson-3.6.4.jar:?]
    at com.mongodb.connection.ReplyMessage.<init>(ReplyMessage.java:51) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:301) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.connection.UsageTrackingInternalConnection.sendAndReceive(UsageTrackingInternalConnection.java:98) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.connection.DefaultConnectionPool$PooledConnection.sendAndReceive(DefaultConnectionPool.java:441) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.connection.CommandProtocolImpl.execute(CommandProtocolImpl.java:80) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:189) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:264) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.connection.DefaultServerConnection.command(DefaultServerConnection.java:126) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.connection.DefaultServerConnection.command(DefaultServerConnection.java:118) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:226) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:217) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:120) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.operation.FindOperation$1.call(FindOperation.java:717) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.operation.FindOperation$1.call(FindOperation.java:711) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:471) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:415) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.operation.FindOperation.execute(FindOperation.java:711) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.operation.FindOperation.execute(FindOperation.java:83) ~[mongodb-driver-core-3.6.4.jar:?]
    at com.mongodb.Mongo$3.execute(Mongo.java:826) ~[mongodb-driver-3.6.4.jar:?]
    at com.mongodb.Mongo$3.execute(Mongo.java:813) ~[mongodb-driver-3.6.4.jar:?]
    at com.mongodb.DBCursor.initializeCursor(DBCursor.java:877) ~[mongodb-driver-3.6.4.jar:?]
    at com.mongodb.DBCursor.hasNext(DBCursor.java:144) ~[mongodb-driver-3.6.4.jar:?]
    at org.mongojack.DBCursor.hasNext(DBCursor.java:330) ~[mongojack-2.8.2.jar:?]
    at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:241) ~[guava-25.1-jre.jar:?]
    at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:230) ~[guava-25.1-jre.jar:?]
    at org.graylog2.contentpacks.ContentPackPersistenceService.loadAll(ContentPackPersistenceService.java:71) ~[classes/:?]
    at org.graylog2.contentpacks.ContentPackPersistenceService.loadAllLatest(ContentPackPersistenceService.java:75) ~[classes/:?]
    at org.graylog2.rest.resources.system.contentpacks.ContentPackResource.listLatestContentPacks(ContentPackResource.java:123) ~[classes/:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) ~[jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) ~[jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) ~[jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205) ~[jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) ~[jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) ~[jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) ~[jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) ~[jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.25.1.jar:?]
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.25.1.jar:?]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.25.1.jar:?]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.25.1.jar:?]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.25.1.jar:?]
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.25.1.jar:?]
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384) [jersey-container-grizzly2-http-2.25.1.jar:?]
    at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224) [grizzly-http-server-2.3.28.jar:2.3.28]
    at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:181) [metrics-core-4.0.3.jar:4.0.3]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_191]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_191]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "requires" (class org.graylog2.contentpacks.model.AutoValue_ContentPackV1$Builder), not marked as ignorable (13 known properties: "entities", "rev", "summary", "vendor", "parameters", "name", "url", "v", "_id", "id", "description", "created_at", "server_version"])
 at [Source: de.undercouch.bson4jackson.io.LittleEndianInputStream@11884a24; pos: 610] (through reference chain: org.graylog2.contentpacks.model.AutoValue_ContentPackV1$Builder["requires"])
    at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:62) ~[jackson-databind-2.8.11.3.jar:2.8.11.3]
    at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:834) ~[jackson-databind-2.8.11.3.jar:2.8.11.3]
    at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1093) ~[jackson-databind-2.8.11.3.jar:2.8.11.3]
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1489) ~[jackson-databind-2.8.11.3.jar:2.8.11.3]
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1467) ~[jackson-databind-2.8.11.3.jar:2.8.11.3]
    at com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserializeFromObject(BuilderBasedDeserializer.java:317) ~[jackson-databind-2.8.11.3.jar:2.8.11.3]
    at com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:178) ~[jackson-databind-2.8.11.3.jar:2.8.11.3]
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:129) ~[jackson-databind-2.8.11.3.jar:2.8.11.3]
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97) ~[jackson-databind-2.8.11.3.jar:2.8.11.3]
    at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:209) ~[jackson-databind-2.8.11.3.jar:2.8.11.3]
    at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:63) ~[jackson-databind-2.8.11.3.jar:2.8.11.3]
    at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3786) ~[jackson-databind-2.8.11.3.jar:2.8.11.3]
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2181) ~[jackson-databind-2.8.11.3.jar:2.8.11.3]
    at org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:80) ~[mongojack-2.8.2.jar:?]
    at org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:64) ~[mongojack-2.8.2.jar:?]
    ... 67 more
mpfz0r commented 5 years ago

This was due to old development content packs in my db. Not a bug. closing this.

S1L3NC3 commented 5 years ago

Hi there! I've same issue than mpfz0r with the same message within graylog-server log. Graylog version 2.5.1 . This is a new installation so I'd never used content packs.

With sentence in mongodb "db.content_packs.find({ "category" : { "$exists" : true } });" i can see just one content pack installed and called Core Grok Patterns.

Error appears in log message just clicking in Content Packs:

2019-02-06T12:46:34.516+01:00 ERROR [AnyExceptionClassMapper] Unhandled exception in REST resource java.lang.RuntimeException: IOException encountered while reading from a byte array input stream at org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:67) ~[graylog.jar:?] at com.mongodb.DBDecoderAdapter.decode(DBDecoderAdapter.java:49) ~[graylog.jar:?] at com.mongodb.DBDecoderAdapter.decode(DBDecoderAdapter.java:29) ~[graylog.jar:?] at com.mongodb.operation.CommandResultArrayCodec.decode(CommandResultArrayCodec.java:52) ~[graylog.jar:?] at com.mongodb.operation.CommandResultDocumentCodec.readValue(CommandResultDocumentCodec.java:60) ~[graylog.jar:?] at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:84) ~[graylog.jar:?] at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:41) ~[graylog.jar:?] at org.bson.codecs.configuration.LazyCodec.decode(LazyCodec.java:47) ~[graylog.jar:?] at org.bson.codecs.BsonDocumentCodec.readValue(BsonDocumentCodec.java:101) ~[graylog.jar:?] at com.mongodb.operation.CommandResultDocumentCodec.readValue(CommandResultDocumentCodec.java:63) ~[graylog.jar:?] at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:84) ~[graylog.jar:?] at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:41) ~[graylog.jar:?] at com.mongodb.connection.ReplyMessage.<init>(ReplyMessage.java:50) ~[graylog.jar:?] at com.mongodb.connection.CommandProtocol.getResponseDocument(CommandProtocol.java:132) ~[graylog.jar:?] at com.mongodb.connection.CommandProtocol.execute(CommandProtocol.java:111) ~[graylog.jar:?] at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:159) ~[graylog.jar:?] at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:289) ~[graylog.jar:?] at com.mongodb.connection.DefaultServerConnection.command(DefaultServerConnection.java:176) ~[graylog.jar:?] at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:216) ~[graylog.jar:?] at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:207) ~[graylog.jar:?] at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:113) ~[graylog.jar:?] at com.mongodb.operation.FindOperation$1.call(FindOperation.java:715) ~[graylog.jar:?] at com.mongodb.operation.FindOperation$1.call(FindOperation.java:709) ~[graylog.jar:?] at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:433) ~[graylog.jar:?] at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:406) ~[graylog.jar:?] at com.mongodb.operation.FindOperation.execute(FindOperation.java:709) ~[graylog.jar:?] at com.mongodb.operation.FindOperation.execute(FindOperation.java:81) ~[graylog.jar:?] at com.mongodb.Mongo.execute(Mongo.java:810) ~[graylog.jar:?] at com.mongodb.Mongo$2.execute(Mongo.java:797) ~[graylog.jar:?] at com.mongodb.DBCursor.initializeCursor(DBCursor.java:871) ~[graylog.jar:?] at com.mongodb.DBCursor.hasNext(DBCursor.java:142) ~[graylog.jar:?] at org.mongojack.DBCursor.hasNext(DBCursor.java:330) ~[graylog.jar:?] at org.graylog2.bundles.BundleService.loadAll(BundleService.java:83) ~[graylog.jar:?] at org.graylog2.rest.resources.system.bundles.BundleResource.listBundles(BundleResource.java:100) ~[graylog.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191] at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) ~[graylog.jar:?] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) ~[graylog.jar:?] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) ~[graylog.jar:?] at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205) ~[graylog.jar:?] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) ~[graylog.jar:?] at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) ~[graylog.jar:?] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) ~[graylog.jar:?] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) ~[graylog.jar:?] at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [graylog.jar:?] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [graylog.jar:?] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [graylog.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [graylog.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [graylog.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [graylog.jar:?] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [graylog.jar:?] at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [graylog.jar:?] at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [graylog.jar:?] at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384) [graylog.jar:?] at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224) [graylog.jar:?] at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176) [graylog.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_191] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]

kmerz commented 5 years ago

@S1L3NC3 you see this error in 2.5.1? If so could you please open a new Issue, since it is not related with the @mpfz0r had. And could you add the content pack (from the database) to that issue?