我无法将 Kibana 与 elasticsearch 连接起来。两者都在 plesk obsidian 中的单独 docker 容器中运行。
Elasticsearch 正在运行并向“mydomain.com:9200/_cluster/health?pretty”发出 GET 请求 正在给我以下响应(来自通过 ssh 连接的本地网络和来自“外部”):
{
"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
}
这是我的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
kibana 日志的输出:
{
"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."
}
我尝试将 elasticsearch-hosts 设置为公共域而不是本地 ip 地址。我将两个容器连接到一个网络。什么都行不通。错误消息始终相同:“无法从 Elasticsearch 节点检索版本信息。”
谷歌研究绝对没有帮助。
编辑: 我可以在这些容器之间卷曲。 我已将 elasticsearch.username 更改为“kibana_system”
错误信息是什么意思?