Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading from 5.2 to 6.0 causes SnmpUDPInput pluging to fail (Guice/MissingConstructor and Guice/MissingImplementation) #19521

Closed
braiam opened this issue Jun 1, 2024 · 3 comments
Labels

Comments

@braiam
Copy link

braiam commented Jun 1, 2024

Upgrading from 5.2.7 to 6.0.2 causes the server to not start at all. This is done using Graylog provided Debian packages.

Jun 01 03:03:40 graylog01 graylog-server[361278]: Exception in thread "main" com.google.inject.CreationException: Unable to create injector, see the following errors:
Jun 01 03:03:40 graylog01 graylog-server[361278]: 1) [Guice/MissingConstructor]: No injectable constructor for type SnmpUDPInput$Config.
Jun 01 03:03:40 graylog01 graylog-server[361278]: class SnmpUDPInput$Config does not have a @Inject annotated constructor or a no-arg constructor.
Jun 01 03:03:40 graylog01 graylog-server[361278]: Requested by:
Jun 01 03:03:40 graylog01 graylog-server[361278]: 1  : SnmpUDPInput$Config.class(SnmpUDPInput.java:58)
Jun 01 03:03:40 graylog01 graylog-server[361278]:      while locating SnmpUDPInput$Config
Jun 01 03:03:40 graylog01 graylog-server[361278]:      at SnmpUDPInput$Factory.getConfig(SnmpUDPInput.java:36)
Jun 01 03:03:40 graylog01 graylog-server[361278]: Learn more:
Jun 01 03:03:40 graylog01 graylog-server[361278]:   https://github.com/google/guice/wiki/MISSING_CONSTRUCTOR
Jun 01 03:03:40 graylog01 graylog-server[361278]: 2) [Guice/MissingImplementation]: No implementation for SnmpUDPInput$Factory was bound.
Jun 01 03:03:40 graylog01 graylog-server[361278]: Requested by:
Jun 01 03:03:40 graylog01 graylog-server[361278]: 1  : Graylog2Module.installInput(Graylog2Module.java:235)
Jun 01 03:03:40 graylog01 graylog-server[361278]:       \_ installed by: PluginBindings -> SnmpPluginModule
Jun 01 03:03:40 graylog01 graylog-server[361278]: Learn more:
Jun 01 03:03:40 graylog01 graylog-server[361278]:   https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION
Jun 01 03:03:40 graylog01 graylog-server[361278]: 2 errors
Jun 01 03:03:40 graylog01 graylog-server[361278]: ======================
Jun 01 03:03:40 graylog01 graylog-server[361278]: Full classname legend:
Jun 01 03:03:40 graylog01 graylog-server[361278]: ======================
Jun 01 03:03:40 graylog01 graylog-server[361278]: Graylog2Module:       "org.graylog2.plugin.inject.Graylog2Module"
Jun 01 03:03:40 graylog01 graylog-server[361278]: PluginBindings:       "org.graylog2.shared.bindings.PluginBindings"
Jun 01 03:03:40 graylog01 graylog-server[361278]: SnmpPluginModule:     "org.graylog.snmp.SnmpPluginModule"
Jun 01 03:03:40 graylog01 graylog-server[361278]: SnmpUDPInput$Config:  "org.graylog.snmp.input.SnmpUDPInput$Config"
Jun 01 03:03:40 graylog01 graylog-server[361278]: SnmpUDPInput$Factory: "org.graylog.snmp.input.SnmpUDPInput$Factory"
Jun 01 03:03:40 graylog01 graylog-server[361278]: ========================
Jun 01 03:03:40 graylog01 graylog-server[361278]: End of classname legend:
Jun 01 03:03:40 graylog01 graylog-server[361278]: ========================
Jun 01 03:03:40 graylog01 graylog-server[361278]:         at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:589)
Jun 01 03:03:40 graylog01 graylog-server[361278]:         at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:163)
Jun 01 03:03:40 graylog01 graylog-server[361278]:         at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
Jun 01 03:03:40 graylog01 graylog-server[361278]:         at com.google.inject.Guice.createInjector(Guice.java:87)
Jun 01 03:03:40 graylog01 graylog-server[361278]:         at org.graylog2.shared.bindings.GuiceInjectorHolder.createInjector(GuiceInjectorHolder.java:34)
Jun 01 03:03:40 graylog01 graylog-server[361278]:         at org.graylog2.bootstrap.CmdLineTool.setupInjector(CmdLineTool.java:530)
Jun 01 03:03:40 graylog01 graylog-server[361278]:         at org.graylog2.bootstrap.CmdLineTool.doRun(CmdLineTool.java:317)
Jun 01 03:03:40 graylog01 graylog-server[361278]:         at org.graylog2.bootstrap.CmdLineTool.run(CmdLineTool.java:267)
Jun 01 03:03:40 graylog01 graylog-server[361278]:         at org.graylog2.bootstrap.Main.main(Main.java:55)
Jun 01 03:03:40 graylog01 systemd[1]: graylog-server.service: Main process exited, code=exited, status=1/FAILURE
Jun 01 03:03:40 graylog01 systemd[1]: graylog-server.service: Failed with result 'exit-code'.

Your Environment

  • Graylog Version: 6.0.x
  • Java Version: openjdk 17.0.11 2024-04-16
@braiam braiam added the bug label Jun 1, 2024
@chalfling
Copy link

chalfling commented Jun 3, 2024

Same here.

Java: openjdk 17.0.4 2022-08-12

1) [Guice/MissingImplementation]: No implementation for Map<SearchVersion, Provider<SecurityAdapter>> was bound.

Did you mean?
    * SecurityAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:79)

    * SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30)

    * SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersOverrideModule.registerParameters(NamedConfigParametersOverrideModule.java:109)

Requested by:
1  : SecurityAdapterProvider.<init>(SecurityAdapterProvider.java:31)
      \_ for 2nd parameter
     at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:79)

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

1 error

======================
Full classname legend:
======================
DetectedSearchVersion:               "org.graylog2.storage.DetectedSearchVersion"
ElasticsearchModule:                 "org.graylog2.bindings.ElasticsearchModule"
Named:                               "com.google.inject.name.Named"
NamedConfigParametersOverrideModule: "org.graylog2.bindings.NamedConfigParametersOverrideModule"
Provider:                            "jakarta.inject.Provider"
SearchVersion:                       "org.graylog2.storage.SearchVersion"
SecurityAdapter:                     "org.graylog2.indexer.security.SecurityAdapter"
SecurityAdapterProvider:             "org.graylog2.storage.providers.SecurityAdapterProvider"
VersionAwareStorageModule:           "org.graylog2.storage.VersionAwareStorageModule"
========================
End of classname legend:
========================

@thll
Copy link
Contributor

thll commented Jun 4, 2024

Can you please try if the server starts when you remove the SNMP plugin from the plugin directory? The plugin is probably not actively maintained and does not support the current version of Graylog. See also this thread in the community forum.

@braiam
Copy link
Author

braiam commented Jun 4, 2024

Yes, removing the plugin allows Graylog to start. I guess the solution is to remove it. Will have to look for solutions to the SNMP trap usecase.

@braiam braiam closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants