【skywalking】index“:“skywalking_metrics-all“},“status“:404}

skywalking 启动报错

java 复制代码
java.lang.RuntimeException: {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [skywalking_metrics-all]","resource.t
ype":"index_or_alias","resource.id":"skywalking_metrics-all","index_uuid":"_na_","index":"skywalking_metrics-all"}],"type":"index_not_found_exception","reason":
"no such index [skywalking_metrics-all]","resource.type":"index_or_alias","resource.id":"skywalking_metrics-all","index_uuid":"_na_","index":"skywalking_metrics
-all"},"status":404}
        at org.apache.skywalking.library.elasticsearch.client.SearchClient.lambda$search$0(SearchClient.java:51) ~[library-elasticsearch-client-10.1.0.jar:10.1.
0]
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
        at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
        at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147) ~[?:?]
        at com.linecorp.armeria.common.stream.AggregationSupport.lambda$aggregate$2(AggregationSupport.java:133) ~[armeria-1.29.3.jar:?]
        at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934) ~[?:?]
        at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911) ~[?:?]
        at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
        at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147) ~[?:?]
        at com.linecorp.armeria.common.stream.DeferredStreamMessage.lambda$delegate$1(DeferredStreamMessage.java:187) ~[armeria-1.29.3.jar:?]
        at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934) ~[?:?]
        at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911) ~[?:?]

去ES里面查看

没有找到

skywalking_metrics-all

在 Elasticsearch 的管理后台中创建名为 skywalking_records-all 的索引的详细步骤:

一、使用 Kibana Dev Tools(推荐)

  1. 打开 Kibana

    • 默认地址为 http://your_kibana_host:5601(如 http://localhost:5601)。

    • 登录到 Kibana。

  2. 进入 Dev Tools

    • 在左侧菜单中,点击 "Dev Tools"
  3. 执行创建索引的命令

    • 在控制台中输入以下命令并运行:
java 复制代码
PUT /skywalking_records-all
{
  "mappings": {
    "properties": {
      "@timestamp": {
        "type": "date"
      },
      "operation_name": {
        "type": "keyword"
      },
      "service_name": {
        "type": "keyword"
      },
      "latency": {
        "type": "float"
      },
      "status": {
        "type": "keyword"
      },
      "tags": {
        "type": "object"
      }
    }
  }
}

再次启动Kibana

提示:找不到 kywalking_records-all

创建一下:

java 复制代码
PUT /skywalking_records-all
{
  "mappings": {
    "properties": {
      "@timestamp": {
        "type": "date"
      },
      "operation_name": {
        "type": "keyword"
      },
      "service_name": {
        "type": "keyword"
      },
      "latency": {
        "type": "float"
      },
      "status": {
        "type": "keyword"
      },
      "tags": {
        "type": "object"
      },
      "start_time": {
        "type": "date"
      }
    }
  }
}

再次启动Kibana

提示:

java 复制代码
{
	"error": {
		"root_cause": [
			{
				"type": "query_shard_exception",
				"reason": "No mapping found for [start_time] in order to sort on",
				"index_uuid": "ZENCEY8DTqmALuxkuSiYdA",
				"index": "skywalking_records-all"
			}
		],
		"type": "search_phase_execution_exception",
		"reason": "all shards failed",
		"phase": "query",
		"grouped": true,
		"failed_shards": [
			{
				"shard": 0,
				"index": "skywalking_records-all",
				"node": "KUGv_q19QomaoM8D5H1NPQ",
				"reason": {
					"type": "query_shard_exception",
					"reason": "No mapping found for [start_time] in order to sort on",
					"index_uuid": "ZENCEY8DTqmALuxkuSiYdA",
					"index": "skywalking_records-all"
				}
			}
		]
	},
	"status": 400
}

这个错误表明在 skywalking_records-all 索引中尝试对 start_time 字段进行排序时,Elasticsearch 无法找到该字段的映射。这通常是因为索引中没有定义 start_time 字段,或者该字段从未被写入过数据。

执行下面命令

java 复制代码
PUT /skywalking_records-all/_mapping
{
  "properties": {
    "start_time": {
      "type": "date"
    }
  }
}

再再次启动Kibana

java 复制代码
 ./startup.sh 

这会OK了




相关推荐
Linux-18742 天前
分布式链路追踪系统之docker-compose安装skywalking
云原生·docker-compose·skywalking·分布式链路追踪系统·应用程序性能监控
流烟默3 天前
SpringBoot应用链路追踪 traceId 技术方案
spring boot·skywalking·traceid
Linux-18743 天前
分布式链路追踪系统之二进制安装skywalking
elasticsearch·云原生·skywalking·分布式链路追踪系统·应用程序性能监控
令狐前生6 天前
SpringBoot3项目集成Skywalking示例
skywalking
乒乓狂魔8 天前
SkyWalking 也能 AI 智能化了
人工智能·skywalking
摇滚侠16 天前
Skywalking 应用性能监控和可观测性分析平台 简介
skywalking
Databuff16 天前
skywalking 快速使用入门
skywalking
摇滚侠18 天前
Apache Skywalking 实战 阅读笔记 第三章
笔记·apache·skywalking
摇滚侠19 天前
Apache Skywalking 实战 阅读笔记 第二章
笔记·apache·skywalking
Databuff19 天前
国产开源APM databuff 成为 CNCF 顶级项目opentelemetry 官宣Vendor
运维·开源·skywalking·apm·可观测性·opentelemetry