Kibana 6.2.2 unable to connect to Elastic with xpack settings disabled

I am using kibana-docker 6.2.2 to connect to Elastic-docker 6.2.2 using http and xpack settings disabled.

I am running into this error even though xpack settings are disabled for both sides.
Aprreciate help in this regard.

+       docker run --name kibana \
+       -e ELASTICSEARCH_URL=http://localhost:9200 \
+       -e ELASTICSEARCH_USERNAME=elastic \
+       -e ELASTICSEARCH_PASSWD=changeme \
+       -e xpack.security.enabled=false \
+       -e xpack.graph.enable=false \
+       -e xpack.watcher.enabled=false \
+       -e xpack.ml.enabled=false \
+       -e xpack.monitoring.enabled=false \
+       -e xpack.monitoring.ui.container.elasticsearch.enabled \
+       -p 127.0.0.1:5601:5601 -d docker.elastic.co/kibana/kibana:6.2.2


{"type":"log","@timestamp":"2018-03-14T15:31:34Z","tags":["warning","elasticsearch","data"],"pid":1,"message":"No living connections"}
{"type":"log","@timestamp":"2018-03-14T15:31:34Z","tags":**["license","warning","xpack"],"pid":1,"message":"License information from the X-Pack plugin could not be obtained from Elasticsearch for the [data] cluster. Error: No Living connections"}**
**{"type":"log","@timestamp":"2018-03-14T15:31:35Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://localhost:9200/"}**
{"type":"log","@timestamp":"2018-03-14T15:31:35Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}

Elastic settings are as follows..

MacBook-Pro[sw] $ docker exec -it test-elasticsearch env
PATH=/usr/share/elasticsearch/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=045a2e06f692
TERM=xterm
xpack.ml.enabled=false
ES_JAVA_OPTS=-Xms512m -Xmx512m
cluster.name=test-elasticcluster
xpack.security.enabled=false
xpack.monitoring.enabled=false
xpack.graph.enabled=false
xpack.watcher.enabled=false
ELASTIC_CONTAINER=true
JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk
HOME=/root

MacBook-Pro[sw] $ curl localhost:9200/
{
  "name" : "aJL1I33",
  "cluster_name" : "test-elasticcluster",
  "cluster_uuid" : "8qWcj3MfQWqwK3dgzMZXVA",
  "version" : {
    "number" : "6.2.2",
    "build_hash" : "10b1edd",
    "build_date" : "2018-02-16T19:01:30.685723Z",
    "build_snapshot" : false,
    "lucene_version" : "7.2.1",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

MacBook-Pro[sw] $ curl localhost:9200/_xpack/license
{
  "license" : {
    "status" : "active",
    "uid" : "37627fbf-aa20-4a9e-8089-1a6c87eda27d",
    "type" : "basic",
    "issue_date" : "2018-03-14T04:05:55.500Z",
    "issue_date_in_millis" : 1521000355500,
    "expiry_date" : "2018-04-13T04:05:55.500Z",
    "expiry_date_in_millis" : 1523592355500,
    "max_nodes" : 1000,
    "issued_to" : "test-elasticcluster",
    "issuer" : "elasticsearch",
    "start_date_in_millis" : -1
  }
}

MacBook-Pro[sw] $ curl localhost:9200/_xpack?pretty
{
  "build" : {
    "hash" : "ed9924c",
    "date" : "2018-02-16T20:07:13.199081Z"
  },
  "license" : {
    "uid" : "37627fbf-aa20-4a9e-8089-1a6c87eda27d",
    "type" : "basic",
    "mode" : "basic",
    "status" : "active",
    "expiry_date_in_millis" : 1523592355500
  },
  "features" : {
    "graph" : {
      "description" : "Graph Data Exploration for the Elastic Stack",
      "available" : false,
      "enabled" : false
    },
    "logstash" : {
      "description" : "Logstash management component for X-Pack",
      "available" : false,
      "enabled" : true
    },
    "ml" : {
      "description" : "Machine Learning for the Elastic Stack",
      "available" : false,
      "enabled" : false,
      "native_code_info" : {
        "version" : "N/A",
        "build_hash" : "N/A"
      }
    },
    "monitoring" : {
      "description" : "Monitoring for the Elastic Stack",
      "available" : true,
      "enabled" : false
    },
    "security" : {
      "description" : "Security for the Elastic Stack",
      "available" : false,
      "enabled" : false
    },
    "watcher" : {
      "description" : "Alerting, Notification and Automation for the Elastic Stack",
      "available" : false,
      "enabled" : false
    }
  },
  "tagline" : "You know, for X"
}

Just to confirm, are you using the Docker containers from docker.elastic.co?

It appears your environment variables are incorrect for the X-Pack settings. You want to follow the same naming convention outlined here.

xpack.security.enabled should be XPACK_SECURITY_ENABLED

Hi

Yes I am using docker.elastic.co docker but with env-variable passed as args.

Is the issue with to elastic env setting or Kibana env setting ?

The issue is with the first example you gave showing how you are running Kibana.

Per the link, in Docker we convert the standard Kibana settings to environment variables though they are represented in all CAPS and using underscores as word separators.

docker run --name kibana \
  -e ELASTICSEARCH_URL=http://localhost:9200 \
  -e ELASTICSEARCH_USERNAME=elastic \
  -e ELASTICSEARCH_PASSWORD=changeme \
  -E XPACK_SECURITY_ENABLED=false \
  -E XPACK_GRAPH_ENABLE=false \
  -E XPACK_WATCHER_ENABLED=false \
  -E XPACK_ML_ENABLED=false \
  -E XPACK_MONITORING_ENABLED=false \
  -E XPACK_MONITORING_UI_CONTAINER_ELASTICSEARCH_ENABLED \
  -p 127.0.0.1:5601:5601 -d docker.elastic.co/kibana/kibana:6.2.2

Also, ELASTICSEARCH_PASSWD should have been ELASTICSEARCH_PASSWORD

Here are the standard Kibana configuration options: https://www.elastic.co/guide/en/kibana/current/settings.html

And X-Pack: https://www.elastic.co/guide/en/x-pack/current/xpack-settings.html

Also, seeing as your disabling all the X-Pack features you might want to just use the OSS image which doesn't have them to begin with: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.2

Thanks for response and suggestions.

It turned out the reachability issue from inside kibana docker. The localhost:9200 config needs to be changed to hostname/addr:9200 that can be reachable from inside docker.

Rest of the params and environment worked as is.

The issue can be closed now.

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