# Troubles with docker compose + image elasticsearch:6.8.0

**URL:** <https://discuss.elastic.co/t/troubles-with-docker-compose-image-elasticsearch-6-8-0/221493>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [February 28, 2020, 9:47pm UTC](https://discuss.elastic.co/t/troubles-with-docker-compose-image-elasticsearch-6-8-0/221493 "2020-02-28T21:47:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andres\_Guerrero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andres_guerrero/32/63556_2.png) [@Andres\_Guerrero](https://discuss.elastic.co/u/Andres_Guerrero)\
**Post date:** [February 28, 2020, 9:47pm UTC](https://discuss.elastic.co/t/troubles-with-docker-compose-image-elasticsearch-6-8-0/221493/1 "2020-02-28T21:47:38Z")

</div>

Hello,

i was trying to upgrade the version from my elastic image, from 5.6 to 6.8.0 but when i run `ddev start`, the ES container was not getting up.

Then, i checked my logs and found this:

> OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.  
> OpenJDK 64-Bit Server VM warning: UseAVX=2 is not supported on this CPU, setting it to UseAVX=1  
> [2020-02-28T21:32:29,269][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [unknown] uncaught exception in thread [main]  
> org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max\_local\_storage\_nodes] (was [1])?  
> at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-6.8.0.jar:6.8.0]  
> at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-6.8.0.jar:6.8.0]  
> at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.8.0.jar:6.8.0]  
> at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.8.0.jar:6.8.0]  
> at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.8.0.jar:6.8.0]  
> at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) ~[elasticsearch-6.8.0.jar:6.8.0]  
> at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.8.0.jar:6.8.0]  
> Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max\_local\_storage\_nodes] (was [1])?

Additionally, i cannot use `mem_limit` parameter because i'm using the latest version 3.0

> docker-compose.elasticsearch.yaml

```
version: '3.6'
services:
  elasticsearch:
    container_name: ddev-${DDEV_SITENAME}-elasticsearch
    hostname: ${DDEV_SITENAME}-elasticsearch
    image: elasticsearch:6.8.0
    ports:
      - "9200"
      - "9300"
    environment:
      - cluster.name=docker-cluster
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - VIRTUAL_HOST=$DDEV_HOSTNAME
      - HTTP_EXPOSE=9200
    ulimits:
      memlock:
        soft: -1
        hard: -1
    labels:
      com.ddev.site-name: ${DDEV_SITENAME}
      com.ddev.approot: $DDEV_APPROOT
    volumes:
      - elasticsearch:/usr/share/elasticsearch/data
      - ".:/mnt/ddev_config"
  web:
    links:
      - elasticsearch:elasticsearch

volumes:
  elasticsearch:
    name: "${DDEV_SITENAME}-elasticsearch"

```

---

<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 27, 2020, 9:47pm UTC](https://discuss.elastic.co/t/troubles-with-docker-compose-image-elasticsearch-6-8-0/221493/2 "2020-03-27T21:47:38Z")

</div>

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