Unable to retrieve version information from Elasticsearch nodes

Im not able to connect Kibana with elasticsearch. Both running in seperate docker containers in plesk obsidian.

Elasticsearch is running and a GET request to "mydomain.com:9200/_cluster/health?pretty"
is giving me following response (from local network connected via ssh and from 'outside'):

{
"cluster_name" : "avmlog",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 1,
"active_shards" : 1,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}

this is the content of my elasticsearch.yml:

    cluster.name: "avmlog"
    network.host: "0.0.0.0" // only for dev
    node.name: "log-node-1"
    node.master: true
    discovery.seed_hosts: ["172.17.0.1"]
    cluster.initial_master_nodes: ["log-node-1"]

    xpack.security.enabled: true
    xpack.security.transport.ssl.enabled: true
    xpack.security.transport.ssl.verification_mode: certificate
    xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
    xpack.security.transport.ssl.truststore.path: elastic-certificates.p12

kibana.yml:

server.host: "0.0.0.0" // only for dev
server.port: 5601
elasticsearch.hosts: [ "http://172.17.0.1:9200" ]
monitoring.ui.container.elasticsearch.enabled: true
elasticsearch.username: "kibana_system"
elasticsearch.password: "MyPassword"

xpack.encryptedSavedObjects.encryptionKey: xxxxxxxxxxxxxxxxxxxxxx
xpack.reporting.encryptionKey: xxxxxxxxxxxxxxxxxxxxxxxxx
xpack.security.encryptionKey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

output of kibana logs:

{
   "type":"log",
   "@timestamp":"2021-07-10T11:51:34+00:00",
   "tags":[
      "info",
      "plugins-service"
   ],
   "pid":952,
   "message":"Plugin \"timelines\" is disabled."
}{
   "type":"log",
   "@timestamp":"2021-07-10T11:51:34+00:00",
   "tags":[
      "warning",
      "config",
      "deprecation"
   ],
   "pid":952,
   "message":"Setting [elasticsearch.username] to \"MyUsername\" is deprecated. You should use the \"kibana_system\" user instead."
}{
   "type":"log",
   "@timestamp":"2021-07-10T11:51:34+00:00",
   "tags":[
      "warning",
      "config",
      "deprecation"
   ],
   "pid":952,
   "message":"plugins.scanDirs is deprecated and is no longer used"
}{
   "type":"log",
   "@timestamp":"2021-07-10T11:51:34+00:00",
   "tags":[
      "warning",
      "config",
      "deprecation"
   ],
   "pid":952,
   "message":"Config key [monitoring.cluster_alerts.email_notifications.email_address] will be required for email notifications to work in 8.0.\""
}{
   "type":"log",
   "@timestamp":"2021-07-10T11:51:34+00:00",
   "tags":[
      "warning",
      "config",
      "deprecation"
   ],
   "pid":952,
   "message":"Setting [monitoring.username] to \"MyUsername\" is deprecated. You should use the \"kibana_system\" user instead."
}{
   "type":"log",
   "@timestamp":"2021-07-10T11:51:34+00:00",
   "tags":[
      "info",
      "plugins-system"
   ],
   "pid":952,
   "message":"Setting up [106] plugins: [taskManager,licensing,globalSearch,globalSearchProviders,banners,code,usageCollection,xpackLegacy,telemetryCollectionManager,telemetry,telemetryCollectionXpack,kibanaUsageCollection,securityOss,share,newsfeed,mapsEms,mapsLegacy,kibanaLegacy,translations,licenseApiGuard,legacyExport,embeddable,uiActionsEnhanced,esUiShared,expressions,charts,bfetch,data,home,console,consoleExtensions,apmOss,searchprofiler,painlessLab,grokdebugger,management,advancedSettings,savedObjects,visualizations,visTypeTimelion,features,licenseManagement,watcher,visTypeTable,visTypeVislib,visTypeVega,visTypeMarkdown,visTypeMetric,visTypeTagcloud,visTypeXy,tileMap,regionMap,presentationUtil,canvas,graph,timelion,dashboard,dashboardEnhanced,visualize,visTypeTimeseries,inputControlVis,indexPatternManagement,discover,discoverEnhanced,savedObjectsManagement,spaces,security,savedObjectsTagging,lens,reporting,lists,encryptedSavedObjects,dataEnhanced,dashboardMode,beatsManagement,cloud,upgradeAssistant,snapshotRestore,fleet,indexManagement,remoteClusters,crossClusterReplication,rollup,indexLifecycleManagement,enterpriseSearch,transform,ingestPipelines,fileUpload,maps,fileDataVisualizer,eventLog,actions,alerting,triggersActionsUi,stackAlerts,ruleRegistry,observability,osquery,ml,securitySolution,cases,infra,monitoring,logstash,apm,uptime]"
}{
   "type":"log",
   "@timestamp":"2021-07-10T11:51:34+00:00",
   "tags":[
      "info",
      "plugins",
      "taskManager"
   ],
   "pid":952,
   "message":"TaskManager is identified by the Kibana UUID: 60164431-c17a-45b8-b3f3-2ff7cd5e3f98"
}{
   "type":"log",
   "@timestamp":"2021-07-10T11:51:34+00:00",
   "tags":[
      "warning",
      "plugins",
      "security",
      "config"
   ],
   "pid":952,
   "message":"Session cookies will be transmitted over insecure connections. This is not recommended."
}{
   "type":"log",
   "@timestamp":"2021-07-10T11:51:34+00:00",
   "tags":[
      "warning",
      "plugins",
      "reporting",
      "config"
   ],
   "pid":952,
   "message":"Chromium sandbox provides an additional layer of protection, but is not supported for Linux CentOS 8.4.2105\n OS. Automatically setting 'xpack.reporting.capture.browser.chromium.disableSandbox: true'."
}{
   "type":"log",
   "@timestamp":"2021-07-10T11:51:36+00:00",
   "tags":[
      "info",
      "plugins",
      "monitoring",
      "monitoring"
   ],
   "pid":952,
   "message":"config sourced from: production cluster"
}{
   "type":"log",
   "@timestamp":"2021-07-10T11:51:36+00:00",
   "tags":[
      "info",
      "savedobjects-service"
   ],
   "pid":952,
   "message":"Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations..."
}{
   "type":"log",
   "@timestamp":"2021-07-10T11:53:37+00:00",
   "tags":[
      "error",
      "savedobjects-service"
   ],
   "pid":952,
   "message":"Unable to retrieve version information from Elasticsearch nodes."
}

I've tried to set the elasticsearch-hosts to public domain instead od local ip-adresses. I connected both containers to one network. Nothing works. Error-Message is always the same: "Unable to retrieve version information from Elasticsearch nodes."

Google research was not really helpful.

EDIT:
I CAN curl betweeen these containers.
I've changed the elasticsearch.username to "kibana_system"

What does the error message mean?

Please Help!

Which version of the stack which you are running?
How did you add kibana_system user? Did you use api or used the interactive tool to generate the password for it?

Thanks
bhavya

I was able to solve it with following command after elasticsearch was running:

docker run -d --name kibana --link elasticsearch:elasticsearch -p 5601:5601 kibana:7.13.3

which does not make any sense to me to link these containers, since i was building a network containing these both containers.

Why was it necessary then?

They should work if they are connected to the same network, for example this snippet of docker-compose is good for me:

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:${TAG}-amd64
    container_name: elasticsearch
    ports: ['9200:9200']
    networks: ['stack']

  kibana:
    image: docker.elastic.co/kibana/kibana:${TAG}
    container_name: kibana
    ports: ['5601:5601']
    networks: ['stack']
    depends_on: ['elasticsearch']

and this is how it's configured in kibana.yml:
elasticsearch.hosts: https://elasticsearch:9200

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