# Docker composer elc 6.2.4 Caused by: java.lang.IllegalStateException: Failed to create node environment

**URL:** <https://discuss.elastic.co/t/docker-composer-elc-6-2-4-caused-by-java-lang-illegalstateexception-failed-to-create-node-environment/141778>\
**Category:** 中文提问与讨论\
**Created:** [July 26, 2018, 1:23pm UTC](https://discuss.elastic.co/t/docker-composer-elc-6-2-4-caused-by-java-lang-illegalstateexception-failed-to-create-node-environment/141778 "2018-07-26T13:23:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yang2306](https://avatars.discourse-cdn.com/v4/letter/y/0ea827/32.png) [@yang2306](https://discuss.elastic.co/u/yang2306)\
**Post date:** [July 26, 2018, 1:23pm UTC](https://discuss.elastic.co/t/docker-composer-elc-6-2-4-caused-by-java-lang-illegalstateexception-failed-to-create-node-environment/141778/1 "2018-07-26T13:23:01Z")

</div>

openapi\_elc:  
image: [docker.elastic.co/elasticsearch/elasticsearch:6.2.4](http://docker.elastic.co/elasticsearch/elasticsearch:6.2.4)  
ports:  
- 9200:9200  
- 9300:9300  
environment:  
discovery.zen.ping.unicast.hosts: elasticsearch  
#discovery.zen.minimum\_master\_nodes: 1  
cluster.name: 'docker-cluster'  
networks:  
- bridge  
volumes:  
- './esdata:/usr/share/elasticsearch/data'  
deploy:  
mode: replicated  
replicas: 1  
placement:  
constraints: [node.role == manager] `

当我部署 service时候 elasticsearch p抛出Caused by: java.lang.IllegalStateException: Failed to create node environment  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) ~[elasticsearch-6.2.4.jar:6.2.4]  
Caused by: java.lang.IllegalStateException: Failed to create node environment,如果没有添加  
environment and volumes everything is ok.  
`

---

<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:** [August 23, 2018, 1:23pm UTC](https://discuss.elastic.co/t/docker-composer-elc-6-2-4-caused-by-java-lang-illegalstateexception-failed-to-create-node-environment/141778/2 "2018-08-23T13:23:21Z")

</div>

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