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

**URL:** <https://discuss.elastic.co/t/elastic-run-by-docker-on-windows-server-fails-when-docker-upgraded-to-2-2-0/216149>\
**Category:** Elasticsearch\
**Tags:** docker, windows\
**Created:** [January 22, 2020, 10:54pm UTC](https://discuss.elastic.co/t/elastic-run-by-docker-on-windows-server-fails-when-docker-upgraded-to-2-2-0/216149 "2020-01-22T22:54:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slavik\_Fursov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/slavik_fursov/32/48975_2.png) [@Slavik\_Fursov](https://discuss.elastic.co/u/Slavik_Fursov)\
**Post date:** [January 22, 2020, 10:54pm UTC](https://discuss.elastic.co/t/elastic-run-by-docker-on-windows-server-fails-when-docker-upgraded-to-2-2-0/216149/1 "2020-01-22T22:54:02Z")

</div>

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:

> **[New Filesharing Implementation in Docker Desktop Windows Improves Developer...](https://www.docker.com/blog/new-filesharing-implementation-in-docker-desktop-windows/)**
>
> The latest Edge release of Docker Desktop for Windows 2.1.7.0 has a completely new filesharing implementation using Filesystem in Userspace (FUSE) instead of Samba.

> **[Deep Dive Into the New Docker Desktop filesharing Implementation Using FUSE |...](https://www.docker.com/blog/deep-dive-into-new-docker-desktop-filesharing-implementation/)**
>
> The latest Edge release of Docker Desktop for Windows 2.1.7.0 has a completely new filesharing system using FUSE instead of Samba. Part 1 in the series presented the performance improvements and explains how to give feedback. Part 2 gives more...

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:

```auto
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

```

---

<div class="post-metadata">

**Author:** ![c1jt](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@c1jt](https://discuss.elastic.co/u/c1jt)\
**Post date:** [February 11, 2020, 10:15am UTC](https://discuss.elastic.co/t/elastic-run-by-docker-on-windows-server-fails-when-docker-upgraded-to-2-2-0/216149/2 "2020-02-11T10:15:55Z")

</div>

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](https://docs.docker.com/docker-for-windows/release-notes/).

Thanks again.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 10, 2020, 10:16am UTC](https://discuss.elastic.co/t/elastic-run-by-docker-on-windows-server-fails-when-docker-upgraded-to-2-2-0/216149/3 "2020-03-10T10:16:19Z")

</div>

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