0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

K8S内のVictoriaMetricsが起動しなくなった

Last updated at Posted at 2024-07-20

概要

電源の瞬断によりVictoriaMetricsが以下のエラーを履いたので修正できるように直した。

2024-07-20T09:08:55.771Z	panic	VictoriaMetrics/lib/storage/part_header.go:150	FATAL: cannot parse "/victoria-metrics-data/data/small/2024_07/17E1AD9C3BD4C517/metadata.json": unexpected end of JSON input
panic: FATAL: cannot parse "/victoria-metrics-data/data/small/2024_07/17E1AD9C3BD4C517/metadata.json": unexpected end of JSON input

原因を調べる

上記で、フォルダ名を調べたら以下の通り0バイトファイルなっていた。

$ ls -la
合計 656
drwxr-xr-x+ 2 root root   4096  7月 20 18:52 .
drwxr-xr-x+ 9 root root   4096  7月 20 18:53 ..
-rw-rw-r--+ 1 root root      0  7月 20 18:52 index.bin
-rw-rw-r--+ 1 root root      0  7月 20 18:52 metadata.json
-rw-rw-r--+ 1 root root      0  7月 20 18:52 metaindex.bin
-rw-rw-r--+ 1 root root      0  7月 20 18:52 timestamps.bin
-rw-rw-r--+ 1 root root      0  7月 20 18:52 values.bin

とりあえず、これが怪しいので、フォルダごと削除したけど、ソフトを再起動したけど以下のログ吐いた

panic: FATAL: cannot parse metadata from "/victoria-metrics-data/data/small/2024_07/17E1AD9C3BD4C517": unexpected number of substrings in the part name "17E1AD9C3BD4C517": got 1; want 5

そういえば、parts.jsonファイルを調べたら、17E1AD9C3BD4C517という文字列があったので、編集して削除したフォルダの文字列を削除を実施

一応、その再起動で、ソフトがうまく起動したので、問題は解決した

結論

以下の作業を実施すればとりあえずは解決する

  • panicメッセージのフォルダの中身を確認して異常がないことを調べる
  • もしフォルダを削除する場合はparts.jsonのファイルを編集する
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?