beli
August 4, 2020, 10:17am
1
Hello!
Issue on both of my QNAP Docker Storagenodes
2020-08-04T10:14:19.548Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-08-04T10:14:19.554Z INFO Operator email {“Address”: “mail”}
2020-08-04T10:14:19.555Z INFO Operator wallet {“Address”: “wallet”}
Error: Error starting master database on storagenode: storage node database error: unable to open database file: operation not permitted
storj.io/storj/storagenode/storagenodedb.(*DB).openDatabase:272
storj.io/storj/storagenode/storagenodedb.(*DB).openDatabases:187
storj.io/storj/storagenode/storagenodedb.New:174
main.cmdRun:150
storj.io/private/process.cleanup.func1.4:353
storj.io/private/process.cleanup.func1:371
github.com/spf13/cobra.(*Command).execute:840
github.com/spf13/cobra.(*Command).ExecuteC:945
github.com/spf13/cobra.(*Command).Execute:885
storj.io/private/process.ExecWithCustomConfig:88
storj.io/private/process.ExecCustomDebug:70
main.main:323
runtime.main:203
Database-files seem fine
find /share/Container/STORJ/config/storage/ -maxdepth 1 -iname “*.db” -print0 -exec sqlite3 ‘{}’ ‘PRAGMA integrity_check;’ ‘;’
/share/Container/STORJ/config/storage/info.dbok
/share/Container/STORJ/config/storage/bandwidth.dbok
/share/Container/STORJ/config/storage/orders.dbok
/share/Container/STORJ/config/storage/piece_expiration.dbok
/share/Container/STORJ/config/storage/pieceinfo.dbok
/share/Container/STORJ/config/storage/piece_spaced_used.dbok
/share/Container/STORJ/config/storage/reputation.dbok
/share/Container/STORJ/config/storage/storage_usage.dbok
/share/Container/STORJ/config/storage/used_serial.dbok
/share/Container/STORJ/config/storage/satellites.dbok
/share/Container/STORJ/config/storage/notifications.dbok
/share/Container/STORJ/config/storage/heldamount.dbok
/share/Container/STORJ/config/storage/pricing.dbok
Any hints?
Sounds like a file permission issue. You need to make sure the user running the storagenode has read and write permissions on the storage location.
beli
August 4, 2020, 11:26am
3
All processes are running as “admin”, admin is owner of file, files are rw- and directorys are rwx.
Any idea how to debug this?
[/share/Container/STORJ/config/storage] # ll
drwx------ 6 admin administ 4.0k Aug 4 13:17 ./
drwxrwxrwx 3 admin administ 4.0k Aug 4 01:52 …/
-rw-r–r-- 1 admin administ 18.5M Aug 4 03:10 bandwidth.db
drwx------ 8 admin administ 4.0k May 1 22:51 blobs/
drwx------ 2 admin administ 4.0k Aug 4 00:59 garbage/
-rw-r–r-- 1 admin administ 32.0k Aug 4 03:10 heldamount.db
-rw-r–r-- 1 admin administ 16.0k Aug 4 03:10 info.db
-rw-r–r-- 1 admin administ 24.0k Aug 4 03:10 notifications.db
-rw-r–r-- 1 admin administ 94.9M Nov 9 2019 orders.backup
-rw-r–r-- 1 admin administ 593.4M Aug 4 03:10 orders.db
-rw-r–r-- 1 admin administ 96.0k Aug 4 03:10 piece_expiration.db
-rw-r–r-- 1 admin administ 24.0k Aug 4 03:10 piece_spaced_used.db
-rw-r–r-- 1 admin administ 3.1M Aug 4 03:10 pieceinfo.db
-rw-r–r-- 1 admin administ 24.0k Aug 4 03:11 pricing.db
-rw-r–r-- 1 admin administ 24.0k Aug 4 03:10 reputation.db
-rw-r–r-- 1 admin administ 32.0k Aug 4 03:10 satellites.db
-rw-r–r-- 1 admin administ 296.0k Aug 4 03:10 storage_usage.db
drwx------ 2 admin administ 12.0k Aug 2 14:39 temp/
drwx------ 8 admin administ 4.0k May 13 20:52 trash/
-rw-r–r-- 1 admin administ 69.8M Aug 4 03:10 used_serial.db
I have the same issue after update docker image to latest version.
@utropicmedia-karl could you help out?
@user01357 - just to confirm - are you using the QNAP app or just plain docker?
beli
August 4, 2020, 3:26pm
7
plain docker - 20 characters
Can you check/confirm the permissions of the files in the sub dirs? and the parent directory?
beli
August 4, 2020, 3:40pm
9
which files you mean in detail? i checked all *.db files as you see above. also i checked some samples in the subdirs of config-dir. All are full writeable by owner
beli
August 4, 2020, 3:41pm
11
yes it is 700, with matching ownerships
Whoops, sorry Karl, I kind of assumed this was about the QNAP app.
@BrightSilence - no worries. Looks like something else, but you never can be too careful
@beli Can you provide us with the docker run command you used to start the container? Can you confirm that the /app/config/config.yaml
contains the path inside the container you’ve bind mounted?
@user01357 Are you also running on QNAP or is this a different kind of host environment?
beli
August 4, 2020, 5:29pm
16
Yes - paths are matching - only “change” was upgrade from 1.6.4 to 1.9.5 i think.
docker run -d --restart unless-stopped -p 28967:28967 -p 14002:14002
-e WALLET=“wally”
-e EMAIL=“mailly”
-e ADDRESS=“addressy”
-e STORAGE=“7TB”
-m 4096M
–mount type=bind,source=“/share/Container/STORJ/identity”,destination=/app/identity
–mount type=bind,source=“/share/Container/STORJ/config”,destination=/app/config
–stop-timeout 300
–name storagenode storjlabs/storagenode:latest
I using the docker image on the QNAP device which updating by watchtower.
immiq
August 4, 2020, 6:36pm
18
Exactly the same here, docker image in qnap device + watchtower
I have the same setup and no problems so far. My watchtower updated to 1,9,5 yesterday…
qookoo
August 10, 2020, 2:13pm
20
Hello, my QNAP app can’t start after the second day I upgrade to the newest version.
Even I installed the old version still not working.
Here’s the log, thanks.