Elastic run by Docker on Windows Server fails, when Docker upgraded to 2.2.0

I'm not sure, if running elastic on Docker on Windows Server 2019 is a recommended setup.
But that's what I have and so far it was working very stable.

Today, I upgraded Docker to 2.2.0, and Elastic fails to start. Here is an error:

"stacktrace": ["org.apache.lucene.store.AlreadyClosedException: Underlying file changed by an external force at 1970-01-01T00:00:00Z, (lock=NativeFSLock(path=/usr/share/elasticsearch/data/nodes/0/indices/5NN-qYSZSCyohxYdnoZTXg/0/index/write.l ock,impl=sun.nio.ch.FileLockImpl...

Looks like Docker changed, how it mounts storage in Windows:

And that breaks existing Elastic installation.

I uninstalled Docker 2.2.0, installed 2.1.0 and got my elastic back. No data loss.

If you install elastic from scratch, may be it will work with Docker 2.2.0. Looks like upgrade is breaking it for sure.

Here is my Elastic Docker definition:

version: '3.4'

services:
  elasticsearch:
    build:
      context: elasticsearch/
      args:
        ELK_VERSION:  7.5.0
    volumes:
    - ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
    - C:\Users\slavik\code\elk-docker\storage:/usr/share/elasticsearch/data
    ports:
    - "9200:9200"
    environment:
      ES_JAVA_OPTS: "-Xms512m -Xmx512m"
      bootstrap.memory_lock: "true"
    ulimits:
      memlock:
        soft: -1
        hard: -1
1 Like

Thank you for this post, saved me a lot of time.

I built my ELK 7.5.2 stack with Docker 2.2.0.0 completely fresh on W10 (1909), it was still subject to this issue. It does work with Docker 2.1.0.5 as you suggest. Got the Docker versions here.

Thanks again.

1 Like

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