charts icon indicating copy to clipboard operation
charts copied to clipboard

Support for Graylog 5.x

Open pschichtel opened this issue 3 years ago • 12 comments

When upgrading the image to 5.0.1 graylog fails to start up with the following message:

Unrecognized VM option 'UseCGroupMemoryLimitForHeap'

I guess the reason for this is that fact that graylog 5 runs on Java 17.

Other significant changes in graylog 5:

  • Minimum MongoDB version is now 5, with support for 6.
  • Support for OpenSearch 2.x has been added.

pschichtel avatar Dec 31 '22 23:12 pschichtel

I am facing the same issue, but one thing to note is that 4.3.8 already supports mongodb 5.x so I was able to upgrade mongodb and still run the 4.3.8.

as @pschichtel said it crashes on the uncrecognized option

mazmar avatar Jan 02 '23 08:01 mazmar

I removed the option in a local copy of the chart and graylog starts up as expected, but I'm still facing other issues while attempting to use OpenSearch (using the opensearch operator). Once I have it running I intent to open a PR.

pschichtel avatar Jan 02 '23 11:01 pschichtel

4.3.8 already supports mongodb 5.x

@mazmar do you have a source for this?

pschichtel avatar Jan 02 '23 13:01 pschichtel

Ok found it.

The Graylog 5 upgrade documentation confirms it: https://go2docs.graylog.org/5-0/upgrading_graylog/upgrading_graylog.html#version-compatibility The Graylog 4.x installation documentation does not list it, but I guess they haven't updated that one: https://go2docs.graylog.org/4-x/downloading_and_installing_graylog/installing_graylog.html

pschichtel avatar Jan 02 '23 13:01 pschichtel

Sorry, yes you are correct they did not update the documentation for 4.x I did not notice that. I only checked the upgrade instructions last week.

Anyway, I've set the heap manually as it said in values.yaml and it doesn't use the option UseCGroupMemoryLimitForHeap. It started correctly after that and I didn't need to adjust anything else. I am running unsupported ES 7.14.

Only problem is that after upgrading mongo to last version 5 from bitnami the arbitter is broken :( but that is not part of this chart. I will upgrade to mongo 6 this week.

mazmar avatar Jan 03 '23 07:01 mazmar

I was able to upgrade also by just setting the heapSize in value.yaml file.

dsiperek-vendavo avatar Jan 12 '23 21:01 dsiperek-vendavo

Hi there. I followed your steps:

  • set heapSize
  • used last bitnami mongodb (version 6.0.3) chart
  • used opensearch 2.3.0 deployed with official helm chart
  • Graylog image: graylog/graylog:5.0.2

It almost worked, but it gets stuck in this point: /entrypoint.sh: line 56: 37 Killed "${JAVA_HOME}/bin/java" ${GRAYLOG_SERVER_JAVA_OPTS} -jar -Dlog4j.configurationFile=${GRAYLOG_HOME}/config/log4j2.xml -Djava.library.path=${GRAYLOG_HOME}/lib/sigar/ -Dgraylog2.installation_source=docker ${GRAYLOG_HOME}/graylog.jar server -f ${GRAYLOG_HOME}/config/graylog.conf

I feel that maybe is the ${GRAYLOG_SERVER_JAVA_OPTS} parameter in -jar on the entrypoint.sh https://github.com/KongZ/charts/blob/4e9167072434933f0790ad83ca962ae8665a3c6f/charts/graylog/templates/configmap.yaml#L241

Could you help me?

pauronda-visma avatar Jan 16 '23 14:01 pauronda-visma

Hi again, sorry for bothering you.

It worked after modifying entrypoint.sh

I hardcoded the Java VM options from graylog 5 docker repository and worked.

-Dlog4j2.formatMsgNoLookups=true -Djdk.tls.acknowledgeCloseNotify=true -XX:+UnlockExperimentalVMOptions -XX:-OmitStackTraceInFastThrow -XX:+UseG1GC -server

More info: https://github.com/Graylog2/graylog-docker/blob/56c630a6c43a98b49802555bea314cf132f1a86a/docker/oss/Dockerfile#L67

EDIT: I realized it can be passed as a value using greylog.javaOpts https://github.com/KongZ/charts/blob/3e07a732eb17d2c0492a3c974cbd25768c6af113/charts/graylog/values.yaml#L62

pauronda-visma avatar Jan 16 '23 15:01 pauronda-visma

@pauronda-visma Intersting. for me it started, but the UI was unable to perform search API requests against the OpenSearch instance. I haven't been able to get back to my local setup for this.

pschichtel avatar Jan 16 '23 16:01 pschichtel

Same was for me, but after removing the value graylog.elasticsearch.version on values.yaml it worked for me. https://github.com/KongZ/charts/blob/main/charts/graylog/values.yaml#L403

More info: https://github.com/KongZ/charts/issues/133 https://github.com/Graylog2/graylog2-server/issues/14236

pauronda-visma avatar Jan 19 '23 13:01 pauronda-visma

Error, not connecting to opensearch cluster

image

luizjr avatar Jan 26 '23 11:01 luizjr

I managed to update, and I made a pull request.

https://github.com/KongZ/charts/pull/138

luizjr avatar Jan 26 '23 16:01 luizjr