# Unable to access Enterprise Search on a cloud VM

**URL:** <https://discuss.elastic.co/t/unable-to-access-enterprise-search-on-a-cloud-vm/274432>\
**Category:** Elastic Search\
**Created:** [May 30, 2021, 1:03pm UTC](https://discuss.elastic.co/t/unable-to-access-enterprise-search-on-a-cloud-vm/274432 "2021-05-30T13:03:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kristang91](https://avatars.discourse-cdn.com/v4/letter/k/76d3ee/32.png) [@kristang91](https://discuss.elastic.co/u/kristang91)\
**Post date:** [May 30, 2021, 1:03pm UTC](https://discuss.elastic.co/t/unable-to-access-enterprise-search-on-a-cloud-vm/274432/1 "2021-05-30T13:03:37Z")

</div>

Hi there, only posting because I've really tried reading all documentation and googling, but found no solution. I've gotten a docker-compose consisting of 3 ES nodes, kibana, enterprise search, a React front-end (Elastic's Search UI), and traefik going on a GCP VM. Everything seems to be up and running (enterprise search connects to ES, kibana connects to ES, etc.), but my front-end cannot fetch from enterprise search, and I cannot access the enterprise search, whether it's through :3002, or from [enterprise.domain.com](http://enterprise.domain.com). I got it up and running locally before installing it on a VM and slapping on traefik, so am wondering if I have missed something. I've posted my docker-compose.yml below. Thanks very much in advance!

```auto
    version: '2.2'
    services:
      es01:
        image: docker.elastic.co/elasticsearch/elasticsearch:7.13.0
        container_name: es01
        environment:
          - node.name=es01
          - cluster.name=es-docker-cluster
          - discovery.seed_hosts=es02,es03
          - cluster.initial_master_nodes=es01,es02,es03
          - bootstrap.memory_lock=true
          - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        ulimits:
          memlock:
            soft: -1
            hard: -1
        volumes:
          - data01:/usr/share/elasticsearch/data
        ports:
          - 9200:9200
        networks:
          - elastic

      es02:
        image: docker.elastic.co/elasticsearch/elasticsearch:7.13.0
        container_name: es02
        environment:
          - node.name=es02
          - cluster.name=es-docker-cluster
          - discovery.seed_hosts=es01,es03
          - cluster.initial_master_nodes=es01,es02,es03
          - bootstrap.memory_lock=true
          - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        ulimits:
          memlock:
            soft: -1
            hard: -1
        volumes:
          - data02:/usr/share/elasticsearch/data
        networks:
          - elastic

      es03:
        image: docker.elastic.co/elasticsearch/elasticsearch:7.13.0
        container_name: es03
        environment:
          - node.name=es03
          - cluster.name=es-docker-cluster
          - discovery.seed_hosts=es01,es02
          - cluster.initial_master_nodes=es01,es02,es03
          - bootstrap.memory_lock=true
          - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        ulimits:
          memlock:
            soft: -1
            hard: -1
        volumes:
          - data03:/usr/share/elasticsearch/data
        networks:
          - elastic

      kib01:
        image: docker.elastic.co/kibana/kibana:7.13.0
        container_name: kib01
        ports:
          - 5601:5601
        environment:
          ELASTICSEARCH_URL: http://es01:9200
          ELASTICSEARCH_HOSTS: '["http://es01:9200","http://es02:9200","http://es03:9200"]'
        networks:
          - elastic

      enterprise:
        image: docker.elastic.co/enterprise-search/enterprise-search:7.13.0
        container_name: enterprise
        environment:
          - elasticsearch.host=http://es01:9200
          - elasticsearch.username=[username]
          - elasticsearch.password=[password]
          - allow_es_settings_modification=true
          - secret_management.encryption_keys=[keys]
          - ent_search.external_url=http://[VM IP]:3002
          - kibana.external_url=http://kib01:5601
          - log_level=debug
        ports: 
          - 3002:3002
        networks: 
          - elastic
          - frontend
        labels:
          - "traefik.http.routers.enterprise.rule=Host(`enterprise.domain.com`)"

      frontend:
        container_name: frontend
        # image: elephant:prod
        build:
          context: ./searchui
          dockerfile: Dockerfile.prod
        tty: true
        volumes:
          - '.:/app'
          - '/app/node_modules'
        environment:
          - CHOKIDAR_USEPOLLING=true
        networks:
          - frontend
        labels:
          - "traefik.http.routers.elephant.rule=Host(`frontend.domain.com`)"
          - "traefik.http.routers.elephant.tls.certresolver=le"
          - "traefik.http.routers.elephant.tls=true"

      reverse-proxy:
        container_name: traefik
        # The official v2 Traefik docker image
        image: traefik:2.4
        # Enables the web UI and tells Traefik to listen to docker
        command: 
          - --providers.docker=true
          - --entrypoints.web.address=:80
          - --entrypoints.web-secure.address=:443
          - --certificatesresolvers.le.acme.email=user@email.com
          - --certificatesresolvers.le.acme.storage=/acme.json
          - --certificatesresolvers.le.acme.tlschallenge=true
        ports:
          # The HTTP port
          - "80:80"
          - "443:443"
        volumes:
          # So that Traefik can listen to the Docker events
          - /var/run/docker.sock:/var/run/docker.sock
        networks:
          - frontend

    volumes:
      data01:
        driver: local
      data02:
        driver: local
      data03:
        driver: local

    networks:
      frontend:
      elastic:
        driver: bridge

```

---

<div class="post-metadata">

**Author:** ![Mark\_Hoy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_hoy/32/99384_2.png) [@Mark\_Hoy](https://discuss.elastic.co/u/Mark_Hoy)\
**Post date:** [May 31, 2021, 1:09pm UTC](https://discuss.elastic.co/t/unable-to-access-enterprise-search-on-a-cloud-vm/274432/2 "2021-05-31T13:09:47Z")

</div>

Hi kristang91 -

Are you able to log in via your browser directly to your Enterprise Search instance at `http://[VM IP]:3002` ?

If not, then one possible thing to check is to ensure that Enterprise Search is bound to the correct IP address in the VM's interfaces. This can be done via the `ent_search.listen_host` configuration. For example:

```auto
- ent_search.listen_host=[VM IP]

```

---

<div class="post-metadata">

**Author:** ![kristang91](https://avatars.discourse-cdn.com/v4/letter/k/76d3ee/32.png) [@kristang91](https://discuss.elastic.co/u/kristang91)\
**Post date:** [June 1, 2021, 5:11pm UTC](https://discuss.elastic.co/t/unable-to-access-enterprise-search-on-a-cloud-vm/274432/3 "2021-06-01T17:11:00Z")

</div>

Hi Mark, thank you so much for the help. I wasn't able to log in via that address. I tried your suggestion. It didn't fix it, but inspired me to mess around with a bunch of things, including setting the host to 0.0.0.0 (since it's on a Docker internal network), and changing the TLS settings (given that Traefik negotiated SSL certs for the domains, and the frontend needs to fetch using https):

```auto
      - ent_search.external_url=https://enterprise.domain.com:443
      - ent_search.listen_host=0.0.0.0
      - ent_search.listen_port=443
      - ent_search.ssl.redirect_http_from_port=80 

```

I now get a 404 from Traefik - so I think there's a problem with Traefik that I now need to fix. Will update if I fix that.

---

<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:** [November 4, 2022, 8:30am UTC](https://discuss.elastic.co/t/unable-to-access-enterprise-search-on-a-cloud-vm/274432/4 "2022-11-04T08:30:56Z")

</div>


