Алексей спасибо! Я перейду на русский, все равно больше никто не отвечает)
Проделал команды по вашей инструкции, нода вроде бы поднялась, но есть ошибки в логах. Посмотрите, пожалуйста, в конце.
Выкладываю здесь алгоритм, по которому мне удалось восстановить bandwidth.db
Storj4.3
Лог ноды до восстановления:
PS C:\Windows\system32> docker logs --tail 20 storagenode3
“12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs”, “Piece ID”: “ATPGM3DWUR3EQQMJ7HGUNKXXUFSZ7QI2NGOM2P6KRDAYN6QHEUPA”}
2023-04-28T08:51:54.103Z INFO collector deleted expired piece {“Process”: “storagenode”, “Satellite ID”: “12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs”, “Piece ID”: “MSH5WGPV4T4DO4QJMKBN4ZVT4ILWGZSVN5DOWFLB6WZQS7WPJJPQ”}
2023-04-28T08:51:54.525Z INFO piecestore download started {“Process”: “storagenode”, “Piece ID”: “FSJGVMJK5TQKMPSIZ7BHLLAQYAXR7MUNQAAFISE2U3TB676DYZ4A”, “Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Action”: “GET_REPAIR”, “Offset”: 0, “Size”: 2319360, “Remote Address”: “172.17.0.1:53882”}
2023-04-28T08:51:54.537Z INFO collector deleted expired piece {“Process”: “storagenode”, “Satellite ID”: “12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs”, “Piece ID”: “VY3Y5UTSUHQCZ4CQQAVJMBANOQ7C7Z5WLHA4SYWCJEQWPPMHDQ3A”}
2023-04-28T08:51:54.542Z INFO collector collect {“Process”: “storagenode”, “count”: 101}
2023-04-28T08:51:57.555Z INFO piecestore download started {“Process”: “storagenode”, “Piece ID”: “SGPHLLR5PZ5M6BLCISHYLEKI5INUJVS5FNI242B3YW4MU77GWQQA”, “Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Action”: “GET_REPAIR”, “Offset”: 0, “Size”: 181504, “Remote Address”: “172.17.0.1:53886”}
2023-04-28T08:51:58.520Z ERROR piecestore failed to add bandwidth usage {“Process”: “storagenode”, “error”: “bandwidthdb: database disk image is malformed”, “errorVerbose”: “bandwidthdb: database disk image is malformed\n\tstorj.io/storj/storagenode/storagenodedb.(*bandwidthDB).Add:60\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).beginSaveOrder.func1:852\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).Download.func7:763\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).Download:780\n\tstorj.io/common/pb.DRPCPiecestoreDescription.Method.func2:251\n\tstorj.io/drpc/drpcmux.(*Mux).HandleRPC:33\n\tstorj.io/common/rpc/rpctracing.(*Handler).HandleRPC:61\n\tstorj.io/common/experiment.(*Handler).HandleRPC:42\n\tstorj.io/drpc/drpcserver.(*Server).handleRPC:124\n\tstorj.io/drpc/drpcserver.(*Server).ServeOne:66\n\tstorj.io/drpc/drpcserver.(*Server).Serve.func2:114\n\tstorj.io/drpc/drpcctx.(*Tracker).track:35”}
2023-04-28T08:51:58.525Z INFO piecestore downloaded {“Process”: “storagenode”, “Piece ID”: “SGPHLLR5PZ5M6BLCISHYLEKI5INUJVS5FNI242B3YW4MU77GWQQA”, “Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Action”: “GET_REPAIR”, “Offset”: 0, “Size”: 181504, “Remote Address”: “172.17.0.1:53886”}
2023-04-28T08:51:59.018Z ERROR piecestore failed to add bandwidth usage {“Process”: “storagenode”, “error”: “bandwidthdb: database disk image is malformed”, “errorVerbose”: “bandwidthdb: database disk image is malformed\n\tstorj.io/storj/storagenode/storagenodedb.(*bandwidthDB).Add:60\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).beginSaveOrder.func1:852\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).Download.func7:763\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).Download:780\n\tstorj.io/common/pb.DRPCPiecestoreDescription.Method.func2:251\n\tstorj.io/drpc/drpcmux.(*Mux).HandleRPC:33\n\tstorj.io/common/rpc/rpctracing.(*Handler).HandleRPC:61\n\tstorj.io/common/experiment.(*Handler).HandleRPC:42\n\tstorj.io/drpc/drpcserver.(*Server).handleRPC:124\n\tstorj.io/drpc/drpcserver.(*Server).ServeOne:66\n\tstorj.io/drpc/drpcserver.(*Server).Serve.func2:114\n\tstorj.io/drpc/drpcctx.(*Tracker).track:35”}
2023-04-28T08:51:59.022Z INFO piecestore downloaded {“Process”: “storagenode”, “Piece ID”: “FSJGVMJK5TQKMPSIZ7BHLLAQYAXR7MUNQAAFISE2U3TB676DYZ4A”, “Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Action”: “GET_REPAIR”, “Offset”: 0, “Size”: 2319360, “Remote Address”: “172.17.0.1:53882”}
2023-04-28T08:52:08.479Z INFO piecestore download started {“Process”: “storagenode”, “Piece ID”: “6U6AN7CYAY6EINLXN7L6OMUP7GN36PKUEVYT2XGOQI56AFM7IE5A”, “Satellite ID”: “121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6”, “Action”: “GET_AUDIT”, “Offset”: 2224128, “Size”: 256, “Remote Address”: “172.17.0.1:53888”}
2023-04-28T08:52:09.722Z ERROR piecestore failed to add bandwidth usage {“Process”: “storagenode”, “error”: “bandwidthdb: database disk image is malformed”, “errorVerbose”: “bandwidthdb: database disk image is malformed\n\tstorj.io/storj/storagenode/storagenodedb.(*bandwidthDB).Add:60\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).beginSaveOrder.func1:852\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).Download.func7:763\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).Download:780\n\tstorj.io/common/pb.DRPCPiecestoreDescription.Method.func2:251\n\tstorj.io/drpc/drpcmux.(*Mux).HandleRPC:33\n\tstorj.io/common/rpc/rpctracing.(*Handler).HandleRPC:61\n\tstorj.io/common/experiment.(*Handler).HandleRPC:42\n\tstorj.io/drpc/drpcserver.(*Server).handleRPC:124\n\tstorj.io/drpc/drpcserver.(*Server).ServeOne:66\n\tstorj.io/drpc/drpcserver.(*Server).Serve.func2:114\n\tstorj.io/drpc/drpcctx.(*Tracker).track:35”}
2023-04-28T08:52:09.725Z INFO piecestore downloaded {“Process”: “storagenode”, “Piece ID”: “6U6AN7CYAY6EINLXN7L6OMUP7GN36PKUEVYT2XGOQI56AFM7IE5A”, “Satellite ID”: “121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6”, “Action”: “GET_AUDIT”, “Offset”: 2224128, “Size”: 256, “Remote Address”: “172.17.0.1:53888”}
Установить sqlite3 v3.25.2 or later
Создать папку C:\sqlite
Создал и установил
Остановить ноду в докере
Остановил еще раньше, вот подтверждение, что контейнера нет
PS C:\Windows\system32> Get-ChildItem F:\Storj4.3\storage*.db -File | %{$.Name + " " + $(C:\sqlite\sqlite3.exe $.FullName “PRAGMA integrity_check;”)}
Ответ:
bandwidth.db *** in database main *** On tree page 7348 cell 1: Child page depth differs Page 7454 is never used Page 7461 is never used Page 7463 is never used Page 7468 is never used Page 7898 is never used Page 7924 is never used Page 7954 is never used Page 7961 is never used Page 7971 is never used Page 7990 is never used Page 8028 is never used Page 8141 is never used Page 8144 is never used Page 8156 is never used Page 8160 is never used Page 8167 is never used Page 8172 is never used Page 8173 is never used Page 8182 is never used Page 8201 is never used Page 8223 is never used Page 8250 is never used Page 8260 is never used Page 10537 is never used Page 10554 is never used Page 10566 is never used Page 10568 is never used Page 10570 is never used Page 10577 is never used Page 10582 is never used Page 10616 is never used Page 10621 is never used Page 10624 is never used Page 10638 is never used Page 13561 is never used Page 13579 is never used Page 13609 is never used Page 13612 is never used Page 13641 is never used Page 13682 is never used Page 13697 is never used Page 13730 is never used Page 13748 is never used Page 13854 is never used Page 13859 is never used Page 13889 is never used Page 13923 is never used Page 13925 is never used Page 13935 is never used Page 13940 is never used Page 13944 is never used Page 13948 is never used Page 13951 is never used Page 13953 is never used Page 13969 is never used Page 13973 is never used Page 13980 is never used Page 14004 is never used Page 14040 is never used Page 14156 is never used Page 14162 is never used Page 14191 is never used Page 14199 is never used Page 14200 is never used Page 14201 is never used Page 14202 is never used Page 14203 is never used Page 14204 is never used row 92 missing from index idx_bandwidth_usage_satellite row 93 missing from index idx_bandwidth_usage_satellite row 95 missing from index idx_bandwidth_usage_satellite row 96 missing from index idx_bandwidth_usage_satellite row 97 missing from index idx_bandwidth_usage_satellite row 98 missing from index idx_bandwidth_usage_satellite row 100 missing from index idx_bandwidth_usage_satellite row 101 missing from index idx_bandwidth_usage_satellite row 102 missing from index idx_bandwidth_usage_satellite row 103 missing from index idx_bandwidth_usage_satellite row 104 missing from index idx_bandwidth_usage_satellite row 105 missing from index idx_bandwidth_usage_satellite row 106 missing from index idx_bandwidth_usage_satellite row 109 missing from index idx_bandwidth_usage_satellite row 111 missing from index idx_bandwidth_usage_satellite row 114 missing from index idx_bandwidth_usage_satellite row 115 missing from index idx_bandwidth_usage_satellite row 116 missing from index idx_bandwidth_usage_satellite row 117 missing from index idx_bandwidth_usage_satellite row 118 missing from index idx_bandwidth_usage_satellite row 119 missing from index idx_bandwidth_usage_satellite row 120 missing from index idx_bandwidth_usage_satellite row 121 missing from index idx_bandwidth_usage_satellite row 122 missing from index idx_bandwidth_usage_satellite row 123 missing from index idx_bandwidth_usage_satellite row 124 missing from index idx_bandwidth_usage_satellite row 125 missing from index idx_bandwidth_usage_satellite row 126 missing from index idx_bandwidth_usage_satellite row 127 missing from index idx_bandwidth_usage_satellite row 128 missing from index idx_bandwidth_usage_satellite row 129 missing from index idx_bandwidth_usage_satellite
heldamount.db ok
info.db ok
notifications.db ok
orders.db ok
pieceinfo.db ok
piece_expiration.db ok
piece_spaced_used.db ok
pricing.db ok
reputation.db ok
satellites.db ok
secret.db ok
storage_usage.db ok
used_serial.db ok
Понимаю, что bandwidth.db поврежден
Открываю базу данных
cp F:\Storj4.3\storage\bandwidth.db F:\Storj4.3\storage\bandwidth.db.bak
Затем внутри Sqlite выгружаю из нее данные:
.mode insert
.output F:\Storj4.3\dump_all.sql
.dump
.exit
Что-то делаю этой командой:
Get-Content F:\Storj4.3dump_all.sql | Select-String -NotMatch TRANSACTION | Select-String -NotMatch ROLLBACK | Select-String -NotMatch COMMIT | Set-Content -Encoding utf8 F:\Storj4.3\dump_all_notrans.sql
Почему-то файл называется так Storj4.3dump_all.sql и находится в корне. Наверное где-то не прочитался \
Удаляю базу данных:
rm F:\Storj4.3\storage\bandwidth.db
c:\sqlite\sqlite3.exe F:\Storj4.3\storage\bandwidth.db “.read F:\Storj4.3\dump_all_notrans.sql”
Слэш между Storj4.3\dump_all_notrans.sql почему-то не читается системой. Заменил его на обратный слэш / и заработало
Удаляю базу данных:
rm F:\Storj4.3\storage\bandwidth.db
c:\sqlite\sqlite3.exe F:\Storj4.3\storage\bandwidth.db “.read F:\Storj4.3\dump_all_notrans.sql”
Слэш между Storj4.3\dump_all_notrans.sql почему-то не читается системой. Заменил его на обратный слэш / и заработало
ls F:\Storj4.3/storage/bandwidth.db
Нода запустилась. Обмен данными пошел. При этом в логе есть ошибки. Насколько это серьезно?
На всякий случай остановил ноду до получения ответа Алексея
PS C:\Windows\system32> docker logs --tail 20 storagenode3
2023-04-28T15:57:35.193Z INFO piecestore download started {“Process”: “storagenode”, “Piece ID”: “GKJEDHKVU2UIHAP3CAS5RVNUAB3LYCBYX2HT5LQQCOT7QC3N23AA”, “Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Action”: “GET”, “Offset”: 877056, “Size”: 4864, “Remote Address”: “172.17.0.1:35810”}
2023-04-28T15:57:35.362Z INFO piecestore downloaded {“Process”: “storagenode”, “Piece ID”: “GKJEDHKVU2UIHAP3CAS5RVNUAB3LYCBYX2HT5LQQCOT7QC3N23AA”, “Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Action”: “GET”, “Offset”: 877056, “Size”: 4864, “Remote Address”: “172.17.0.1:35810”}
2023-04-28T15:57:36.510Z INFO piecestore download started {“Process”: “storagenode”, “Piece ID”: “E2LJOHLIBHG76LLNSGG3WFPNXTZEHLCFOERYNIBWWDTXHXXXQ5TA”, “Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Action”: “GET”, “Offset”: 0, “Size”: 10496, “Remote Address”: “172.17.0.1:35814”}
2023-04-28T15:57:36.859Z INFO piecestore downloaded {“Process”: “storagenode”, “Piece ID”: “E2LJOHLIBHG76LLNSGG3WFPNXTZEHLCFOERYNIBWWDTXHXXXQ5TA”, “Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Action”: “GET”, “Offset”: 0, “Size”: 10496, “Remote Address”: “172.17.0.1:35814”}
2023-04-28T15:57:37.383Z INFO piecestore download started {“Process”: “storagenode”, “Piece ID”: “JYS46HWGDLXF3MXFCUMFVLKHC2UKAMEPBG7KJ3PL3KOH27V6SYFQ”, “Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Action”: “GET”, “Offset”: 0, “Size”: 8960, “Remote Address”: “172.17.0.1:35816”}
2023-04-28T15:57:37.729Z INFO piecestore download canceled {“Process”: “storagenode”, “Piece ID”: “JYS46HWGDLXF3MXFCUMFVLKHC2UKAMEPBG7KJ3PL3KOH27V6SYFQ”, “Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Action”: “GET”, “Offset”: 0, “Size”: 0, “Remote Address”: “172.17.0.1:35816”}
2023-04-28 15:57:37,860 WARN received SIGTERM indicating exit request
2023-04-28 15:57:37,861 INFO waiting for storagenode, processes-exit-eventlistener, storagenode-updater to die
2023-04-28T15:57:37.862Z INFO Got a signal from the OS: “terminated” {“Process”: “storagenode-updater”}
2023-04-28 15:57:37,868 INFO stopped: storagenode-updater (exit status 0)
2023-04-28T15:57:37.878Z INFO Got a signal from the OS: “terminated” {“Process”: “storagenode”}
2023-04-28T15:57:37.888Z ERROR pieces:trash emptying trash failed {“Process”: “storagenode”, “error”: “pieces error: filestore error: context canceled”, “errorVerbose”: “pieces error: filestore error: context canceled\n\tstorj.io/storj/storagenode/blobstore/filestore.(*blobStore).EmptyTrash:158\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).EmptyTrash:316\n\tstorj.io/storj/storagenode/pieces.(*Store).EmptyTrash:401\n\tstorj.io/storj/storagenode/pieces.(*TrashChore).Run.func1.1:83\n\tstorj.io/common/sync2.(*Workplace).Start.func1:89”}
2023-04-28T15:57:37.969Z ERROR piecestore:cache error getting current used space: {“Process”: “storagenode”, “error”: “context canceled; context canceled; context canceled”, “errorVerbose”: “group:\n— context canceled\n— context canceled\n— context canceled”}
2023-04-28T15:57:37.990Z INFO piecestore download canceled {“Process”: “storagenode”, “Piece ID”: “Y4BY4JDAHMJ6O7RZV33S62XXIWV75P34I6MPPQGK6K7MDQNNWLWA”, “Satellite ID”: “12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs”, “Action”: “GET”, “Offset”: 0, “Size”: 1056768, “Remote Address”: “172.17.0.1:35702”}
2023-04-28T15:57:38.120Z INFO piecestore upload canceled {“Process”: “storagenode”, “Piece ID”: “PHED3OFJRPABCM62OBU2JOXHUATVASVXPCIUEBIUXZ6LDMCAF3LQ”, “Satellite ID”: “12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs”, “Action”: “PUT_REPAIR”, “Size”: 2097152, “Remote Address”: “172.17.0.1:35738”}
2023-04-28T15:57:38.204Z INFO piecestore upload canceled {“Process”: “storagenode”, “Piece ID”: “F5ZBLY2TG44QA5DC3DI627NBPBBCYMEE2EUPUQDOPKNSGFMREVOQ”, “Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Action”: “PUT”, “Size”: 393216, “Remote Address”: “172.17.0.1:35806”}
2023-04-28T15:57:38.286Z INFO piecestore upload canceled {“Process”: “storagenode”, “Piece ID”: “YKWYG7IQLLDD35JBC2DNTV3E7A5SPPNYUQFJ6YYYY7RH53MIVOBQ”, “Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Action”: “PUT”, “Size”: 655360, “Remote Address”: “172.17.0.1:35282”}
2023-04-28 15:57:41,292 INFO waiting for storagenode, processes-exit-eventlistener to die
2023-04-28 15:57:42,543 INFO stopped: storagenode (exit status 0)
2023-04-28 15:57:42,546 INFO stopped: processes-exit-eventlistener (terminated by SIGTERM)