Graylog 4.0.1 says my ES is 5.0.0 but i'm pretty sure it's 6.8.11

While upgrading to 4.0.1 from latest 3.3 i’m getting a following error:

2020-11-27 13:27:38,265 ERROR: org.graylog2.bootstrap.CmdLineTool - Invalid configuration
com.github.joschi.jadconfig.ValidationException: Invalid Elasticsearch version specified in elasticsearch_version: 5.0.0. Supported versions: [6.0.0, 7.0.0]

but my Elasticsearch is 6.8.11. Is there any way i can fix it?

Have you tried rebooting the Graylog node? IIRC, the code stores the ES version at boot time, so a reboot would pick up that it’s 6.8.1.

but i haven’t changed ES version (6.8.11 since before Graylog 3.3 premiere i believe), just upgraded Graylog to 4.0.1 and this happened, there is no earlier ES version for graylog to store at boot time

BTW: it’s a docker deployment, all official images

Ah, ok. I misunderstood then. Since its docker, are you using compose? Can you post your dockerfile/compose file?

i use the same docker-compose.yml since 2.* with some minor changes:

version: '2.2'
services:
 mongo:
  image: "mongo:4.2.9"
  volumes:
   - /docker/mysql/mongo:/data/db
   - /docker/mysql/mongodump:/dump
  restart: always

 elasticsearch:
  image: "docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.11"
  environment:
   - cluster.name=graylog
   - "ES_JAVA_OPTS=-Xms3g -Xmx3g"
   - bootstrap.memory_lock=true
  restart: always
  volumes:
   - /graylog/data/elasticsearch/graylog:/usr/share/elasticsearch/data/
   - /graylog/plugins/elasticsearch:/usr/share/elasticsearch/plugins
   - /graylog/config/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
  ports:
   - 127.0.0.1:9300:9300
   - 127.0.0.1:9200:9200
  mem_swappiness: 0
  ulimits:
   memlock:
    soft: -1
    hard: -1

 server:
  image: "graylog/graylog:3.3.9-1"
  volumes:
   - /docker/mysql/graylog/journal:/usr/share/graylog/data/journal
   - /graylog/config:/usr/share/graylog/data/config
  restart: always
  cpus: 3
  env_file: env.graylog
  ports:
   - 2055:2055
   - 2055:2055/udp
   - 5044:5044
   - 9000:9000
   - 12900:12900
   - 162:162/udp
   - 162:162
   - 1620:1620/udp
   - 1620:1620
   - 514:514/udp
   - 514:514
   - 12201:12201/udp
   - 12201:12201
   - 6666:6666/udp
  healthcheck:
   timeout: 5s

env.graylog:

GRAYLOG_PASSWORD_SECRET=<redacted>
GRAYLOG_ROOT_PASSWORD_SHA2=<redacted>
GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000
GRAYLOG_HTTP_EXTERNAL_URI=http://graylog.logi/
GRAYLOG_SERVER_JAVA_OPTS=-Xms2g -Xmx2g
GRAYLOG_TRANSPORT_EMAIL_WEB_INTERFACE_URL=http://graylog.logi/
GRAYLOG_TRUSTED_PROXIES=192.168.0.135/32,127.0.0.1/32
GRAYLOG_PROCESSFUFFER_PROCESSORS=2
GRAYLOG_OUPUTBUFFER_PROCESSORS=1

I just changed Graylog version and run docker-compose up -d as always, haven’t noticed anything about es version being 5.0.0 in any of config files i bind-mounted

full error looks like this:

2020-11-28 17:17:24,781 ERROR: org.graylog2.bootstrap.CmdLineTool - Invalid configuration
com.github.joschi.jadconfig.ValidationException: Invalid Elasticsearch version specified in elasticsearch_version: 5.0.0. Supported versions: [6.0.0, 7.0.0]
        at org.graylog2.configuration.validators.ElasticsearchVersionValidator.validate(ElasticsearchVersionValidator.java:35) ~[graylog.jar:?]
        at org.graylog2.configuration.validators.ElasticsearchVersionValidator.validate(ElasticsearchVersionValidator.java:26) ~[graylog.jar:?]
        at com.github.joschi.jadconfig.JadConfig.validateParameter(JadConfig.java:215) ~[graylog.jar:?]
        at com.github.joschi.jadconfig.JadConfig.processClassFields(JadConfig.java:148) ~[graylog.jar:?]
        at com.github.joschi.jadconfig.JadConfig.process(JadConfig.java:99) ~[graylog.jar:?]
        at org.graylog2.bootstrap.CmdLineTool.processConfiguration(CmdLineTool.java:353) [graylog.jar:?]
        at org.graylog2.bootstrap.CmdLineTool.readConfiguration(CmdLineTool.java:346) [graylog.jar:?]
        at org.graylog2.bootstrap.CmdLineTool.run(CmdLineTool.java:180) [graylog.jar:?]
        at org.graylog2.bootstrap.Main.main(Main.java:50) [graylog.jar:?]

like ES version is passed as command line parameter?

i don’t know why but I found elasticsearch_version = 5 in graylog.conf i bind-mounted, everything is working after i commented that line, maybe i was looking in a wrong config file, sorry for making a fuss, and thanks for your time and effort:)

1 Like

Oh! Glad to hear you found the issue! Happy to have helped :slight_smile:

1 Like

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