【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了




相关推荐
XT46256 天前
SkyWalking 支持的告警通知方式(Alarm Hooks)类型
skywalking
搞不懂语言的程序员7 天前
docker 部署Skywalking
docker·容器·skywalking
观测云7 天前
通过 KafkaMQ 接入Skywalking 数据最佳实践
skywalking
Oooon_the_way9 天前
性能测试工具-SkyWalking
性能测试·skywalking
XT462514 天前
skywalking 原理
skywalking
yangmf204014 天前
APM 系列(一):Skywalking 与 Easyearch 集成
大数据·elasticsearch·搜索引擎·skywalking
sniper_fandc17 天前
Spring Cloud系列—SkyWalking告警和飞书接入
spring cloud·skywalking
飞火流星020271 个月前
SkyWalking异步采集spring gateway日志
gateway·skywalking·日志监控·gateway链路监控
鼠鼠我捏,要死了捏2 个月前
基于SkyWalking的微服务APM监控实战指南
skywalking·apm·microservices
HeXDev2 个月前
【SkyWalking】服务端部署与微服务无侵入接入实战指南
java·微服务·架构·skywalking·链路追踪·微服务治理