# \[ConnectionError\]: connect ECONNREFUSED 172.29.0.2:9200" (Opensearch + Dashboards + Docker)

**URL:** <https://forum.opensearch.org/t/connectionerror-connect-econnrefused-172-29-0-2-9200-opensearch-dashboards-docker/10547>\
**Category:** Open Source Elasticsearch and Kibana\
**Tags:** troubleshoot\
**Created:** [August 8, 2022, 10:54pm UTC](https://forum.opensearch.org/t/connectionerror-connect-econnrefused-172-29-0-2-9200-opensearch-dashboards-docker/10547 "2022-08-08T22:54:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![scull7](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/scull7/32/3716_2.png) [@scull7](https://forum.opensearch.org/u/scull7)\
**Post date:** [August 8, 2022, 10:54pm UTC](https://forum.opensearch.org/t/connectionerror-connect-econnrefused-172-29-0-2-9200-opensearch-dashboards-docker/10547/1 "2022-08-08T22:54:16Z")

</div>

Hi All,

I’m attempting to set up a working opensearch + dashboards on inside docker containers on a DigitalOcean virtual machine (running ubuntu 20.04).

With the below docker-compose.yml file the containers load properly and I’m able to connect to the opensearch containers from the NGINX container, however, when I `docker exec -it opensearch-dashboards sh` into the container and attempt to issue the test cURL commands as specified in the installation docs I receive an ECONNREFUSED error.

Is there a terribly obvious mistake in my configuration?

```auto
networks:
  opensearch-net: {}
services:
  opensearch-dashboards:
    container_name: opensearch-dashboards
    environment:
      OPENSEARCH_HOSTS: "[\"https://opensearch-node1:9200\",\"https://opensearch-node2:9200\"]"
    expose:
      - '5601'
    image: opensearchproject/opensearch-dashboards:2.1.0
    networks:
      opensearch-net:
        aliases:
          - com-withbanner-opensearch-dashboard
    ports:
      - "5601:5601"
    volumes: []
  opensearch-node1:
    container_name: opensearch-node1
    environment:
      - cluster.name=opensearch-cluster
      - node.name=opensearch-node1
      - "discovery.seed_hosts=opensearch-node1,opensearch-node2"
      - "cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2"
      - bootstrap.memory_lock=true
      - OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m
      - network.host=0.0.0.0
    image: opensearchproject/opensearch:2.1.0
    networks:
      - opensearch-net
    ports:
      - "9200:9200"
      - "9600:9600"
    ulimits:
      memlock:
        hard: -1
        soft: -1
      nofile:
        hard: 65536
        soft: 65536
    volumes:
      - opensearch-data1:/usr/share/opensearch/data
  opensearch-node2:
    container_name: opensearch-node2
    environment:
      - cluster.name=opensearch-cluster
      - node.name=opensearch-node2
      - "discovery.seed_hosts=opensearch-node1,opensearch-node2"
      - "cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2"
      - bootstrap.memory_lock=true
      - OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m
      - network.host=0.0.0.0
    image: opensearchproject/opensearch:2.1.0
    networks:
      - opensearch-net
    ulimits:
      memlock:
        hard: -1
        soft: -1
      nofile:
        hard: 65536
        soft: 65536
    volumes:
      - opensearch-data2:/usr/share/opensearch/data
  proxy:
    build: "../nginx"
    networks:
      - opensearch-net
    ports:
      - "80:80"
      - "443:443"
version: '3.9'
volumes:
  opensearch-data1: {}
  opensearch-data2: {}

```

---

<div class="post-metadata">

**Author:** ![Zachary](https://avatars.discourse-cdn.com/v4/letter/z/90db22/32.png) [@Zachary](https://forum.opensearch.org/u/Zachary)\
**Post date:** [December 20, 2023, 4:35pm UTC](https://forum.opensearch.org/t/connectionerror-connect-econnrefused-172-29-0-2-9200-opensearch-dashboards-docker/10547/2 "2023-12-20T16:35:43Z")

</div>

I had the same problem, but my Docker gave an error on the java client :Timeout connecting to [/172.20.0.3:9200]. Did you solve the problem
