Problems after upgrade Graylog Open from 5.2.x to 6.0

Hello!

After reading upgrade path to 6.0.x, I installed the latest version of graylog-server (6.0.2-1), but it doesn’t want to start

Here is what says logs:

2024-05-27T12:34:28.879+05:00 ERROR [DbEntitiesCatalog] Two model classes associated with the same mongo collection : DbEntityCatalogEntry[collection=nodes, titleField=node_id, modelClass=class org.graylog2.cluster.nodes.ServerNodeEntity, readPermission=__no_access__] and DbEntityCatalogEntry[collection=nodes, titleField=node_id, modelClass=class org.graylog2.cluster.NodeImpl, readPermission=__no_access__]
2024-05-27T12:34:29.200+05:00 ERROR [CmdLineTool] Guice error (more detail on log level debug): java.lang.IllegalStateException: Two model classes associated with the same mongo collection : DbEntityCatalogEntry[collection=nodes, titleField=node_id, modelClass=class org.graylog2.cluster.nodes.ServerNodeEntity, readPermission=__no_access__] and DbEntityCatalogEntry[collection=nodes, titleField=node_id, modelClass=class org.graylog2.cluster.NodeImpl, readPermission=__no_access__]
2024-05-27T12:34:29.200+05:00 ERROR [CmdLineTool] Startup error:
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) [Guice/ErrorInCustomProvider]: IllegalStateException: Two model classes associated with the same mongo collection : DbEntityCatalogEntry[collection=nodes, titleField=node_id, modelClass=class ServerNodeEntity, readPermission=__no_access__] and DbEntityCatalogEntry[collection=nodes, titleField=node_id, modelClass=class NodeImpl, readPermission=__no_access__]
  while locating DbEntitiesScanner
  at MongoDBModule.configure(MongoDBModule.java:29)
  while locating DbEntitiesCatalog

Learn more:
  https://github.com/google/guice/wiki/ERROR_IN_CUSTOM_PROVIDER

1 error

======================
Full classname legend:
======================
DbEntitiesCatalog:     "org.graylog2.database.dbcatalog.DbEntitiesCatalog"
DbEntitiesScanner:     "org.graylog2.database.dbcatalog.DbEntitiesScanner"
MongoDBModule:         "org.graylog2.bindings.MongoDBModule"
NodeImpl:              "org.graylog2.cluster.NodeImpl"
ServerNodeEntity:      "org.graylog2.cluster.nodes.ServerNodeEntity"
========================
End of classname legend:
========================

        at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:589) ~[graylog.jar:?]
        at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:190) ~[graylog.jar:?]
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:113) ~[graylog.jar:?]
        at com.google.inject.Guice.createInjector(Guice.java:87) ~[graylog.jar:?]
        at org.graylog2.shared.bindings.GuiceInjectorHolder.createInjector(GuiceInjectorHolder.java:34) ~[graylog.jar:?]
        at org.graylog2.bootstrap.CmdLineTool.setupInjector(CmdLineTool.java:530) ~[graylog.jar:?]
        at org.graylog2.bootstrap.CmdLineTool.doRun(CmdLineTool.java:317) ~[graylog.jar:?]
        at org.graylog2.bootstrap.CmdLineTool.run(CmdLineTool.java:267) [graylog.jar:?]
        at org.graylog2.bootstrap.Main.main(Main.java:55) [graylog.jar:?]
Caused by: java.lang.IllegalStateException: Two model classes associated with the same mongo collection : DbEntityCatalogEntry[collection=nodes, titleField=node_id, modelClass=class org.graylog2.cluster.nodes.ServerNodeEntity, readPermission=__no_access__] and DbEntityCatalogEntry[collection=nodes, titleField=node_id, modelClass=class org.graylog2.cluster.NodeImpl, readPermission=__no_access__]
        at org.graylog2.database.dbcatalog.DbEntitiesCatalog.add(DbEntitiesCatalog.java:46) ~[graylog.jar:?]
        at java.base/java.lang.Iterable.forEach(Unknown Source) ~[?:?]
        at org.graylog2.database.dbcatalog.DbEntitiesCatalog.<init>(DbEntitiesCatalog.java:38) ~[graylog.jar:?]
        at org.graylog2.database.dbcatalog.impl.ClassGraphDbEntitiesScanningMethod.scan(ClassGraphDbEntitiesScanningMethod.java:70) ~[graylog.jar:?]
        at org.graylog2.database.dbcatalog.DbEntitiesScanner.get(DbEntitiesScanner.java:55) ~[graylog.jar:?]
        at org.graylog2.database.dbcatalog.DbEntitiesScanner.get(DbEntitiesScanner.java:29) ~[graylog.jar:?]
        at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86) ~[graylog.jar:?]
        at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72) ~[graylog.jar:?]
        at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:60) ~[graylog.jar:?]
        at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:59) ~[graylog.jar:?]
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ~[graylog.jar:?]
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169) ~[graylog.jar:?]
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45) ~[graylog.jar:?]
        at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:213) ~[graylog.jar:?]
        at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:186) ~[graylog.jar:?]
        ... 7 more

System info:
CentOS 7 (kernel 3.10)
Graylog Open: 5.2.5
Elasticsearch: 7.10.2-1
MongoDB: 6.0.12-1

What steps have you already taken to try and solve the problem?

I added ignore_migration_failures = true to the server.conf file but it didn’t help

So what is the problem here and how can I fix it?

Class NodeImpl no longer exists in 6.0. Seems you have a mix of versions.

What should I do to fix it?
Which software/package used Class NodeImp?

NodeImpl existed in 5.2. It disappeared due to refactoring in 6.0.

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