Camunda 8 Self Managed docker-compose Optimize not starting

Hi,

I am trying to evaluate Camunda 8 Self-Managed using docker-compose configuration on a MacOS with Intel Core i7 processor.

So, I cloned GitHub - camunda/camunda-platform: Camunda Platform 8 and to start the environment I run docker-compose up -d as per README.md

All containers started except Keycloak. Finally I managed to start it. See Camunda 8 Self Managed docker compose keycloak not start - #9 by Hafflgav

But, now, Optimize container do not start.
The log is:

Starting Camunda Optimize 3.8.2...

15:38:08.026 [main] INFO  o.c.o.s.e.OptimizeElasticsearchClientFactory - Initializing Elasticsearch rest client...
15:38:13.735 [main] ERROR o.c.o.s.e.OptimizeElasticsearchClientFactory - Can't connect to any Elasticsearch node [[host=http://elasticsearch:9200]]. Please check the connection!
org.elasticsearch.ElasticsearchException: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused

If I try to access the Elasticsearch container by http://localhost:9200 I get:

{
  "name" : "41227efc0e91",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "8lVzr8rgSQOjxmCkaj3_0g",
  "version" : {
    "number" : "7.17.0",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "bee86328705acaa9a6daede7140defd4d9ec56bd",
    "build_date" : "2022-01-28T08:36:04.875279988Z",
    "build_snapshot" : false,
    "lucene_version" : "8.11.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

Apparently, Optimize did not comunicate with Elasticsearch by the virtual network described in docker-compose.yaml

Can anyone help?
Thanks,

1 Like

Hi,

After some deep digging in Elasticsearch container logs I assumed that the associated volume is not created.
In docker-compose.yaml for the elasticsearch container there are a volume named elastic and mapped to /usr/share/elasticsearch/data

  elasticsearch: # https://hub.docker.com/_/elasticsearch
    image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION:-7.17.0}
    container_name: elasticsearch
    ports:
      - "9200:9200"
      - "9300:9300"
    environment:
      - bootstrap.memory_lock=true
      - discovery.type=single-node
      # allow running with low disk space
      - cluster.routing.allocation.disk.threshold_enabled=false
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    restart: always
    healthcheck:
      test: [ "CMD-SHELL", "curl -f http://localhost:9200/_cat/health | grep -q green" ]
      interval: 30s
      timeout: 5s
      retries: 3
    volumes:
      - elastic:/usr/share/elasticsearch/data
    networks:
      - camunda-platform

But, on MacOS El Capitan and later Apple implemented System Integrity Protection to protect important files and folders on MacOS. See About System Integrity Protection on your Mac - Apple Support

So, I changed the mapping of the volume to a non protected zone and now Optimize container start.

    volumes:
      - elastic:/usr/local/elasticsearch/data
1 Like