AGu
July 21, 2021, 1:39pm
1
Hi!
Main problem: docker container restarts every minute. Logs:
2021-07-21T13:34:28.974Z INFO Got a signal from the OS: “terminated”
Error: Error starting master database on storagenode: database: context canceled
storj.io/storj/storagenode/storagenodedb.(*DB).openDatabase:323
storj.io/storj/storagenode/storagenodedb.(*DB).openExistingDatabase:305
storj.io/storj/storagenode/storagenodedb.(*DB).openDatabases:281
storj.io/storj/storagenode/storagenodedb.OpenExisting:248
main.cmdRun:160
storj.io/private/process.cleanup.func1.4:363
storj.io/private/process.cleanup.func1:381
github.com/spf13/cobra.(*Command).execute:852
github.com/spf13/cobra.(*Command).ExecuteC:960
github.com/spf13/cobra.(*Command).Execute:897
storj.io/private/process.ExecWithCustomConfig:88
storj.io/private/process.ExecCustomDebug:70
main.main:385
runtime.main:204
Storj corrupts db file immediately after docker container starts.
When I do integrity check of DB files I see this:
pricing.db Error: unable to open database file
After repairing (link: https://support.storj.io/hc/en-us/articles/360029309111-How-to-fix-a-database-disk-image-is-malformed- ) I do one more integrity check:
pricing.db ok
Then I start and stop docker container and check integrity again:
pricing.db Error: unable to open database file
Why?
P.S.
Disk is OK - no bad blocks.
Best regards, Alex.
bre
July 21, 2021, 7:43pm
2
Hi @AGu , The team will look into this and have requested additional log messages from prior to the errors as to get some context. Thanks!
Alexey
July 22, 2021, 8:41am
3
Looks like a permissions issue.
How do you run your storagenode container? With sudo
or without?
If without - make sure that the database file have the same permissions as others (replace path /mnt/storj/storagenode1/storage
to actual one):
sudo ls -l /mnt/storj/storagenode1/storage/*.db
Alexey
July 23, 2021, 12:42pm
5
Then it’s more like a disk issue. How is it connected to the host with storagenode?
Keep in mind - network filesystems are not supported, include but not limited to Topics tagged smb Topics tagged nfs Topics tagged sshfs , only iSCSI network protocol for storage is supported.
It’s much better to use only local attached drives and ext4 filesystem in Linux (NTFS if you use Windows).
What is your filesystem on storage?
df -HT
AGu
July 23, 2021, 5:16pm
6
Internal HDD, SATA cable, ext4.
df -HT
/dev/sdd1 ext4 3.0T 48G 2.8T 2% /mnt/storj/node
Oh, just found errors in dmsg
dmesg | grep sdd1
[64988.445506] EXT4-fs error (device sdd1): __ext4_get_inode_loc:4712: inode #168826989: block 675283366: comm storagenode: unable to read itable block
Alexey
July 23, 2021, 6:25pm
7
Sorry to read that. Please, stop the storagenode and check your disk and fix issues, then try to start again.