New Installation on CentOS 7 Failing - Injector Creation Failed

Hi,

Just completed a new installation of GrayLog 4 via the official Ansible. The install went smoothly, but Graylog will not start at all. Elastic and Mongo are running successfully. This is on SELinux enforcing CentOS 7 system, fully patched.

Below is the error output from GrayLog:

2021-06-24T19:14:38.171-04:00 ERROR [CmdLineTool] Injector creation failed!
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Unable to load cache item
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2051) ~[graylog.jar:?]
        at com.google.common.cache.LocalCache.get(LocalCache.java:3951) ~[graylog.jar:?]
        at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974) ~[graylog.jar:?]
        at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958) ~[graylog.jar:?]
        at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4964) ~[graylog.jar:?]
        at com.google.inject.internal.FailableCache.get(FailableCache.java:51) ~[graylog.jar:?]
        at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:48) ~[graylog.jar:?]
        at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:155) ~[graylog.jar:?]
        at com.google.inject.internal.InjectorImpl.initializeBinding(InjectorImpl.java:581) ~[graylog.jar:?]
        at com.google.inject.internal.AbstractBindingProcessor$Processor$1.run(AbstractBindingProcessor.java:176) ~[graylog.jar:?]
        at com.google.inject.internal.ProcessedBindingData.initializeBindings(ProcessedBindingData.java:49) ~[graylog.jar:?]
        at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:122) ~[graylog.jar:?]
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106) ~[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:381) [graylog.jar:?]
        at org.graylog2.bootstrap.CmdLineTool.run(CmdLineTool.java:196) [graylog.jar:?]
        at org.graylog2.bootstrap.Main.main(Main.java:50) [graylog.jar:?]
Caused by: java.lang.IllegalStateException: Unable to load cache item
        at com.google.inject.internal.cglib.core.internal.$LoadingCache.createEntry(LoadingCache.java:79) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.core.internal.$LoadingCache.get(LoadingCache.java:34) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:291) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.reflect.$FastClass$Generator.create(FastClass.java:65) ~[graylog.jar:?]
        at com.google.inject.internal.BytecodeGen.newFastClassForMember(BytecodeGen.java:258) ~[graylog.jar:?]
        at com.google.inject.internal.BytecodeGen.newFastClassForMember(BytecodeGen.java:207) ~[graylog.jar:?]
        at com.google.inject.internal.DefaultConstructionProxyFactory.create(DefaultConstructionProxyFactory.java:49) ~[graylog.jar:?]
        at com.google.inject.internal.ProxyFactory.create(ProxyFactory.java:156) ~[graylog.jar:?]
        at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:92) ~[graylog.jar:?]
        at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29) ~[graylog.jar:?]
        at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37) ~[graylog.jar:?]
        at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33) ~[graylog.jar:?]
        at com.google.inject.internal.FailableCache$1.load(FailableCache.java:40) ~[graylog.jar:?]
        at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529) ~[graylog.jar:?]
        at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278) ~[graylog.jar:?]
        at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155) ~[graylog.jar:?]
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045) ~[graylog.jar:?]
        ... 17 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$MethodWrapper
        at com.google.inject.internal.cglib.core.$DuplicatesPredicate.evaluate(DuplicatesPredicate.java:104) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.core.$CollectionUtils.filter(CollectionUtils.java:52) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.reflect.$FastClassEmitter.<init>(FastClassEmitter.java:69) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.reflect.$FastClass$Generator.generateClass(FastClass.java:77) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.core.$DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.core.$AbstractClassGenerator.generate(AbstractClassGenerator.java:329) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.core.internal.$LoadingCache$2.call(LoadingCache.java:54) ~[graylog.jar:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at com.google.inject.internal.cglib.core.internal.$LoadingCache.createEntry(LoadingCache.java:61) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.core.internal.$LoadingCache.get(LoadingCache.java:34) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:291) ~[graylog.jar:?]
        at com.google.inject.internal.cglib.reflect.$FastClass$Generator.create(FastClass.java:65) ~[graylog.jar:?]
        at com.google.inject.internal.BytecodeGen.newFastClassForMember(BytecodeGen.java:258) ~[graylog.jar:?]
        at com.google.inject.internal.BytecodeGen.newFastClassForMember(BytecodeGen.java:207) ~[graylog.jar:?]
        at com.google.inject.internal.DefaultConstructionProxyFactory.create(DefaultConstructionProxyFactory.java:49) ~[graylog.jar:?]
        at com.google.inject.internal.ProxyFactory.create(ProxyFactory.java:156) ~[graylog.jar:?]
        at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:92) ~[graylog.jar:?]
        at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29) ~[graylog.jar:?]
        at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37) ~[graylog.jar:?]
        at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33) ~[graylog.jar:?]
        at com.google.inject.internal.FailableCache$1.load(FailableCache.java:40) ~[graylog.jar:?]
        at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529) ~[graylog.jar:?]
        at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278) ~[graylog.jar:?]
        at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155) ~[graylog.jar:?]
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045) ~[graylog.jar:?]
        ... 17 more
2021-06-24T19:14:38.177-04:00 ERROR [CmdLineTool] Injector could not be created, exiting! (Please include the previous error messages in bug reports.)

Any assistance is greatly appreciated! I have installed Graylog before and it’s always worked well, wondering why it’s stuck now.

Hello & welcome.

Not sure what you did check but here is a couple suggestion.
Make sure Graylog has permission
# chown graylog:graylog -R /etc/graylog/
# systemctl restart graylog-server

NEXT
Since you have SElinux on, what do you see when you execute this.

# sealert -a /var/log/audit/audit.log

That will also give you instructions on how to resolves any issues shown.

It might be a configure issue. If you can, post your configuration setting?

And last have you tried turning off and back on :smiley:

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