FATAL Unrecoverable error {"error": "trust: malformed cache: invalid character '\\x00' looking for beginning of value"

How did you discover it?

“Malformed cache” message in logs sounded like trust-cache.json. “Invalid character …” seemed there is something wrong with this file so I opened it in notepad and saw only this:

image

Now it was clear this file has been corrupted so I removed it and lunched node again. To be honest I was surprised storagenode.exe has downloaded this without any hussle and node became online.

Yes, it is unusual but this is the easiest and clearest solution for me to run multiple nodes on the same Windows machine. I have everything in control and don’t need to fight with docker or program files garbage

Hey there,

got a small problem starting my storagenode since today. As soon as I am trying to start my node via service I am prompted with an unexpected error 1067.

The storagenode.log got the following entries:

|2021-06-10T07:42:22.229+0200|INFO|Configuration loaded|{Location: C:\\Program Files\\Storj\\Storage Node\\config.yaml}|
|---|---|---|---|
|2021-06-10T07:42:22.236+0200|INFO|Operator email|{Address: ---}|
|2021-06-10T07:42:22.236+0200|INFO|Operator wallet|{Address: ---}|
|2021-06-10T07:42:22.262+0200|FATAL|Unrecoverable error|{error: trust: malformed cache: invalid character '\\x00' looking for beginning of value, errorVerbose: trust: malformed cache: invalid character '\\x00' looking for beginning of value\n\tstorj.io/storj/storagenode/trust.LoadCacheData:96\n\tstorj.io/storj/storagenode/trust.LoadCache:36\n\tstorj.io/storj/storagenode/trust.NewPool:86\n\tstorj.io/storj/storagenode.New:378\n\tmain.cmdRun:177\n\tstorj.io/private/process.cleanup.func1.4:363\n\tstorj.io/private/process.cleanup.func1:381\n\tgithub.com/spf13/cobra.(*Command).execute:852\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:960\n\tgithub.com/spf13/cobra.(*Command).Execute:897\n\tstorj.io/private/process.ExecWithCustomConfig:88\n\tstorj.io/private/process.Exec:65\n\tmain.(*service).Execute.func1:64\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57}|
|2021-06-10T07:42:25.953+0200|INFO|Configuration loaded|{Location: C:\\Program Files\\Storj\\Storage Node\\config.yaml}|
|2021-06-10T07:42:25.961+0200|INFO|Operator email|{Address: ---}|
|2021-06-10T07:42:25.961+0200|INFO|Operator wallet|{Address: ---}|
|2021-06-10T07:42:25.986+0200|FATAL|Unrecoverable error|{error: trust: malformed cache: invalid character '\\x00' looking for beginning of value, errorVerbose: trust: malformed cache: invalid character '\\x00' looking for beginning of value\n\tstorj.io/storj/storagenode/trust.LoadCacheData:96\n\tstorj.io/storj/storagenode/trust.LoadCache:36\n\tstorj.io/storj/storagenode/trust.NewPool:86\n\tstorj.io/storj/storagenode.New:378\n\tmain.cmdRun:177\n\tstorj.io/private/process.cleanup.func1.4:363\n\tstorj.io/private/process.cleanup.func1:381\n\tgithub.com/spf13/cobra.(*Command).execute:852\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:960\n\tgithub.com/spf13/cobra.(*Command).Execute:897\n\tstorj.io/private/process.ExecWithCustomConfig:88\n\tstorj.io/private/process.Exec:65\n\tmain.(*service).Execute.func1:64\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57}|

I can start the node via commandline without any errors. Is there anything I can do to fix the service-thingy?

Sincerely,

Stefan

PS: I am using the windows gui.

Hello @chesterz ,
Welcome to the forum!

See

1 Like

Hi there,

My node is not working, the service give error 1067

2021-08-29T11:37:12.359+0200 FATAL Unrecoverable error {“error”: “trust: malformed cache: invalid character ‘\x00’ looking for beginning of value”, “errorVerbose”: “trust: malformed cache: invalid character ‘\x00’ looking for beginning of value\n\tstorj.io/storj/storagenode/trust.LoadCacheData:96\n\tstorj.io/storj/storagenode/trust.LoadCache:36\n\tstorj.io/storj/storagenode/trust.NewPool:89\n\tstorj.io/storj/storagenode.New:378\n\tmain.cmdRun:177\n\tstorj.io/private/process.cleanup.func1.4:363\n\tstorj.io/private/process.cleanup.func1:381\n\tgithub.com/spf13/cobra.(*Command).execute:852\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:960\n\tgithub.com/spf13/cobra.(*Command).Execute:897\n\tstorj.io/private/process.ExecWithCustomConfig:88\n\tstorj.io/private/process.Exec:65\n\tmain.(*service).Execute.func1:64\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57”}

any idea??? thank you

That’s what Alexey proposes:

To fix an issue - please:

  1. Stop the storagenode service either from the Services applet or from the elevated PowerShell:
Stop-Service storagenode
  1. Check disk for errors with correction.
  2. Remove the trust-cache.json from the data location
  3. Restart the storagenode service either from the Services applet or from the elevated PowerShell:
Restart-Service storagenode
  1. Check your logs.
1 Like

hi, my node stoped working since 4 days, i checked everything, hdd has no errors, have an static ipv4, restard diddnt helped, identity is ok. but port is shown as closed and i cant figure out why. reseted my router and made a new rule, puplic ip hasnt changed and is correct in yams. in the log it looks like it startet with an clocksync error, fixed that, but now i get an fatal error since 4 days. can post log because new mewmember?

Hello @Lumicron ,
Welcome to the forum!

1 Like

thx for the quick response. but where is trust-cache.json exactly located? i diddnt changed the install path.

In the data location. The folder, which contains all customers data. Depending on type of your storagenode it’s either specified in the storage.path: parameter of your config.yaml or in the --mount type=bind,source=/here/your/path/to/the/data/location,destination=/app/config option of the docker run command.

found it…under programs/storj…in jams its just c:…searched for hours…

can i delete storagenode.log after i got my node back online? it is almost 4 GB big…and i need a special programm that needs more than 10 minutes to open it.

You can zip it before deletion.
To delete log you need to stop the service, zip the log, delete the log, start the service.

You can also use this script: GitHub - AlexeyALeonov/storagenode_win_log_rotate: Windows GUI storagenode log rotation script (doesn't compatible with logrotate)

1 Like

thx, node is finaly back online

2022-08-08T19:36:41.458+0800 FATAL Unrecoverable error {“error”: “trust: malformed cache: invalid character ‘\x00’ looking for beginning of value”, “errorVerbose”: “trust: malformed cache: invalid character ‘\x00’ looking for beginning of value\n\tstorj.io/storj/storagenode/trust.LoadCacheData:96\n\tstorj.io/storj/storagenode/trust.LoadCache:36\n\tstorj.io/storj/storagenode/trust.NewPool:89\n\tstorj.io/storj/storagenode.New:379\n\tmain.cmdRun:210\n\tstorj.io/private/process.cleanup.func1.4:372\n\tstorj.io/private/process.cleanup.func1:390\n\tgithub.com/spf13/cobra.(*Command).execute:852\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:960\n\tgithub.com/spf13/cobra.(*Command).Execute:897\n\tstorj.io/private/process.ExecWithCustomConfigAndLogger:93\n\tstorj.io/private/process.ExecWithCustomConfig:75\n\tstorj.io/private/process.Exec:65\n\tmain.(*service).Execute.func1:61\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57”}

Hello, I had to shutdown the computer for maintenance, and now the node doesnt start anymore…

I have this fatal error :
2022-11-24T13:15:51.612+0100 FATAL Unrecoverable error {“error”: “trust: malformed cache: invalid character ‘\x00’ looking for beginning of value”, “errorVerbose”: “trust: malformed cache: invalid character ‘\x00’ looking for beginning of value\n\tstorj.io/storj/storagenode/trust.LoadCacheData:95\n\tstorj.io/storj/storagenode/trust.LoadCache:35\n\tstorj.io/storj/storagenode/trust.NewPool:90\n\tstorj.io/storj/storagenode.New:401\n\tmain.cmdRun:210\n\tstorj.io/private/process.cleanup.func1.4:377\n\tstorj.io/private/process.cleanup.func1:395\n\tgithub.com/spf13/cobra.(*Command).execute:852\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:960\n\tgithub.com/spf13/cobra.(*Command).Execute:897\n\tstorj.io/private/process.ExecWithCustomConfigAndLogger:92\n\tstorj.io/private/process.ExecWithCustomConfig:74\n\tstorj.io/private/process.Exec:64\n\tmain.(*service).Execute.func1:61\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:75”}

I tried to reboot the computer multiple times still doesnt work.
What can I do ?

2 Likes

That was a fast solution, thank you