Graylog upgrade 3.1.4 to 4.0

Hi everyone,

I’m trying to upgrade from Graylog Community 3.1.4 to Graylog Open 4.0. I followed the official upgrade documentation. Elasticsearch and MongoDB are upgraded as well with the official documentation on their website. These upgrades have been succesful. The Graylog 4.0 upgrade also is executed succesfully, however the service doesn’t start. My errorlog doesn’t show much. The only thing I can see is:

Exception in thread “main” java.lang.NoClassDefFoundError: org/graylog2/security/realm/LdapUserAuthenticator`

We use Graylog with LDAP authentication. I have found a similar thread that says I have to upgrade the packages for integration and enterprise. Unfortunately that doesn’t work.

Our Graylog server runs as as virtual machine on top of the Proxmox hypervisor.
OS: Ubuntu 20.04LTS
RAM: 8GB
CPU: 12 CPU’s (3,8GHz)

The steps I’ve taken:

  • Upgrade Elasticsearch from 5.6.16 to 6.8.15
  • Upgrade MongoDB from 3 to 4 (with steps in between, 3 → 3.2 → 3.4 → 3.6 → 4.0)
  • Upgrade Graylog from 3.1.4 to 4.0

I’ve tried to keep the existing config, but also tried with a “brand new” one from the new official package, re-entered all details.

Elasticsearch:

{
“name” : “AR6JzFX”,
“cluster_name” : “elasticsearch”,
“cluster_uuid” : “lZtT9yPQTJekO-PBmnkTVA”,
“version” : {
“number” : “6.8.15”,
“build_flavor” : “default”,
“build_type” : “deb”,
“build_hash” : “c9a8c60”,
“build_date” : “2021-03-18T06:33:32.588487Z”,
“build_snapshot” : false,
“lucene_version” : “7.7.3”,
“minimum_wire_compatibility_version” : “5.6.0”,
“minimum_index_compatibility_version” : “5.0.0”
},
“tagline” : “You Know, for Search”
}

Elasticsearch status:

elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-05-20 10:09:03 CEST; 1 weeks 0 days ago
Docs: http://www.elastic.co
Main PID: 2997 (java)
Tasks: 146 (limit: 4612)
Memory: 1.4G
CGroup: /system.slice/elasticsearch.service
├─2997 /usr/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:>
└─3171 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller

May 20 10:09:03 srv-graylog-01 systemd[1]: Started Elasticsearch.
May 20 10:09:03 srv-graylog-01 elasticsearch[2997]: warning: Falling back to java on path. This behavior is deprec

MongoDB:

db version v3.6.23
git version: d352e6a4764659e0d0350ce77279de3c1f243e5c
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
allocator: tcmalloc
modules: none
build environment:
distmod: ubuntu1804
distarch: x86_64
target_arch: x86_64

MongoDB status:

mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: active (running) since Thu 2021-05-20 11:28:06 CEST; 1 weeks 0 days ago
Docs: https://docs.mongodb.org/manual
Main PID: 4607 (mongod)
Memory: 54.9M
CGroup: /system.slice/mongod.service
└─4607 /usr/bin/mongod --config /etc/mongod.conf

May 20 11:28:06 srv-graylog-01 systemd[1]: Started MongoDB Database Server.

Graylog logs:

May 27 11:58:41 srv-graylog-01 systemd[1]: Started Graylog server.
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: Exception in thread “main” java.lang.NoClassDefFoundError: org/graylog2/security/realm/LdapUserAuthenticator
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at java.lang.Class.getDeclaredConstructors0(Native Method)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at java.lang.Class.getDeclaredConstructors(Class.java:2020)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:115)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:706)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:930)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:852)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:291)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:222)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:938)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at com.google.inject.internal.FactoryProxy.notify(FactoryProxy.java:48)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at com.google.inject.internal.ProcessedBindingData.runCreationListeners(ProcessedBindingData.java:60)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:133)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at com.google.inject.Guice.createInjector(Guice.java:87)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at org.graylog2.shared.bindings.GuiceInjectorHolder.createInjector(GuiceInjectorHolder.java:34)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at org.graylog2.bootstrap.CmdLineTool.setupInjector(CmdLineTool.java:381)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at org.graylog2.bootstrap.CmdLineTool.run(CmdLineTool.java:196)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at org.graylog2.bootstrap.Main.main(Main.java:50)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: Caused by: java.lang.ClassNotFoundException: org.graylog2.security.realm.LdapUserAuthenticator
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
May 27 11:58:44 srv-graylog-01 graylog-server[1402577]: #011… 20 more
May 27 11:58:44 srv-graylog-01 systemd[1]: graylog-server.service: Main process exited, code=exited, status=1/FAILURE
May 27 11:58:44 srv-graylog-01 systemd[1]: graylog-server.service: Failed with result ‘exit-code’.

Can anyone point me in the right direction?

Thank you for your time.

Jeffrey

So I’ve solved it…
After many hours of trying to debug this I’ve found that the previous used plugin for SSO (graylog-plugin-auth-sso-VERSIONNUMBER) has to be removed from the plugins folder located at:

/usr/share/graylog-server/plugin/

After removal, Graylog 4 started just fine…

Hopefully this is helpful for someone else in the future.

Jeffrey

1 Like

Thank you for sharing

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