appbaseio / dejavu

A Web UI for Elasticsearch and OpenSearch: Import, browse and edit data with rich filters and query views, create reference search UIs.
https://dejavu.reactivesearch.io
MIT License
8.4k stars 511 forks source link

Can't connect to ElasticSearch (docker based installation) - Unexpected token 'F', "File /deja"... is not valid JSON #467

Open netandreus opened 1 year ago

netandreus commented 1 year ago

Describe the bug When I open Dejavu there is an error message:

Unexpected token 'F', "File /deja"... is not valid JSON

Dejavu Version appbaseio/dejavu:3.6.1

To Reproduce Steps to reproduce the behavior: Content of docker-compose.yml

  ###################
  #  Elasticsearch  #
  ###################
  elasticsearch:
    container_name: mailarchive_elasticsearch
    image: mailarchive_elasticsearch
    build:
      context: ./build/elasticsearch
      args:
        DOCKER_PLATFORM: ${ELASTIC_DOCKER_PLATFORM}
        CURATOR_VERSION: ${CURATOR_VERSION}
        ELASTIC_VERSION: ${ELASTIC_VERSION}
        HOST_UID: ${HOST_UID}
        HOST_GID: ${HOST_GID}
    ports:
      - "9300:9300" # ??
      - "9200:9200" # Elasticsearch JSON interface
    environment:
      - MAX_MAP_COUNT=262144
      - OPTIMIZE_EVERY=1
      - MAX_INDEX_AGE=3
      - discovery.type=single-node
      - ES_JAVA_OPTS=-Xms750m -Xmx750m
      - xpack.security.enabled=false
      - http.max_content_length=10MB
      - http.cors.enabled=true
      - http.cors.allow-origin=\*
      - http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
      - http.cors.allow-credentials=true
      - network.publish_host=localhost
    healthcheck:
      test: [ "CMD-SHELL", "/bin/nc -z 127.0.0.1 9200" ]
      interval: 20s
      timeout: 3s
      start_period: 5s
      retries: 3
    volumes:
      - elasticsearch_data:/usr/share/elasticsearch/data
      - elasticsearch_backups:/var/backups

  ####################################
  #  Dejavu (elasticsearch browser)  #
  ####################################
  dejavu:
    container_name: mailarchive_dejavu
    image: appbaseio/dejavu:3.6.1
    ports:
      - '1358:1358'
    depends_on:
      elasticsearch: { condition: service_healthy }
    links:
      - elasticsearch

Expected behavior Connecting to ElasticSearch.

Screenshots

dejavu

Desktop (please complete the following information):