[ERROR][elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. getaddrinfo ENOTFOUND poem

Hi all. I tried to install elastic stack 8.2.2 with docker following the instruction in document. But Kibana server just cannot be ready. Could anybody help me please...

My docker-compose:

version: "3"
 services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:8.2.2
    container_name: stane_es
    ports:
      - 9200:9200
    environment:
      - node.name=node-poem
      - ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
      - discovery.type=single-node
      - bootstrap.memory_lock=true
      - xpack.security.enabled=true
      - xpack.security.http.ssl.enabled=true
      - xpack.security.http.ssl.key=certs/poem/poem.key
      - xpack.security.http.ssl.certificate=certs/poem/poem.crt
      - xpack.security.http.ssl.certificate_authorities=certs/ca/ca.crt
      - xpack.security.http.ssl.verification_mode=certificate
      - xpack.security.transport.ssl.enabled=true
      - xpack.security.transport.ssl.key=certs/poem/poem.key
      - xpack.security.transport.ssl.certificate=certs/poem/poem.crt
      - xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt
      - xpack.security.transport.ssl.verification_mode=certificate
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - ./docker/elasticsearch/certs:/usr/share/elasticsearch/config/certs
      - esdata:/usr/share/elasticsearch/data

  kibana:
    image: docker.elastic.co/kibana/kibana:8.2.2
    container_name: stane_kb
    environment:
      - SERVERNAME=kibana
      - ELASTICSEARCH_HOSTS=https://poem:9200
      - ELASTICSEARCH_USERNAME=kibana_system
      - ELASTICSEARCH_PASSWORD=${KIBANA_PASSWORD}
      - ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES=config/certs/ca/ca.crt
    ports:
      - 5601:5601
    depends_on:
      - elasticsearch
    volumes:
      - ./docker/elasticsearch/certs:/usr/share/kibana/config/certs
      - kibanadata:/usr/share/kibana/data

volumes:
  esdata:
    driver: local
  kibanadata:
    driver: local

.env file:

# Password for the 'elastic' user (at least 6 characters)
ELASTIC_PASSWORD=elastic123...

# Password for the 'kibana_system' user (at least 6 characters)
KIBANA_PASSWORD=kibana123...

instances.yml:

instances:
   - name: poem
     dns:
       - poem
       - localhost
     ip:
       - 127.0.0.1

When docker-compose up, the error occurs like :[ERROR][Elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. getaddrinfo ENOTFOUND poem

By the way, I run the bash script in the container to create the ca and cert before adding the relevant environments in the docker-compose. So the ca and cert files all exist.

I am a new guy to docker and es, so thank you for helping me ^ ^

The full Kibana logs is as follow:

[2022-06-12T14:38:22.068+00:00][INFO ][plugins-service] Plugin "cloudSecurityPosture" is disabled.

[2022-06-12T14:38:22.100+00:00][INFO ][plugins-service] Plugin "metricsEntities" is disabled.

[2022-06-12T14:38:22.172+00:00][INFO ][http.server.Preboot] http server running at http://0.0.0.0:5601

[2022-06-12T14:38:22.237+00:00][INFO ][plugins-system.preboot] Setting up [1] plugins: [interactiveSetup]

[2022-06-12T14:38:22.276+00:00][WARN ][config.deprecation] The default mechanism for Reporting privileges will work differently in future versions, which will affect the behavior of this cluster. Set "xpack.reporting.roles.enabled" to "false" to adopt the future behavior before upgrading.

[2022-06-12T14:38:22.468+00:00][INFO ][plugins-system.standard] Setting up [117] plugins: [translations,monitoringCollection,licensing,globalSearch,globalSearchProviders,features,mapsEms,licenseApiGuard,usageCollection,taskManager,telemetryCollectionManager,telemetryCollectionXpack,kibanaUsageCollection,share,embeddable,uiActionsEnhanced,screenshotMode,screenshotting,banners,newsfeed,fieldFormats,expressions,eventAnnotation,dataViews,charts,esUiShared,bfetch,data,savedObjects,presentationUtil,expressionShape,expressionRevealImage,expressionRepeatImage,expressionMetric,expressionImage,customIntegrations,home,searchprofiler,painlessLab,grokdebugger,management,watcher,advancedSettings,spaces,security,savedObjectsTagging,reporting,lists,fileUpload,ingestPipelines,encryptedSavedObjects,dataEnhanced,cloud,snapshotRestore,telemetry,licenseManagement,eventLog,actions,alerting,triggersActionsUi,transform,stackAlerts,ruleRegistry,savedObjectsManagement,console,controls,graph,fleet,indexManagement,remoteClusters,crossClusterReplication,indexLifecycleManagement,visualizations,canvas,visTypeXy,visTypeVislib,visTypeVega,visTypeTimeseries,rollup,visTypeTimelion,visTypeTagcloud,visTypeTable,visTypeMetric,visTypeHeatmap,visTypeMarkdown,dashboard,dashboardEnhanced,expressionXY,expressionTagcloud,expressionPartitionVis,visTypePie,expressionMetricVis,expressionHeatmap,expressionGauge,visTypeGauge,dataViewFieldEditor,sharedUX,discover,lens,osquery,maps,dataVisualizer,ml,cases,timelines,sessionView,securitySolution,observability,uptime,infra,upgradeAssistant,monitoring,logstash,enterpriseSearch,apm,discoverEnhanced,dataViewManagement]

[2022-06-12T14:38:22.482+00:00][INFO ][plugins.taskManager] TaskManager is identified by the Kibana UUID: 004065c7-44a9-4c2a-b39f-b1a4216f7e3e

[2022-06-12T14:38:22.579+00:00][WARN ][plugins.security.config] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.

[2022-06-12T14:38:22.579+00:00][WARN ][plugins.security.config] Session cookies will be transmitted over insecure connections. This is not recommended.

[2022-06-12T14:38:22.595+00:00][WARN ][plugins.security.config] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.

[2022-06-12T14:38:22.596+00:00][WARN ][plugins.security.config] Session cookies will be transmitted over insecure connections. This is not recommended.

[2022-06-12T14:38:22.608+00:00][WARN ][plugins.reporting.config] Generating a random key for xpack.reporting.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.reporting.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.

[2022-06-12T14:38:22.610+00:00][WARN ][plugins.reporting.config] Found 'server.host: "0.0.0.0"' in Kibana configuration. Reporting is not able to use this as the Kibana server hostname. To enable PNG/PDF Reporting to work, 'xpack.reporting.kibanaServer.hostname: localhost' is automatically set in the configuration. You can prevent this message by adding 'xpack.reporting.kibanaServer.hostname: localhost' in kibana.yml.

[2022-06-12T14:38:22.618+00:00][WARN ][plugins.encryptedSavedObjects] Saved objects encryption key is not set. This will severely limit Kibana functionality. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.

[2022-06-12T14:38:22.630+00:00][WARN ][plugins.actions] APIs are disabled because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.

[2022-06-12T14:38:22.641+00:00][WARN ][plugins.alerting] APIs are disabled because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.

[2022-06-12T14:38:22.652+00:00][INFO ][plugins.ruleRegistry] Installing common resources shared between all indices

[2022-06-12T14:38:23.090+00:00][INFO ][plugins.screenshotting.config] Chromium sandbox provides an additional layer of protection, and is supported for Linux Ubuntu 20.04 OS. Automatically enabling Chromium sandbox.

**[2022-06-12T14:38:23.174+00:00][ERROR][elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. getaddrinfo ENOTFOUND poem**

[2022-06-12T14:38:24.429+00:00][INFO ][plugins.screenshotting.chromium] Browser executable: /usr/share/kibana/x-pack/plugins/screenshotting/chromium/headless_shell-linux_arm64/headless_shell

[2022-06-12T14:58:22.652+00:00][ERROR][plugins.ruleRegistry] Error: Timeout: it took more than 1200000ms

    at Timeout._onTimeout (/usr/share/kibana/x-pack/plugins/rule_registry/server/rule_data_plugin_service/resource_installer.js:54:20)

    at listOnTimeout (node:internal/timers:559:17)

    at processTimers (node:internal/timers:502:7)

[2022-06-12T14:58:22.674+00:00][ERROR][plugins.ruleRegistry] Error: Failure installing common resources shared between all indices. Timeout: it took more than 1200000ms

    at ResourceInstaller.installWithTimeout (/usr/share/kibana/x-pack/plugins/rule_registry/server/rule_data_plugin_service/resource_installer.js:63:13)

    at ResourceInstaller.installCommonResources (/usr/share/kibana/x-pack/plugins/rule_registry/server/rule_data_plugin_service/resource_installer.js:77:5)

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