# Trouble connecting from Windows host after switching to docker-compose

**URL:** <https://discuss.elastic.co/t/trouble-connecting-from-windows-host-after-switching-to-docker-compose/91962>\
**Category:** Elasticsearch\
**Created:** [July 5, 2017, 5:01pm UTC](https://discuss.elastic.co/t/trouble-connecting-from-windows-host-after-switching-to-docker-compose/91962 "2017-07-05T17:01:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NathanBaulch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathanbaulch/32/19785_2.png) [@NathanBaulch](https://discuss.elastic.co/u/NathanBaulch)\
**Post date:** [July 5, 2017, 5:01pm UTC](https://discuss.elastic.co/t/trouble-connecting-from-windows-host-after-switching-to-docker-compose/91962/1 "2017-07-05T17:01:10Z")

</div>

I can no longer connect to my official Elasticsearch container from my Windows host (using VirtualBox) since switching from `docker run` to `docker-compose`. Is there an extra step to open port 9200 when using compose? Ports are working for other containers (eg NetData) on the host and I know Elasticsearch is running because I can curl to it from inside other containers.

Here's my pretty standard compose config:

```auto
elasticsearch:
  image: "docker.elastic.co/elasticsearch/elasticsearch:5.4.3"
  ports:
   - "6379:6379"
  environment:
    http.host: "0.0.0.0"
    transport.host: "127.0.0.1"
    xpack.security.enabled: "false"
    ES_JAVA_OPTS: "-Xms512m -Xmx512m"

```

Here's the docker command that I can connect to on port 9200:

```auto
docker run --detach \
  --name elasticsearch \
  --publish 9200:9200 \
  --env "http.host=0.0.0.0" \
  --env "transport.host=127.0.0.1" \
  --env "xpack.security.enabled=false" \
  --env "ES_JAVA_OPTS=""-Xms512m -Xmx512m""" \
  docker.elastic.co/elasticsearch/elasticsearch:5.4.3

```

**Edit:** Disregard, I got my ES and Redis ports mixed up, oops! If a moderator reads this then please feel free to delete this rather silly question.

---

<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 2, 2017, 5:01pm UTC](https://discuss.elastic.co/t/trouble-connecting-from-windows-host-after-switching-to-docker-compose/91962/2 "2017-08-02T17:01:11Z")

</div>

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