# Issues installing App Search locally using docker

**URL:** <https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [July 25, 2019, 9:19am UTC](https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206 "2019-07-25T09:19:48Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jubstuff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jubstuff/32/50901_2.png) [@jubstuff](https://discuss.elastic.co/u/jubstuff)\
**Post date:** [July 25, 2019, 9:19am UTC](https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206/1 "2019-07-25T09:19:48Z")

</div>

Hello,

I wanted to give App Search a try and I wanted to install it locally using docker.

I followed the instructions located at [App Search, Self Managed, Installation | Swiftype Documentation](https://swiftype.com/documentation/app-search/self-managed/installation#docker-compose) but it seems that no matter what, I cannot access the App Search app at [http://localhost:3002](http://localhost:3002)

This is my `docker-compose.yml`:

```auto
version: '2.2'

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.2.0
    environment:
    - "node.name=es-node"
    - "discovery.type=single-node"
    - "cluster.name=app-search-docker-cluster"
    - "bootstrap.memory_lock=true"
    - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    - "cluster.routing.allocation.disk.threshold_enabled=true" 
    - "cluster.routing.allocation.disk.watermark.flood_stage=200mb"
    - "cluster.routing.allocation.disk.watermark.low=500mb" 
    - "cluster.routing.allocation.disk.watermark.high=300mb"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - 9200:9200
      - 9300:9300
    volumes:
      - esdata01:/usr/share/elasticsearch/data

  appsearch:
    image: docker.elastic.co/app-search/app-search:7.2.0
    environment:
    - "elasticsearch.host=http://elasticsearch:9200"
    - "allow_es_settings_modification=true"
    - "JAVA_OPTS=-Xmx256m"
    ports:
    - 3002:3002
volumes:
    esdata01:
      driver: local

```

While this is the log I get when running `docker-compose up`:

```auto
▶ docker-compose up appsearch
Recreating appsearchtest_appsearch_1 ... done
Attaching to appsearchtest_appsearch_1
appsearch_1 | Found java executable in PATH
appsearch_1 | Java version: 1.8.0_212
appsearch_1 | 
appsearch_1 | App Search is starting. It will take a few moments. App Search includes the following stack components:
appsearch_1 | - An application server
appsearch_1 | - A pool of background workers
appsearch_1 | - A filebeat instance for indexing logs
appsearch_1 | 
appsearch_1 | forego | starting app-server.1 on port 5000
appsearch_1 | forego | starting worker.1 on port 5100
appsearch_1 | forego | starting filebeat.1 on port 5300
appsearch_1 | filebeat.1 | scripting container class loader urls: [file:/tmp/jruby8772327061860643696extract/lib/jruby-core-9.2.5.0-complete.jar, file:/tmp/jruby8772327061860643696extract/lib/jruby-rack-1.1.21.jar, file:/tmp/jruby8772327061860643696extract/lib/jruby-stdlib-9.2.5.0.jar]
appsearch_1 | app-server.1 | scripting container class loader urls: [file:/tmp/jruby4781859431772385646extract/lib/jruby-core-9.2.5.0-complete.jar, file:/tmp/jruby4781859431772385646extract/lib/jruby-rack-1.1.21.jar, file:/tmp/jruby4781859431772385646extract/lib/jruby-stdlib-9.2.5.0.jar]
appsearch_1 | worker.1 | scripting container class loader urls: [file:/tmp/jruby394617129645864115extract/lib/jruby-core-9.2.5.0-complete.jar, file:/tmp/jruby394617129645864115extract/lib/jruby-rack-1.1.21.jar, file:/tmp/jruby394617129645864115extract/lib/jruby-stdlib-9.2.5.0.jar]
appsearch_1 | app-server.1 | setting GEM_HOME to /tmp/jruby4781859431772385646extract/gems
appsearch_1 | app-server.1 | ... and BUNDLE_GEMFILE to /tmp/jruby4781859431772385646extract/Gemfile
appsearch_1 | app-server.1 | loading resource: /tmp/jruby4781859431772385646extract/./META-INF/rails.rb
appsearch_1 | app-server.1 | invoking /tmp/jruby4781859431772385646extract/./META-INF/rails.rb with: [runner, LocoTogo.start_app_server!]
appsearch_1 | filebeat.1 | setting GEM_HOME to /tmp/jruby8772327061860643696extract/gems
appsearch_1 | filebeat.1 | ... and BUNDLE_GEMFILE to /tmp/jruby8772327061860643696extract/Gemfile
appsearch_1 | filebeat.1 | loading resource: /tmp/jruby8772327061860643696extract/./META-INF/rails.rb
appsearch_1 | filebeat.1 | invoking /tmp/jruby8772327061860643696extract/./META-INF/rails.rb with: [runner, LocoTogo.start_filebeat!]
appsearch_1 | worker.1 | setting GEM_HOME to /tmp/jruby394617129645864115extract/gems
appsearch_1 | worker.1 | ... and BUNDLE_GEMFILE to /tmp/jruby394617129645864115extract/Gemfile
appsearch_1 | worker.1 | loading resource: /tmp/jruby394617129645864115extract/./META-INF/rails.rb
appsearch_1 | worker.1 | invoking /tmp/jruby394617129645864115extract/./META-INF/rails.rb with: [runner, LocoTogo.start_worker!]
appsearch_1 | filebeat.1 | Creating log directory: /usr/share/app-search/log
appsearch_1 | filebeat.1 | [2019-07-25T09:05:54.229+00:00][56][2000][rails][INFO]: App Search version=7.2.0, JRuby version=9.2.5.0, Ruby version=2.5.0, Rails version=4.2.11.1
appsearch_1 | app-server.1 | [2019-07-25T09:05:54.502+00:00][53][2000][rails][INFO]: App Search version=7.2.0, JRuby version=9.2.5.0, Ruby version=2.5.0, Rails version=4.2.11.1
appsearch_1 | worker.1 | [2019-07-25T09:06:02.025+00:00][55][2000][rails][INFO]: App Search version=7.2.0, JRuby version=9.2.5.0, Ruby version=2.5.0, Rails version=4.2.11.1

```

From the logs, it seems that the server is running on port 5000, but even exposing that port didn't work.

Could someone help me setup it?

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![orhantoy](https://avatars.discourse-cdn.com/v4/letter/o/c5a1d2/32.png) [@orhantoy](https://discuss.elastic.co/u/orhantoy)\
**Post date:** [July 25, 2019, 9:43am UTC](https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206/2 "2019-07-25T09:43:35Z")

</div>

The message `starting app-server.1 on port 5000` is misleading as port 5000 or the other ones (5100 and 5300) aren't actually exposed but used internally in `forego`.

In the Docker compose config you are not exposing port 3002 as described in [https://swiftype.com/documentation/app-search/self-managed/installation#docker-compose](https://swiftype.com/documentation/app-search/self-managed/installation#docker-compose)  
I think that's the problem.

---

<div class="post-metadata">

**Author:** ![jubstuff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jubstuff/32/50901_2.png) [@jubstuff](https://discuss.elastic.co/u/jubstuff)\
**Post date:** [July 25, 2019, 9:59am UTC](https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206/3 "2019-07-25T09:59:28Z")

</div>

Hello @orhantoy,

Thank you for helping me out. Actually, it was a copy-paste error on my side: I've updated the original post with the correct content of the `docker-compose.yml`

I've removed everything and restarted from scratch, but it still doesn't work ☹

---

<div class="post-metadata">

**Author:** ![orhantoy](https://avatars.discourse-cdn.com/v4/letter/o/c5a1d2/32.png) [@orhantoy](https://discuss.elastic.co/u/orhantoy)\
**Post date:** [July 25, 2019, 12:06pm UTC](https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206/4 "2019-07-25T12:06:03Z")

</div>

Do you see any errors logged to the console?

---

<div class="post-metadata">

**Author:** ![jubstuff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jubstuff/32/50901_2.png) [@jubstuff](https://discuss.elastic.co/u/jubstuff)\
**Post date:** [July 25, 2019, 2:18pm UTC](https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206/5 "2019-07-25T14:18:40Z")

</div>

No, no errors in the console.

I'll try to debug a bit more and post here my additional findings

---

<div class="post-metadata">

**Author:** ![rajithsam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajithsam/32/50960_2.png) [@rajithsam](https://discuss.elastic.co/u/rajithsam)\
**Post date:** [July 26, 2019, 2:08pm UTC](https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206/6 "2019-07-26T14:08:48Z")

</div>

Even I'm facing the same issue with running elastic app search in docker windows.  
Any luck? @jubstuff

---

<div class="post-metadata">

**Author:** ![orhantoy](https://avatars.discourse-cdn.com/v4/letter/o/c5a1d2/32.png) [@orhantoy](https://discuss.elastic.co/u/orhantoy)\
**Post date:** [July 26, 2019, 2:23pm UTC](https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206/7 "2019-07-26T14:23:31Z")

</div>

Are both of you, @jubstuff and @rajithsam, on Docker Windows?

---

<div class="post-metadata">

**Author:** ![rajithsam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajithsam/32/50960_2.png) [@rajithsam](https://discuss.elastic.co/u/rajithsam)\
**Post date:** [July 26, 2019, 2:37pm UTC](https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206/8 "2019-07-26T14:37:17Z")

</div>

Yes I'm trying out in windows @orhantoy

---

<div class="post-metadata">

**Author:** ![goodroot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/goodroot/32/38389_2.png) [@goodroot](https://discuss.elastic.co/u/goodroot)\
**Post date:** [July 26, 2019, 3:18pm UTC](https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206/9 "2019-07-26T15:18:53Z")

</div>

@rajithsam @jubstuff

Thanks for sticking with it. 🙂

How much ram do you have allocated to Docker? If you increase the amount (say to 6GB), does it boot as expected?

---

<div class="post-metadata">

**Author:** ![rajithsam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajithsam/32/50960_2.png) [@rajithsam](https://discuss.elastic.co/u/rajithsam)\
**Post date:** [July 29, 2019, 6:21am UTC](https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206/10 "2019-07-29T06:21:14Z")

</div>

@goodroot  
I increased the size to 6GB & `http://localhost:3002` worked! 🙂  
Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![rajithsam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajithsam/32/50960_2.png) [@rajithsam](https://discuss.elastic.co/u/rajithsam)\
**Post date:** [July 29, 2019, 11:39am UTC](https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206/11 "2019-07-29T11:39:09Z")

</div>

@goodroot But I can't run `http://appsearch:3002`  
Getting this error in command console  
Error: App Search is unable to connect to Elasticsearch. Ensure a healthy Elasticsearch cluster is running at [http://elasticsearch:9200](http://elasticsearch:9200) for user elastic.

---

<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 26, 2019, 11:39am UTC](https://discuss.elastic.co/t/issues-installing-app-search-locally-using-docker/192206/12 "2019-08-26T11:39:20Z")

</div>

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