# Self-hosted App Search limited to one ES Node?

**URL:** <https://discuss.elastic.co/t/self-hosted-app-search-limited-to-one-es-node/215211>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [January 15, 2020, 8:59pm UTC](https://discuss.elastic.co/t/self-hosted-app-search-limited-to-one-es-node/215211 "2020-01-15T20:59:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![fred\_wang](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@fred\_wang](https://discuss.elastic.co/u/fred_wang)\
**Post date:** [January 15, 2020, 8:59pm UTC](https://discuss.elastic.co/t/self-hosted-app-search-limited-to-one-es-node/215211/1 "2020-01-15T20:59:06Z")

</div>

I tried to configure a multi-node Elasticsearch (3 nodes) and an app search engine using Docker compose.

I finally got what I think is a working docker-compose.yml for this (The documentation on using Docker compose with App search only includes a single node instance)

However, in running it, I get the following error message:

appsearch-engine | [2020-01-15T20:36:12.852+00:00][14][2002][app-server][ERROR]:  
appsearch-engine | --------------------------------------------------------------------------------  
appsearch-engine |  
appsearch-engine | Elasticsearch cluster must be licensed. OSS versions of Elasticsearch do not contain a supported license. Please download and run an Elasticsearch binary from [Download Elasticsearch | Elastic](https://elastic.co/downloads/elasticsearch) to acquire a free, Basic license.  
appsearch-engine |  
appsearch-engine | --------------------------------------------------------------------------------

Does this mean we can not run multi-node Elasticsearch clusters backing app search if we self-host?

If this is is not the right interpretation, how do we apply a basic license to the docker-compose.yml during the startup?

---

<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:** [January 16, 2020, 4:18am UTC](https://discuss.elastic.co/t/self-hosted-app-search-limited-to-one-es-node/215211/2 "2020-01-16T04:18:33Z")

</div>

Welcome!

Just use the standard distribution of elasticsearch instead of the OSS one. Remove `-oss` in your `docker-compose.yml` file.

---

<div class="post-metadata">

**Author:** ![fred\_wang](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@fred\_wang](https://discuss.elastic.co/u/fred_wang)\
**Post date:** [January 17, 2020, 2:31pm UTC](https://discuss.elastic.co/t/self-hosted-app-search-limited-to-one-es-node/215211/3 "2020-01-17T14:31:34Z")

</div>

Thanks for the reply David. I'm not using OSS version in my docker-compose explicitly. This is my compose file:

```auto
version: "3.7"
services:
  es01:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1
    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.5.1
    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.5.1
    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

  appsearch:
    image: docker.elastic.co/app-search/app-search:7.5.1
    container_name: appsearch01
    environment:
    - "elasticsearch.host=http://es01:9200"
    - "allow_es_settings_modification=true"
    - "JAVA_OPTS=-Xms2g -Xmx2g"
    ports:
    - 3002:3002
    volumes:
      - appsearch01:/user/share/appsearch/data
    networks:
      - elastic      

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

networks:
  elastic:
    driver: bridge

```

* * *

Is there an explicitly switch or flag to specify that I want the standard distribution? I don't get this error the first time, but am getting this error consistently when I bring up the compose file subsequently.

---

<div class="post-metadata">

**Author:** ![fred\_wang](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@fred\_wang](https://discuss.elastic.co/u/fred_wang)\
**Post date:** [January 17, 2020, 4:03pm UTC](https://discuss.elastic.co/t/self-hosted-app-search-limited-to-one-es-node/215211/4 "2020-01-17T16:03:17Z")

</div>

Just as another data point, the current elastic search cluster i have up is on a basic license:

C:\Users\FredWang\>curl -X POST "localhost:9200/\_license/start\_basic?pretty"  
{  
"acknowledged" : true,  
"basic\_was\_started" : false,  
"error\_message" : "Operation failed: Current license is basic."  
}

---

<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:** [January 20, 2020, 10:32am UTC](https://discuss.elastic.co/t/self-hosted-app-search-limited-to-one-es-node/215211/5 "2020-01-20T10:32:58Z")

</div>

I tried this:

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

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:$ELASTIC_VERSION
    environment:
      - bootstrap.memory_lock=true
      - discovery.type=single-node
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - 9200:9200
    networks: ['stack']

  appsearch:
    image: docker.elastic.co/app-search/app-search:$ELASTIC_VERSION
    environment:
    - "elasticsearch.host=http://elasticsearch:9200"
    - "allow_es_settings_modification=true"
    ports: ['3002:3002']
    networks: ['stack']
    links: ['elasticsearch']
    depends_on: ['elasticsearch']

networks:
  stack: {}

```

With `.env`:

```auto
ELASTIC_VERSION=7.5.1

```

And this starts very well.

---

<div class="post-metadata">

**Author:** ![fred\_wang](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@fred\_wang](https://discuss.elastic.co/u/fred_wang)\
**Post date:** [January 23, 2020, 8:25pm UTC](https://discuss.elastic.co/t/self-hosted-app-search-limited-to-one-es-node/215211/6 "2020-01-23T20:25:45Z")

</div>

Thanks for the reply. The docker compose works fantastic in single node settings.

I have found intermitten errors complaining about license or inability to connect to the primary node when running a 3-node elastic search cluster with app search.

However, the workaround I've found is simply restarting the appsearch service using docker-compose. This works reliably every time.

Thanks.

---

<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:** [January 23, 2020, 8:46pm UTC](https://discuss.elastic.co/t/self-hosted-app-search-limited-to-one-es-node/215211/7 "2020-01-23T20:46:52Z")

</div>

May be it needs a "wait\_for" like script?  
Or probably app\_search should wait for the correct license and try again?

---

<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:** [February 20, 2020, 8:47pm UTC](https://discuss.elastic.co/t/self-hosted-app-search-limited-to-one-es-node/215211/8 "2020-02-20T20:47:01Z")

</div>

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