Kibana not connecting to elasticsearch on 7.5.2

Hi, i've just set up an ELK stack in docker but Kibana doesnt seem to want to work.

Curl to :5601 results in:

{"statusCode":404,"error":"Not Found","message":"Not Found"}

And the following pops out in the log:

kibana_1 | {
    "type": "response",
    "@timestamp": "2020-01-24T15:32:07Z",
    "tags": [],
    "pid": 6,
    "method": "get",
    "statusCode": 404,
    "req": {
        "url": "/",
        "method": "get",
        "headers": {
            "host": "oc-hub.org:5601",
            "user-agent": "curl/7.61.1",
            "accept": "*/*"
        },
        "remoteAddress": "18.130.45.167",
        "userAgent": "18.130.45.167"
    },
    "res": {
        "statusCode": 404,
        "responseTime": 32,
        "contentLength": 9
    },
    "message": "GET / 404 32ms - 9.0B"
}
kibana_1 | {
    "type": "error",
    "@timestamp": "2020-01-24T15:32:07Z",
    "tags": ["warning", "process"],
    "pid": 6,
    "level": "error",
    "error": {
        "message": "TypeError: Cannot read property 'statusCodes' of undefined at Network._server.events.on (/usr/share/kibana/node_modules/oppsy/lib/network.js:56:38) at module.exports.internals.Podium.internals.Podium.emit (/usr/share/kibana/node_modules/podium/lib/index.js:220:49) at Request._finalize (/usr/share/kibana/node_modules/hapi/lib/request.js:406:27) at Request._reply (/usr/share/kibana/node_modules/hapi/lib/request.js:345:14) at process._tickCallback (internal/process/next_tick.js:68:7)",
        "name": "UnhandledPromiseRejectionWarning",
        "stack": "UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'statusCodes' of undefined at Network._server.events.on (/usr/share/kibana/node_modules/oppsy/lib/network.js:56:38) at module.exports.internals.Podium.internals.Podium.emit (/usr/share/kibana/node_modules/podium/lib/index.js:220:49) at Request._finalize (/usr/share/kibana/node_modules/hapi/lib/request.js:406:27) at Request._reply (/usr/share/kibana/node_modules/hapi/lib/request.js:345:14) at process._tickCallback (internal/process/next_tick.js:68:7) at emitWarning (internal/process/promises.js:81:15) at emitPromiseRejectionWarnings (internal/process/promises.js:120:9) at process._tickCallback (internal/process/next_tick.js:69:34)"
    },
    "message": "TypeError: Cannot read property 'statusCodes' of undefined at Network._server.events.on (/usr/share/kibana/node_modules/oppsy/lib/network.js:56:38) at module.exports.internals.Podium.internals.Podium.emit (/usr/share/kibana/node_modules/podium/lib/index.js:220:49) at Request._finalize (/usr/share/kibana/node_modules/hapi/lib/request.js:406:27) at Request._reply (/usr/share/kibana/node_modules/hapi/lib/request.js:345:14) at process._tickCallback (internal/process/next_tick.js:68:7)"
}
kibana_1 | {
    "type": "error",
    "@timestamp": "2020-01-24T15:32:07Z",
    "tags": ["warning", "process"],
    "pid": 6,
    "level": "error",
    "error": {
        "message": "Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)",
        "name": "UnhandledPromiseRejectionWarning",
        "stack": "TypeError: Cannot read property 'statusCodes' of undefined at Network._server.events.on (/usr/share/kibana/node_modules/oppsy/lib/network.js:56:38) at module.exports.internals.Podium.internals.Podium.emit (/usr/share/kibana/node_modules/podium/lib/index.js:220:49) at Request._finalize (/usr/share/kibana/node_modules/hapi/lib/request.js:406:27) at Request._reply (/usr/share/kibana/node_modules/hapi/lib/request.js:345:14) at process._tickCallback (internal/process/next_tick.js:68:7)"
    },
    "message": "Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)"
}
kibana_1 | {
    "type": "response",
    "@timestamp": "2020-01-24T15:32:09Z",
    "tags": [],
    "pid": 6,
    "method": "get",
    "statusCode": 404,
    "req": {
        "url": "/",
        "method": "get",
        "headers": {
            "host": "0.0.0.0:5601",
            "user-agent": "curl/7.61.1",
            "accept": "*/*"
        },
        "remoteAddress": "172.19.0.1",
        "userAgent": "172.19.0.1"
    },
    "res": {
        "statusCode": 404,
        "responseTime": 24,
        "contentLength": 9
    },
    "message": "GET / 404 24ms - 9.0B"
}
kibana_1 | {
    "type": "error",
    "@timestamp": "2020-01-24T15:32:09Z",
    "tags": ["warning", "process"],
    "pid": 6,
    "level": "error",
    "error": {
        "message": "TypeError: Cannot read property 'statusCodes' of undefined at Network._server.events.on (/usr/share/kibana/node_modules/oppsy/lib/network.js:56:38) at module.exports.internals.Podium.internals.Podium.emit (/usr/share/kibana/node_modules/podium/lib/index.js:220:49) at Request._finalize (/usr/share/kibana/node_modules/hapi/lib/request.js:406:27) at Request._reply (/usr/share/kibana/node_modules/hapi/lib/request.js:345:14) at process._tickCallback (internal/process/next_tick.js:68:7)",
        "name": "UnhandledPromiseRejectionWarning",
        "stack": "UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'statusCodes' of undefined at Network._server.events.on (/usr/share/kibana/node_modules/oppsy/lib/network.js:56:38) at module.exports.internals.Podium.internals.Podium.emit (/usr/share/kibana/node_modules/podium/lib/index.js:220:49) at Request._finalize (/usr/share/kibana/node_modules/hapi/lib/request.js:406:27) at Request._reply (/usr/share/kibana/node_modules/hapi/lib/request.js:345:14) at process._tickCallback (internal/process/next_tick.js:68:7) at emitWarning (internal/process/promises.js:81:15) at emitPromiseRejectionWarnings (internal/process/promises.js:120:9) at process._tickCallback (internal/process/next_tick.js:69:34)"
    },
    "message": "TypeError: Cannot read property 'statusCodes' of undefined at Network._server.events.on (/usr/share/kibana/node_modules/oppsy/lib/network.js:56:38) at module.exports.internals.Podium.internals.Podium.emit (/usr/share/kibana/node_modules/podium/lib/index.js:220:49) at Request._finalize (/usr/share/kibana/node_modules/hapi/lib/request.js:406:27) at Request._reply (/usr/share/kibana/node_modules/hapi/lib/request.js:345:14) at process._tickCallback (internal/process/next_tick.js:68:7)"
}
kibana_1 | {
    "type": "error",
    "@timestamp": "2020-01-24T15:32:09Z",
    "tags": ["warning", "process"],
    "pid": 6,
    "level": "error",
    "error": {
        "message": "Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 10)",
        "name": "UnhandledPromiseRejectionWarning",
        "stack": "TypeError: Cannot read property 'statusCodes' of undefined at Network._server.events.on (/usr/share/kibana/node_modules/oppsy/lib/network.js:56:38) at module.exports.internals.Podium.internals.Podium.emit (/usr/share/kibana/node_modules/podium/lib/index.js:220:49) at Request._finalize (/usr/share/kibana/node_modules/hapi/lib/request.js:406:27) at Request._reply (/usr/share/kibana/node_modules/hapi/lib/request.js:345:14) at process._tickCallback (internal/process/next_tick.js:68:7)"
    },
    "message": "Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 10)"
}

Can anyone please help? Compose, Kibana and Elastic yml's:

docker-compose:

version: '3.2'

services:

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
    container_name: elasticsearch
    ports:
      - 9200:9200
    environment:
      - node.name=elasticsearch
      - discovery.type=single-node
      - "ELASTIC_PASSWORD=changeme"
      - "ES_JAVA_OPTS=-Xms4000m -Xmx6000m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - ./config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
      - esdata:/usr/share/elasticsearch/data
    networks:
      - elk

  kibana:
    image: docker.elastic.co/kibana/kibana:7.5.2
    depends_on:
      - elasticsearch
    ports:
      - 5601:5601
    volumes:
      - ./config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro
  #   - ./config/kibana-plugins:/usr/share/kibana/plugins:ro
      - ./config/certs:/etc/certs
      - kbndata:/usr/share/kibana/data
    networks:
      - elk
  # configure-security:
  #   image: yauritux/busybox-curl
  #   command: security.sh
  #   environment:
  #     - "KIBANA_PASSWORD=kibana"
  #     - "LOGSTASH_PASSWORD=logstash"
  #   depends_on:
  #     - elasticsearch
  #   volumes:
  #     - ./config/security.sh:/bin/security.sh:ro
  
  
networks:
  elk:
    driver: bridge
volumes:
  esdata:
    driver: local
  kbndata:
    driver: local

Kibana.yml

server.port: 5601

server.host: "0"

server.basePath: "/kibana"
server.rewriteBasePath: true
elasticsearch.username: elastic
elasticsearch.password: changeme

server.maxPayloadBytes: 524288000

server.name: kibana
xpack.monitoring.ui.container.elasticsearch.enabled: true
elasticsearch.hosts: [ "http://elasticsearch:9200" ]

Elasticsearch,yml:

bootstrap.memory_lock: true
http.max_content_length: 1000mb
network.host: 0.0.0.0
http.port: 9200

Can you try with the docker compose file provided here?
https://www.elastic.co/guide/en/elastic-stack-get-started/current/get-started-docker.html

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