Running Enterprise Search locally, /manticore.rb:88:in `block in call'

Hey, i'm trying to run Elasticsearch locally however seem to be getting an issue with Enterprise Search. It stalls for a while and then gives me this error in docker:

`[2021-10-15T14:58:40.169+00:00][8][2002][app-server][INFO]: Performing pre-flight checks for Elasticsearch running on http://elasticsearch:9200...`

`Unexpected exception while running Enterprise Search:`

`Error: elasticsearch: Name or service not known at /usr/share/enterprise-search/lib/war/gems/gems/manticore-0.7.0-java/lib/faraday/adapter/manticore.rb:88:in `block in call'`

Below is my docker-compose file with my setup.

version: "3.8"

networks:
  elastic:
    driver: bridge

volumes:
  elasticsearch:
    driver: local

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.15.0
    environment:
      - discovery.type=single-node
      - xpack.security.enabled=true
      - xpack.security.authc.api_key.enabled=true
      - ELASTIC_PASSWORD=changeme
    volumes:
      - elasticsearch:/usr/share/elasticsearch/data
    ports:
      - 127.0.0.1:9200:9200
    networks:
      - elastic
  enterprise-search:
    image: docker.elastic.co/enterprise-search/enterprise-search:7.15.0
    environment:
      - allow_es_settings_modification=true
      - elasticsearch.host=http://elasticsearch:9200
      - secret_management.encryption_keys=[4a2cd3f81d39bf28738c10db0ca782095ffac07279561809eecc722e0c20eb09]
    ports:
      - 127.0.0.1:3002:3002
    depends_on:
      - "elasticsearch"
    networks:
      - elastic

  kibana:
    image: docker.elastic.co/kibana/kibana:7.14.1
    environment:
      ELASTICSEARCH_HOSTS: http://elasticsearch:9200
      ENTERPRISESEARCH_HOST: http://enterprise-search:3002
      ELASTICSEARCH_USERNAME: elastic
      ELASTICSEARCH_PASSWORD: changeme
    depends_on:
      - "elasticsearch"
      - "enterprise-search"
    ports:
      - 127.0.0.1:5601:5601
    networks:
      - elastic

  localstack:
    image: localstack/localstack
    environment:
      SERVICES: kinesis,sqs
    ports:
      - 4566:4566
      - 4571:4571
  elasticmq-native:
    image: softwaremill/elasticmq-native
    ports:
      - 9324:9324
      - 9325:9325

Welcome!

I saw the same issue recently. Did you upgrade from a previous version?
I solved it by removing the volumes with

docker-compose down -v
docker-compose up

Hey, tried that, still get the same error.

Could you modify this line:

docker.elastic.co/kibana/kibana:7.14.1

to

docker.elastic.co/kibana/kibana:7.15.0

Hey, already tried this. Will update my post. Still get the same error.

Just an update on this, was a memory issue.

Adding ES_JAVA_OPTS=-Xms512m -Xmx512m to Elasticsearch environment variables solved it.