Error starting master database (operation not permitted) after update on QNAP-Nas

Hi qookoo,

I am also running into trouble. Where can you find the log?

Thanks!

Best, Michaël

All,

Is the app compatible with Thin volumes?

Best, Michaël

All,

I run in the following problem:

  • I was running the node successfully for almost 2 months
  • Stopped the node - and my system - also upgraded to the most recent QTS
  • now when I start - I get the following message - the container starts - but then stop - starts again - stops - some 2-3 times
    6848a1fb9a6d storjlabs/storagenode:beta “/entrypoint” 2 seconds ago Up Less than a second 192.168.0.117:14002->14002/tcp, 0.0.0.0:28967->28967/tcp storjlabsSnContainer

Any a suggestion?

(also upgraded to the most recent version by clicking the “Update my storage node” - but the issue was already before upgrading)

Thanks!

Best, Michaël

I guess your problem is the same as mine.

you can follow the following screenshots to get the log.
just click the red square side.

Hi qookoo,

Indeed, same problem!
Error: Error starting master database on storagenode: storage node database error: unable to open database file: operation not permitted

Did you figure out a way to solve this?
Alexey suggests to use the --priveleged flag? How do I do this?

Thanks a million!

Best, Michaël

Error: Error starting master database on storagenode: storage node database error: unable to open database file: operation not permitted

Hi all -

I found this thread over at the QNAP forums: https://forum.qnap.com/viewtopic.php?t=142853

my question is, have any of you(or all of you?) that are experiencing the DB issue going back and forth between the command line (docker) and container station?

Thanks.

-K

Wouldn’t the Storj app itself already be the equivalent of using the command line?

Hi Karl,

I have only used the app - although it may be possible that I stopped the docker through the container station…

No solution yet - I am still eager to find out how to add the priveleged flag

Best, Michaël

After reading up, I am very reluctant to use the priveleged flag - re: security.

Would be great if we could find the real cause of the issue of Error starting master database on storagenode: storage node database error: unable to open database file: operation not permitted

Best, Michaël

@BrightSilence - correct, but it operates as a different User vs. a user logged-in manipulating docker from the cli.

Data we need would be:

  • who was the logged-in user(admin group? other?) using container station?
  • for the Users using plain docker, what user id were they logged in under?

It’s likely a file permission issue - we’re trying to replicate the issue but haven’t been able to so far.

On the QNAP containers are at /share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/containers - would you be able to provide some information on the file/director permissions of that tree?

I have installed a fresh QNAP with newest firmware an was only as admin logged in and have the problem too after all delete and new install the storj app 1.09 (same like 1.08)

@utropicmedia-karl

I have promt on ssh:

chmod -R 777 /share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/containers

same promlem after that:
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

Hi Karl,

It was always admin logged in - I enabled 2 factor - not sure if that would have created another ‘admin’.

Best, Michaël

Karl,

Made all container folder read write x enabled for user (admin) and group.

Same error - (like Otti24)

Best, Michaël

:weary:
Please don’t do this… ever.

1 Like

Agree.

It’s always a bad idea to 777 almost anything. And anytime I’ve seen someone recommend it, it usually doesn’t work out that well or doesn’t fix the problem.

This problem seems to be QNAP specific. I’ve been reading in various other forums because it seems quite curious…

My discoveries:

  • QNAP docker requires the -v option for volume mounting and does not support the -mount option.
  • QNAP docker does not necessarily run as GUID/UID 0 and might need to specially configured to do so.
  • QTS has an installation of DSL as a base … and is not easy to sort through… I went looking for OS image files and there aren’t any. The download from QNAP is additional software and configuration, not the whole OS.

So, I downloaded DSL:

http://www.damnsmalllinux.org/

And started looking around, but it seems that the issue is probably related to docker configuration rather actual file permissions.

Additional…

Maybe one of the recent security QNAP patches for something on the vulnerability list changed the default docker settings:

The curious thing is that it’s only affecting particular configurations of QNAPs - there has to be something in-common.

QNAP Docker should also support -mount

[karl@**** ~]$ docker run --help | grep mount
  --mount mount                    Attach a filesystem mount to the container
  -v, --volume list                    Bind mount a volume

I found this reddit thread:

In a few other places, I noticed that people indicated that QNAP only supports volumes and does not support bind mounts.

In the source code of the QNAP app, the docker run command uses the -v option.

I remember reading around here that -mount is recommended and issues occur with -v … however, after reading about QNAP not supporting -mount I figured that the only method to running a node was -v

In any case, I don’t have a QNAP device myself… So, it’s unlikely that I’ll be able to find the problem.

1 Like