137 ERROR delete piece failed (consistently)

Hello guys,

After being here for couple of months now I have read about some serious issues with SNO’s so mine maybe won’t be that important but i still think i have to mention it.

After a reboot due to power outage, every XX:36:12 on all hours i am receiving on my emails 127 errors, thanks to my script here , which are all the same ERROR collector unable to delete piece.

This issue seems resolved because people from here (@fmoledina ) and here @BrightSilence mentioned a manual solution to delete each piece from blobs folders.

***ps: i don’t blame any of you guys and thanks for your contributions here on the community

But in my case i have 127 different piece ids which actually come from the same 3 satellites as you can see here: (piece is the file i copied errors to)

~$ wc -l piece
137 piece
~$ grep "12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S" piece |wc -l
12
~$ grep "121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6" piece |wc -l
7
~$ grep "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs" piece |wc -l
118

and we can see the consistency here: (for one of all the pieces)

$ docker logs storagenode --tail 20000 2>&1 |grep 5EV5I6FVZUCPNUBZ4K65ARKFU2G3ZWYZVRBNOI3M3JUITUIQHXFQ
2022-09-19T06:36:12.916Z	ERROR	collector	unable to delete piece	{"Process": "storagenode", "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Piece ID": "5EV5I6FVZUCPNUBZ4K65ARKFU2G3ZWYZVRBNOI3M3JUITUIQHXFQ", "error": "pieces error: filestore error: file does not exist", "errorVerbose": "pieces error: filestore error: file does not exist\n\tstorj.io/storj/storage/filestore.(*blobStore).Stat:103\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).pieceSizes:245\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).Delete:226\n\tstorj.io/storj/storagenode/pieces.(*Store).Delete:299\n\tstorj.io/storj/storagenode/collector.(*Service).Collect:97\n\tstorj.io/storj/storagenode/collector.(*Service).Run.func1:57\n\tstorj.io/common/sync2.(*Cycle).Run:160\n\tstorj.io/storj/storagenode/collector.(*Service).Run:53\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2.1:87\n\truntime/pprof.Do:40\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2:86\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57"}
2022-09-19T07:36:15.636Z	ERROR	collector	unable to delete piece	{"Process": "storagenode", "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Piece ID": "5EV5I6FVZUCPNUBZ4K65ARKFU2G3ZWYZVRBNOI3M3JUITUIQHXFQ", "error": "pieces error: filestore error: file does not exist", "errorVerbose": "pieces error: filestore error: file does not exist\n\tstorj.io/storj/storage/filestore.(*blobStore).Stat:103\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).pieceSizes:245\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).Delete:226\n\tstorj.io/storj/storagenode/pieces.(*Store).Delete:299\n\tstorj.io/storj/storagenode/collector.(*Service).Collect:97\n\tstorj.io/storj/storagenode/collector.(*Service).Run.func1:57\n\tstorj.io/common/sync2.(*Cycle).Run:160\n\tstorj.io/storj/storagenode/collector.(*Service).Run:53\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2.1:87\n\truntime/pprof.Do:40\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2:86\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57"}
2022-09-19T08:36:12.705Z	ERROR	collector	unable to delete piece	{"Process": "storagenode", "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Piece ID": "5EV5I6FVZUCPNUBZ4K65ARKFU2G3ZWYZVRBNOI3M3JUITUIQHXFQ", "error": "pieces error: filestore error: file does not exist", "errorVerbose": "pieces error: filestore error: file does not exist\n\tstorj.io/storj/storage/filestore.(*blobStore).Stat:103\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).pieceSizes:245\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).Delete:226\n\tstorj.io/storj/storagenode/pieces.(*Store).Delete:299\n\tstorj.io/storj/storagenode/collector.(*Service).Collect:97\n\tstorj.io/storj/storagenode/collector.(*Service).Run.func1:57\n\tstorj.io/common/sync2.(*Cycle).Run:160\n\tstorj.io/storj/storagenode/collector.(*Service).Run:53\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2.1:87\n\truntime/pprof.Do:40\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2:86\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57"}

I am also aware of this post pointing out here in an issue which is marked as completed for some reason but to be honest i don’t even really understand what i am watching there. ( it is actually an infinity loop between one post in forum and one in github where one points to another for the solution)

I could spent an hour of my life deleting manually all the files, or maybe again one hour to create another script which will take all the pieces id’s from the logs and touch the relevant files to satisfy the collector but i wonder if there is any other solution out there which will get us out of this hustle.

  • Issue seems solved 4 days ago in some other post but my node is fully updated and i don’t see any solution.

  • My thought: why don’t the collector just stop trying to delete the piece from the first time it tries? Could the old deleted piece be recreated or sth?

1 Like

In one of the threads you mentioned I posted as bash script which gets the pieces from the log and creates the missing files as empty files

If you prefer a Powershell script, look at the post above.

Thanks :wink:
This is simmilar to what i have been thinking to do. Sorry i didn’t see it it was just a huge thread and i didn’t look all of it except the marked solution answer and some of the first posts.

I will wait in case i can help the team to create a more general solution to the problem were SNO’S doesn’t have to do anything like that (which is ideal of course), but otherwise i will run this

This usually means there will be a change in the next release. There does seem to be a related change here for v1.64. However, that’s a partial change that won’t fix the underlying issue.

But there’s also a new issue here:

The bug was closed by this commit: storagenode/collector: fix error check when file does not exist · storj/storj@64e5fb7 · GitHub

As you can see in the commit message it will not fix this bug but the link alone makes it so that the bugs get closed by github.

Ok so i assume there is still work in progress about this?

@BrightSilence why this storjrobot keep saying the issue is mentioned? Is this another bug :rofl:

Because it’s been mentioned a few times. Doesn’t sound like a bug to me.