prometheus - 실행 에러 (opening storage failed)

salgu·2022년 7월 22일
2

grafana

목록 보기
4/5

에러 로그


level=info ts=2022-07-22T07:37:55.811Z caller=main.go:583 msg="Stopping scrape manager..."
level=info ts=2022-07-22T07:37:55.811Z caller=main.go:557 msg="Notify discovery manager stopped"
level=info ts=2022-07-22T07:37:55.811Z caller=web.go:523 component=web msg="Start listening for connections" address=0.0.0.0:9090
level=info ts=2022-07-22T07:37:55.811Z caller=main.go:543 msg="Scrape discovery manager stopped"
level=info ts=2022-07-22T07:37:55.811Z caller=manager.go:882 component="rule manager" msg="Stopping rule manager..."
level=info ts=2022-07-22T07:37:55.811Z caller=manager.go:892 component="rule manager" msg="Rule manager stopped"
level=info ts=2022-07-22T07:37:55.811Z caller=notifier.go:601 component=notifier msg="Stopping notification manager..."
level=info ts=2022-07-22T07:37:55.811Z caller=main.go:749 msg="Notifier manager stopped"
level=info ts=2022-07-22T07:37:55.811Z caller=main.go:577 msg="Scrape manager stopped"
level=error ts=2022-07-22T07:37:55.811Z caller=main.go:758 err="opening storage failed: lock DB directory: resource temporarily unavailable"

해결법


다음과 같은 에러가 난다면

prometheus를 쓰는 해당 포트를 죽인뒤 ./prometheus/data 디렉토리 안에
lock 파일을 삭제 하고 prometheus를 다시 실행해줍니다.

lock파일은 동시성 문제가 발생하지 않기 위한 파일이고
비정상 종료했을때 삭제되지 않고 남아있던 것으로 추측됩니다.

profile
https://github.com/leeeesanggyu, leeeesanggyu@gmail.com

0개의 댓글