# Not able to start enterprise search once I change the ip adress of ent\_search.listen\_host

**URL:** <https://discuss.elastic.co/t/not-able-to-start-enterprise-search-once-i-change-the-ip-adress-of-ent-search-listen-host/255315>\
**Category:** Elastic Search\
**Created:** [November 13, 2020, 9:52am UTC](https://discuss.elastic.co/t/not-able-to-start-enterprise-search-once-i-change-the-ip-adress-of-ent-search-listen-host/255315 "2020-11-13T09:52:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Axelle\_Eynde](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axelle_eynde/32/78953_2.png) [@Axelle\_Eynde](https://discuss.elastic.co/u/Axelle_Eynde)\
**Post date:** [November 13, 2020, 9:52am UTC](https://discuss.elastic.co/t/not-able-to-start-enterprise-search-once-i-change-the-ip-adress-of-ent-search-listen-host/255315/1 "2020-11-13T09:52:16Z")

</div>

Hi,

I'm running enterprise search 7.9.3 with docker on a server. When I try to run it on the localhost everything appears to be looking fine but I can't acess the interface. And when I change the ent-search.listen\_host to my servers IP I get the following error after the "Success! Elastic Enterprise Search is starting successfully.":

```auto
java.io.IOException: Failed to bind to /10.3.50.6:3002 
Caused by: java.net.BindException: Cannot assign requested address

```

this is my configuration in my enterprise-search.yml

```auto
allow_es_settings_modification: true
elasticsearch.host: http://10.3.50.6:9200
ent_search.external_url: http://10.3.50.6:3002
ent_search.listen_host: 10.3.50.6

```

Could someone help me in finding out what I'm doing wrong?

Thank you!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 13, 2020, 10:09am UTC](https://discuss.elastic.co/t/not-able-to-start-enterprise-search-once-i-change-the-ip-adress-of-ent-search-listen-host/255315/2 "2020-11-13T10:09:49Z")

</div>

Did you open the ports? Or are you sharing the same network between containers?  
How do you start your containers?  
Do you consider using docker compose instead?

---

<div class="post-metadata">

**Author:** ![Axelle\_Eynde](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axelle_eynde/32/78953_2.png) [@Axelle\_Eynde](https://discuss.elastic.co/u/Axelle_Eynde)\
**Post date:** [November 13, 2020, 10:15am UTC](https://discuss.elastic.co/t/not-able-to-start-enterprise-search-once-i-change-the-ip-adress-of-ent-search-listen-host/255315/3 "2020-11-13T10:15:10Z")

</div>

yes the ports are open. I also don't have any trouble to connect to elasticsearch.

I simply start my enterprise search container with `sudo docker run -p 3002:3002 docker.elastic.co/enterprise-search/enterprise-search:7.9.3 ` . How would docker compose solve the problem in this case?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 13, 2020, 10:37am UTC](https://discuss.elastic.co/t/not-able-to-start-enterprise-search-once-i-change-the-ip-adress-of-ent-search-listen-host/255315/4 "2020-11-13T10:37:22Z")

</div>

Can you ssh in the docker instance where enterprise search is running and curl [http://10.3.50.6:9200](http://10.3.50.6:9200)?

Here is how I'm setting that with docker compose.

## Elasticsearch

File: `docker-compose-elasticsearch.yml`

```auto
---
version: '3'
services:

  elasticsearch:
    image: $IMG_ELASTICSEARCH:$ELASTIC_VERSION
    environment:
      - bootstrap.memory_lock=true
      - discovery.type=single-node
      - "ES_JAVA_OPTS=-Xms3g -Xmx3g"
      - cluster.routing.allocation.disk.threshold_enabled=false
      - ELASTIC_PASSWORD=$ELASTIC_PASSWORD
      - xpack.security.enabled=true
      - xpack.security.authc.api_key.enabled=true
      - xpack.ml.enabled=false
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports: ["$ELASTICSEARCH_PORT:$ELASTICSEARCH_PORT"]
    networks: ['fscrawler_it']

networks:
  fscrawler_it: {}

```

## Enterprise Search

File: `docker-compose-enterprise-search.yml`

```auto
---
version: '3'
services:

  enterprisesearch:
    image: $IMG_ENTERPRISE_SEARCH:$ELASTIC_VERSION
    environment:
      - "ent_search.auth.source=standard"
      - "elasticsearch.username=elastic"
      - "elasticsearch.password=$ELASTIC_PASSWORD"
      - "elasticsearch.host=http://elasticsearch:9200"
      - "allow_es_settings_modification=true"
      - "secret_management.encryption_keys=[XYZ]"
      - "ENT_SEARCH_DEFAULT_PASSWORD=$ELASTIC_PASSWORD"
    ports: ["$ENTERPRISE_SEARCH_PORT:$ENTERPRISE_SEARCH_PORT"]
    networks: ['fscrawler_it']
    links: ['elasticsearch']
    depends_on: ['elasticsearch']
    restart: always

networks:
  fscrawler_it: {}

```

## Settings

`.env` file is:

```auto
# Elastic Stack settings
ELASTIC_VERSION=7.10.0
ELASTIC_PASSWORD=changeme

# Elasticsearch settings
IMG_ELASTICSEARCH=docker.elastic.co/elasticsearch/elasticsearch
ELASTICSEARCH_PORT=9200

# Enterprise Search settings
IMG_ENTERPRISE_SEARCH=docker.elastic.co/enterprise-search/enterprise-search
ENTERPRISE_SEARCH_PORT=3002

```

## Starting the stack

To start the stack:

```auto
docker-compose \
    -f docker-compose-elasticsearch.yml \
    -f docker-compose-enterprise-search.yml \
    up

```

Wait for everything to start. It could take several minutes:

```auto
enterprisesearch_1 | 2020-07-20 13:55:08.199:INFO:oejs.ServerConnector:main: Started ServerConnector@252570b9{HTTP/1.1}{0.0.0.0:3002}
enterprisesearch_1 | 2020-07-20 13:55:08.199:INFO:oejs.Server:main: Started @342868ms

```

## Source

> **[dadoonet/fscrawler](https://github.com/dadoonet/fscrawler/tree/wip/workplace_search/contrib/docker-compose-it)**
>
> Elasticsearch File System Crawler (FS Crawler). Contribute to dadoonet/fscrawler development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Axelle\_Eynde](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axelle_eynde/32/78953_2.png) [@Axelle\_Eynde](https://discuss.elastic.co/u/Axelle_Eynde)\
**Post date:** [November 13, 2020, 11:22am UTC](https://discuss.elastic.co/t/not-able-to-start-enterprise-search-once-i-change-the-ip-adress-of-ent-search-listen-host/255315/5 "2020-11-13T11:22:33Z")

</div>

That worked, thank you!

---

<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:17am UTC](https://discuss.elastic.co/t/not-able-to-start-enterprise-search-once-i-change-the-ip-adress-of-ent-search-listen-host/255315/6 "2022-11-04T08:17:35Z")

</div>


