Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix vault error: failed to read request counters: invalid character '\x00' looking for beginning of value?

I worked with hasicorp's vault for some months. After my Windows had a restart in the night, I am not longer able to unseal my vault, because of the following error message (after giving the third/last unseal key):

Error unsealing: Error making API request.

URL: PUT http://127.0.0.1:8200/v1/sys/unseal

Code: 500. Errors:

  • failed to read request counters: invalid character '\x00' looking for beginning of value
like image 846
PowerStat Avatar asked Jun 06 '19 05:06

PowerStat


1 Answers

Because of the restart I looked for corrupted files and found one at:

[...]\vault\sys\counters\requests\2019\

within this directory there are files named like:

_04

_05

_06

When these files are ok, their content looks like:

{"Value":"AAAAAQK[....]"}

But one of these was filled with \x00 values instead.

After deleting this file, unsealing works again - so problem solved.

like image 198
PowerStat Avatar answered Oct 04 '22 02:10

PowerStat