Error while running migration after upgrade to 4.0.17

I’ve got a problem with Graylog migration after upgrade to 4.0.17.

This Graylog started as 2.5.2 with MongoDB 2.6.10 and Elasticsearch 5.6.16. Migration path was:

Graylog: 2.5.2-1 → 3.0.2-1 → 3.1.4-1 → 3.2.6-1 → 3.3.17-1 → 4.0.17-1
MongoDB: 2.6.10 → 3.0.15 → 3.2.22 → 3.4.24 → 3.6.23 → 4.0.28 → 4.2.22
Elasticsearch: 5.6.16 → 6.8.23

After upgrade from 3.3.17 to 4.0.17 I’m getting errors with migration:

`2022-09-28T14:56:45.915+02:00 
ERROR [ConfigurationManagementPeriodical] Error while running migration 
<GrantsMetaMigration{2020-08-03T12:08:00Z}> 
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.internal.LazyCodec.decode(LazyCodec.java:48) ~[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.internal.connection.ReplyMessage.<init>(ReplyMessage.java:51)
 ~[graylog.jar:?] at 
com.mongodb.internal.connection.InternalStreamConnection.getCommandResult(InternalStreamConnection.java:413)
 ~[graylog.jar:?] at 
com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:309)
 ~[graylog.jar:?] at 
com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:259)
 ~[graylog.jar:?] at 
com.mongodb.internal.connection.UsageTrackingInternalConnection.sendAndReceive(UsageTrackingInternalConnection.java:99)
 ~[graylog.jar:?] at 
com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.sendAndReceive(DefaultConnectionPool.java:450)
 ~[graylog.jar:?] at 
com.mongodb.internal.connection.CommandProtocolImpl.execute(CommandProtocolImpl.java:72)
 ~[graylog.jar:?] at 
com.mongodb.internal.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:226)
 ~[graylog.jar:?] at 
com.mongodb.internal.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:269)
 ~[graylog.jar:?] at 
com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:131)
 ~[graylog.jar:?] at 
com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:123)
 ~[graylog.jar:?] at 
com.mongodb.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:343)
 ~[graylog.jar:?] at 
com.mongodb.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:334)
 ~[graylog.jar:?] at 
com.mongodb.operation.CommandOperationHelper.executeCommandWithConnection(CommandOperationHelper.java:220)
 ~[graylog.jar:?] at 
com.mongodb.operation.FindOperation$1.call(FindOperation.java:731) 
~[graylog.jar:?] at 
com.mongodb.operation.FindOperation$1.call(FindOperation.java:725) 
~[graylog.jar:?] at 
com.mongodb.operation.OperationHelper.withReadConnectionSource(OperationHelper.java:463)
 ~[graylog.jar:?] at 
com.mongodb.operation.FindOperation.execute(FindOperation.java:725) 
~[graylog.jar:?] at 
com.mongodb.operation.FindOperation.execute(FindOperation.java:89) 
~[graylog.jar:?] at 
com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:196)
 ~[graylog.jar:?] at 
com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:177)
 ~[graylog.jar:?] at 
com.mongodb.DBCursor.initializeCursor(DBCursor.java:989) 
~[graylog.jar:?] at com.mongodb.DBCursor.hasNext(DBCursor.java:172) 
~[graylog.jar:?] at org.mongojack.DBCursor.hasNext(DBCursor.java:330) 
~[graylog.jar:?] at 
org.mongojack.JacksonDBCollection.findOne(JacksonDBCollection.java:1386)
 ~[graylog.jar:?] at 
org.mongojack.JacksonDBCollection.findOne(JacksonDBCollection.java:1356)
 ~[graylog.jar:?] at 
org.mongojack.JacksonDBCollection.findOneById(JacksonDBCollection.java:1304)
 ~[graylog.jar:?] at 
org.mongojack.JacksonDBCollection.findOneById(JacksonDBCollection.java:1291)
 ~[graylog.jar:?] at 
org.graylog.plugins.views.search.db.SearchDbService.get(SearchDbService.java:65)
 ~[graylog.jar:?] at 
org.graylog.plugins.views.search.views.RequiresParameterSupport.test(RequiresParameterSupport.java:43)
 ~[graylog.jar:?] at 
org.graylog.plugins.views.search.views.RequiresParameterSupport.test(RequiresParameterSupport.java:31)
 ~[graylog.jar:?] at 
org.graylog.plugins.views.Requirements.lambda$new$0(Requirements.java:39)
 ~[graylog.jar:?] at 
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
 ~[?:1.8.0_342] at 
java.util.Iterator.forEachRemaining(Iterator.java:116) ~[?:1.8.0_342] at
 
java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
 ~[?:1.8.0_342] at 
java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) 
~[?:1.8.0_342] at 
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
 ~[?:1.8.0_342] at 
java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
 ~[?:1.8.0_342] at 
java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 
~[?:1.8.0_342] at 
java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) 
~[?:1.8.0_342] at 
org.graylog.plugins.views.Requirements.<init>(Requirements.java:41)
 ~[graylog.jar:?] at 
org.graylog.plugins.views.search.views.ViewRequirements.<init>(ViewRequirements.java:31)
 ~[graylog.jar:?] at 
org.graylog.plugins.views.search.views.ViewRequirements$FastClassByGuice$97cefd36.newInstance(<generated>)
 ~[graylog.jar:?] at 
com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
 ~[graylog.jar:?] at 
com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
 ~[graylog.jar:?] at 
com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
 ~[graylog.jar:?] at 
com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
 ~[graylog.jar:?] at 
com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1050) 
~[graylog.jar:?] at 
com.google.inject.assistedinject.FactoryProvider2.invoke(FactoryProvider2.java:836)
 ~[graylog.jar:?] at com.sun.proxy.$Proxy127.create(Unknown Source) 
~[?:?] at 
org.graylog.plugins.views.search.views.ViewService.requirementsForView(ViewService.java:196)
 ~[graylog.jar:?] at 
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
 ~[?:1.8.0_342] at 
java.util.Iterator.forEachRemaining(Iterator.java:116) ~[?:1.8.0_342] at
 
java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
 ~[?:1.8.0_342] at 
java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) 
~[?:1.8.0_342] at 
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
 ~[?:1.8.0_342] at 
java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
 ~[?:1.8.0_342] at 
java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
 ~[?:1.8.0_342] at 
java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 
~[?:1.8.0_342] at 
java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) 
~[?:1.8.0_342] at 
org.graylog2.migrations.V20200803120800_GrantsMigrations.ViewOwnerShipToGrantsMigration.upgrade(ViewOwnerShipToGrantsMigration.java:58)
 ~[graylog.jar:?] at 
org.graylog2.migrations.V20200803120800_GrantsMigrations.GrantsMetaMigration.upgrade(GrantsMetaMigration.java:113)
 ~[graylog.jar:?] at 
org.graylog2.periodical.ConfigurationManagementPeriodical.doRun(ConfigurationManagementPeriodical.java:42)
 [graylog.jar:?] at 
org.graylog2.plugin.periodical.Periodical.run(Periodical.java:77) 
[graylog.jar:?] at java.lang.Thread.run(Thread.java:750) [?:1.8.0_342] 
Caused by: 
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot 
construct instance of`org.graylog.plugins.views.search.searchtypes.pivot.buckets.TimeUnitInterval$Builder`,
 problem: Time unit must be {quantity}{unit}, where quantity is a 
positive number and unit [smhdwM]. at [Source: 
de.undercouch.bson4jackson.io.LittleEndianInputStream@5ef3855e; pos: 
1088] (through reference chain: 
org.graylog.plugins.views.search.AutoValue_Search$Builder["queries"]->org.graylog.plugins.views.search.AutoValue_Query$Builder["search_types"]->java.util.HashSet[1]->org.graylog.plugins.views.search.searchtypes.pivot.AutoValue_Pivot$Builder["row_groups"]->java.util.ArrayList[0]->org.graylog.plugins.views.search.searchtypes.pivot.buckets.AutoValue_Time$Builder["interval"])
 at 
com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:1608)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.DeserializationContext.handleInstantiationProblem(DeserializationContext.java:1073)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BeanDeserializerBase.wrapInstantiationProblem(BeanDeserializerBase.java:1754)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.finishBuild(BuilderBasedDeserializer.java:178)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:216)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:130)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:254)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeSetAndReturn(MethodProperty.java:167)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserializeFromObject(BuilderBasedDeserializer.java:314)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:216)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:130)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:254)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:288)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeSetAndReturn(MethodProperty.java:158)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserializeFromObject(BuilderBasedDeserializer.java:314)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:216)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:130)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:254)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:288)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeSetAndReturn(MethodProperty.java:158)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.vanillaDeserialize(BuilderBasedDeserializer.java:269)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:193)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.datatype.guava.deser.GuavaImmutableCollectionDeserializer._deserializeContents(GuavaImmutableCollectionDeserializer.java:42)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.datatype.guava.deser.GuavaImmutableCollectionDeserializer._deserializeContents(GuavaImmutableCollectionDeserializer.java:14)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.datatype.guava.deser.GuavaCollectionDeserializer.deserialize(GuavaCollectionDeserializer.java:104)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeSetAndReturn(MethodProperty.java:158)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.vanillaDeserialize(BuilderBasedDeserializer.java:269)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:193)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3985)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2343)
 ~[graylog.jar:?] at 
org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:80)
 ~[graylog.jar:?] at 
org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:64)
 ~[graylog.jar:?] ... 76 more Caused by: 
java.lang.IllegalArgumentException: Time unit must be {quantity}{unit}, 
where quantity is a positive number and unit [smhdwM]. at 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:142)
 ~[graylog.jar:?] at 
org.graylog.plugins.views.search.searchtypes.pivot.buckets.TimeUnitInterval$Builder.build(TimeUnitInterval.java:79)
 ~[graylog.jar:?] at 
sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source) ~[?:?] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_342] at java.lang.reflect.Method.invoke(Method.java:498) 
~[?:1.8.0_342] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.finishBuild(BuilderBasedDeserializer.java:176)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:216)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:130)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:254)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeSetAndReturn(MethodProperty.java:167)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserializeFromObject(BuilderBasedDeserializer.java:314)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:216)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:130)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:254)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:288)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeSetAndReturn(MethodProperty.java:158)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserializeFromObject(BuilderBasedDeserializer.java:314)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:216)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:130)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:254)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:288)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeSetAndReturn(MethodProperty.java:158)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.vanillaDeserialize(BuilderBasedDeserializer.java:269)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:193)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.datatype.guava.deser.GuavaImmutableCollectionDeserializer._deserializeContents(GuavaImmutableCollectionDeserializer.java:42)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.datatype.guava.deser.GuavaImmutableCollectionDeserializer._deserializeContents(GuavaImmutableCollectionDeserializer.java:14)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.datatype.guava.deser.GuavaCollectionDeserializer.deserialize(GuavaCollectionDeserializer.java:104)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeSetAndReturn(MethodProperty.java:158)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.vanillaDeserialize(BuilderBasedDeserializer.java:269)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:193)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3985)
 ~[graylog.jar:?] at 
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2343)
 ~[graylog.jar:?] at 
org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:80)
 ~[graylog.jar:?] at 
org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:64)
 ~[graylog.jar:?] ... 76 more `

I can’t find problematic entry in MongoDB, how should I proceed to track it down?

My environment:

  • Graylog Version: 4.0.17-1
  • Java Version: openjdk version “1.8.0_342”
  • Elasticsearch Version: 6.8.23
  • MongoDB Version: 4.2.22
  • Operating System: Ubuntu 18.04.6 LTS

Hello @IdahoPL

By chance are all you plugin the same version ( i.e., updated 4.0.17)?
EDIT: since that was a long upgrade, I also did this while back, ensure you have the correct graylog.conf file, things have changed. If all that is set you could check Mongo.

root#  mongo
mongo > use graylog
mongo > db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )

NOTE: The above command should show the same version that is installed.
If the out put shows Less then the version installed, execute the following command (i.e mongodb3.4 is install)
Execute the following commnad in mongo shell.

mongo >>  db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )

EDIT2: I remember, some issues with GL 4.0 I think we upgrade to 4.1 fix those issues.

EDIT3: Adding on, I did find this in GitHub, maybe it will help.

Thank you for your answer.

All plugins in /usr/share/graylog-server/plugin have 4.0.17 in file names, I don’t use external plugins.

graylog.conf was updated with every Graylog upgrade, diff from default config show only needed adjustments.

I’m using MongoDB 4.2, featureCompatibilityVersion is 4.2, I’ve adjusted it on every MongoDB upgrade since it was introduced (3.4 IIRC).

rs0:PRIMARY> use graylog2
switched to db graylog2
rs0:PRIMARY> db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
{
        "featureCompatibilityVersion" : {
                "version" : "4.2"
        },
        "ok" : 1,
        "$clusterTime" : {
                "clusterTime" : Timestamp(1664614367, 5),
                "signature" : {
                        "hash" : BinData(0,"k6NwDKrCwK3GHkbz9cqVPph+GMI="),
                        "keyId" : NumberLong("7148369247624757250")
                }
        },
        "operationTime" : Timestamp(1664614367, 5)
}

I’m afraid to upgrade to 4.1 with 4.0 not fully upgraded. It seems that somwhere there is some interval set without time unit or something similar. I just can’t find it.

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot 
construct instance of`org.graylog.plugins.views.search.searchtypes.pivot.buckets.TimeUnitInterval$Builder`,
 problem: Time unit must be {quantity}{unit}, where quantity is a 
positive number and unit [smhdwM].

I’ve cleared one by one (and later restored) those collections in MongoDB:

  • alerts
  • dashboards
  • dead_letters
  • event_definitions
  • streamrules
  • streams

and restarted Graylog after clearing single one of them. Migration still failed, so I’ve restored cleared collection and move to another.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.