0

This is MacOS 11.6, Docker 20.10.8, docker.elastic.co/elasticsearch/elasticsearch:7.10.1

The process ends with uncaught exception in thread, failed to bind service, Format version is not supported.

{"type": "server", "timestamp": "2021-10-14T22:34:19,526Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "c5bf38c408e2", "message": "loaded module [x-pack-stack]" }
{"type": "server", "timestamp": "2021-10-14T22:34:19,527Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "c5bf38c408e2", "message": "loaded module [x-pack-voting-only-node]" }
{"type": "server", "timestamp": "2021-10-14T22:34:19,528Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "c5bf38c408e2", "message": "loaded module [x-pack-watcher]" }
{"type": "server", "timestamp": "2021-10-14T22:34:19,529Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "c5bf38c408e2", "message": "no plugins loaded" }
{"type": "server", "timestamp": "2021-10-14T22:34:19,627Z", "level": "INFO", "component": "o.e.e.NodeEnvironment", "cluster.name": "docker-cluster", "node.name": "c5bf38c408e2", "message": "using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/vda1)]], net usable_space [46gb], net total_space [58.4gb], types [ext4]" }
{"type": "server", "timestamp": "2021-10-14T22:34:19,628Z", "level": "INFO", "component": "o.e.e.NodeEnvironment", "cluster.name": "docker-cluster", "node.name": "c5bf38c408e2", "message": "heap size [2.4gb], compressed ordinary object pointers [true]" }
uncaught exception in thread [main]
{"type": "server", "timestamp": "2021-10-14T22:34:20,071Z", "level": "ERROR", "component": "o.e.b.ElasticsearchUncaughtExceptionHandler", "cluster.name": "docker-cluster", "node.name": "c5bf38c408e2", "message": "uncaught exception in thread [main]",
"stacktrace": ["org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: IndexFormatTooNewException[Format version is not supported (resource SimpleFSIndexInput(path=\"/usr/share/elasticsearch/data/nodes/0/_state/_90.cfs\") [slice=_90.fdt]): 4 (needs to be between 1 and 3)];",
"at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:174) ~[elasticsearch-7.10.1.jar:7.10.1]",
"at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.10.1.jar:7.10.1]",
"at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.10.1.jar:7.10.1]",
"at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) ~[elasticsearch-cli-7.10.1.jar:7.10.1]",
"at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.10.1.jar:7.10.1]",
"at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.10.1.jar:7.10.1]",
"at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.10.1.jar:7.10.1]",
"Caused by: org.elasticsearch.ElasticsearchException: failed to bind service",
"at org.elasticsearch.node.Node.<init>(Node.java:729) ~[elasticsearch-7.10.1.jar:7.10.1]",
"at org.elasticsearch.node.Node.<init>(Node.java:289) ~[elasticsearch-7.10.1.jar:7.10.1]",
"at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]",
"at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]",
"at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.10.1.jar:7.10.1]",
"at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.10.1.jar:7.10.1]",
"... 6 more",

docker-compose.yml

version:  '3.9'

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
    deploy:
      mode: replicated
      replicas: 1
      resources:
        limits:
          memory: 1536M
    environment:
      - discovery.type=single-node
      - "http.cors.enabled=true"
      - "http.cors.allow-origin=http://localhost:8090"
      - "ES_JAVA_OPTS=-Xms1536m -Xmx1536m"
    ports:
      - "9200:9200"
      - "9300:9300"
    volumes:
      - elasticsearch:/usr/share/elasticsearch/data
    depends_on:
      - postgres
    healthcheck:
      test: [ "CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1" ]
      interval: 30s
      timeout: 30s
      retries: 5
5
  • 1
    It sounds like it is getting tripped up by an existing file in a newer version... How are you running the image, are you using an existing volume or bind mount? Commented Oct 15, 2021 at 4:32
  • No external mounts. Only a volume is defined in the docker-compose.yml file. Commented Oct 18, 2021 at 12:48
  • I added the docker-compose.yml to the post. Commented Oct 18, 2021 at 12:52
  • Looked at the files in the volume. Only one is big-endian, a DB file. The binaries are x86-64 to match the CPU in the Mac, Intel. This looks like it could be normal. /usr/share/elasticsearch/modules/ingest-geoip/GeoLite2-ASN.mmdb: a.out big-endian 32-bit demand paged executable not stripped Commented Oct 18, 2021 at 13:12
  • Thanks for the clue @NicolasGaller, it seems to have solved it by changing the volume and the healthcheck. Commented Oct 18, 2021 at 15:01

1 Answer 1

1

I was able to resolve the problem by changing the volume path and the healthcheck in the YML.

docker-compose.yml

volumes:
  - ./esdata:/usr/share/elasticsearch/data
healthcheck:
  test: [ "CMD-SHELL", "curl --silent --fail localhost:9200/_cat/nodes?v\\&pretty || exit 1" ]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.