Docker image 4.0.2-1 won't start - No implementation for java.util.Map<org.graylog2.plugin.Version, javax.inject.Provider<org.graylog.events.search.MoreSearchAdapter>> was bound
juliohm1978 opened this issue · 6 comments
Just upgraded from 4.0.1-1 to 4.0.2-1 in my Kubernetes cluster, and the new Docker images seems won't start.
2021-01-28 18:17:40,213 ERROR [CmdLineTool] - Guice error (more detail on log level debug): No implementation for java.util.Map<org.graylog2.plugin.Version, javax.inject.Provider<org.graylog.events.search.MoreSearchAdapter>> was bound.
Did you mean?
org.graylog2.plugin.Version annotated with @com.google.inject.name.Named(value=elasticsearch_version) bound at com.github.joschi.jadconfig.guice.NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80)
org.graylog.events.search.MoreSearchAdapter bound at org.graylog2.storage.VersionAwareStorageModule.configure(VersionAwareStorageModule.java:54)
org.graylog2.plugin.Version annotated with interface org.graylog2.storage.ElasticsearchVersion bound at org.graylog2.bindings.ElasticsearchModule.configure(ElasticsearchModule.java:28)
- {}
Reverting back to 4.0.1-1 fixes the issue.
Could this be related?
Graylog2/graylog2-server#9521
Uh oh. It's probably my fault. Biggest change we made was #148, so I'd guess it's related to that in some way. It starts up for me fine in docker-compose, though.
Are you setting GRAYLOG_PLUGIN_DIR
to anything? What do your volume mounts look like? Are you adding any plugins, and what versions are they?
I think the issue you mentioned probably is related, as it sounds like your instance isn't loading the plugins properly.
We wanted to give people the ability to mount the plugins
dir as a volume without losing the bundled plugins. We created a couple new plugin directories
/usr/share/graylog/plugins
- This is the old plugins dir. You should now be able to mount this as a volume and put whatever plugins you want there./usr/share/graylog/plugins-default
- We moved the default plugins into this directory, so they don't disappear when theplugins
dir is mounted as a volume./usr/share/graylog/plugins-merged
- We setGRAYLOG_PLUGIN_DIR
to this indocker-entrypoint.sh
and copy plugins from both of the above dirs into this one.
Are you using a custom entrypoint or a different docker-entrypoint.sh
? This line should set the correct plugins dir for you:
https://github.com/Graylog2/graylog-docker/blob/4.0.2-1/docker-entrypoint.sh#L75
Hi.
My setup follows the helm chart from kongz/graylog. So, it uses whatever voumes that chart is creating >> graylog-pod.yaml.zip
volumeMounts:
- mountPath: /usr/share/graylog/data/journal
name: journal
- mountPath: /usr/share/graylog/config
name: config
- mountPath: /entrypoint.sh
name: entrypoint
subPath: entrypoint.sh
- mountPath: /k8s
name: kubectl
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: graylog-deploy-token-dbsm7
readOnly: true
Even without volumes mounted into /usr/share/graylog/plugins-default
, there seems to be content in there from the image itself. We never installed any plugins manually.
graylog@graylog-deploy-1:~$ ls -l /usr/share/graylog/plugins-default
total 85772
-rw-r--r-- 1 graylog graylog 20239819 Jan 27 14:42 graylog-plugin-aws-4.0.2.jar
-rw-r--r-- 1 graylog graylog 6463542 Jan 27 14:41 graylog-plugin-collector-4.0.2.jar
-rw-r--r-- 1 graylog graylog 7997125 Jan 27 14:43 graylog-plugin-threatintel-4.0.2.jar
-rw-r--r-- 1 graylog graylog 23274748 Jan 27 14:39 graylog-storage-elasticsearch6-4.0.2.jar
-rw-r--r-- 1 graylog graylog 29839509 Jan 27 14:39 graylog-storage-elasticsearch7-4.0.2.jar
/usr/share/graylog/plugins-merged
is empty.
/usr/share/graylog/plugins
no longer exists.
GRAYLOG_PLUGIN_DIR
is empty.
The chart does use a custom entrypoint, though. It comes from a configmap mounted into /entrypoint.sh
inside the container.
https://github.com/KongZ/charts/blob/main/charts/graylog/templates/configmap.yaml
May that needs patching?
Yeah, that's the problem. #148 added this to docker-entrypoint.sh
:
# Merge plugin dirs to allow mounting of /plugin as a volume
export GRAYLOG_PLUGIN_DIR=/usr/share/graylog/plugins-merged
rm -f /usr/share/graylog/plugins-merged/*
find /usr/share/graylog/plugins-default/ -type f -exec cp {} /usr/share/graylog/plugins-merged/ \;
find /usr/share/graylog/plugin/ -type f -exec cp {} /usr/share/graylog/plugins-merged/ \;
But since the helm chart uses a different entrypoint, it's missing that code. I think that configmap.yaml
definitely needs updating.
I think we can close this and raise the issue on the chart maintenance. Thank you!
is that issue also related to Linux OS?
I have updated Graylog from 3.3 to 4.0 and getting the same error?
graylog-server-4.2.6
mongodb-org-4.0.28
elasticsearch-6.8.13
ERROR:
Guice error (more detail on log level debug): No implementation for java.util.Map<org.graylog2.plugin.Version, javax.inject.Provider<org.graylog.events.search.MoreSearchAdapter>> was bound
Guice error (more detail on log level debug): No implementation for java.util.Map<org.graylog2.plugin.Version, javax.inject.Provider<org.graylog.plugins.views.search.engine.QueryBackend<? extends org.graylog.plugins.views.search.engine.GeneratedQueryContext>>> was bound