Netdata container not start in QNAP NAS

Environment

QNAP QTS with docker

Problem/Question

I have always installed netdata in my qnap with a docker and it worked fine for me. But from a certain version it seems that the netdata container cannot be started.

I use this for installation:

docker run -d --name=netdata
-p 19999:19999
-v /share/mydirectory/netdata/netdataconfig/netdata:/etc/netdata:ro
-v netdatalib:/var/lib/netdata
-v netdatacache:/var/cache/netdata
-v /etc/passwd:/host/etc/passwd:ro
-v /etc/group:/host/etc/group:ro
-v /proc:/host/proc:ro
-v /sys:/host/sys:ro
-v /etc/os-release:/host/etc/os-release:ro
–restart unless-stopped
–cap-add SYS_PTRACE
–security-opt apparmor=unconfined
netdata/netdata

It seems like a permission problem perhaps, but I don’t know what I can do to solve it.

I have seen that a user with synology had problems and it solved it with the installation of netdata with composer something like this:
environment:
- DOCKER_USR = nameusrofuser
But I install directly in the terminal without compose and I don’t know how I can put my environment variables at installation time.

What I expected to happen

Could you help me get the netdata container to start correctly?

Thanks!

LOG NETDATA:

2021-09-17 18:12:37: netdata INFO : MAIN : EXIT: netdata prepares to exit with code 1...

2021-09-17 18:12:37: netdata INFO : MAIN : EXIT: cleaning up the database...

2021-09-17 18:12:37: netdata INFO : MAIN : Cleaning up database [0 hosts(s)]...

2021-09-17 18:12:37: netdata INFO : MAIN : EXIT: all done - netdata is now exiting - bye bye...

ls: /var/run/balena.sock: No such file or directory

ls: /var/run/docker.sock: No such file or directory

2021-09-17 18:13:39: netdata INFO : MAIN : CONFIG: cannot load user config '/etc/netdata/netdata.conf'. Will try the stock version.

2021-09-17 18:13:39: netdata INFO : MAIN : CONFIG: cannot load stock config '/usr/lib/netdata/conf.d/netdata.conf'. Running with internal defaults.

2021-09-17 18:13:39: netdata INFO : MAIN : CONFIG: cannot load cloud config '/var/lib/netdata/cloud.d/cloud.conf'. Running with internal defaults.

2021-09-17 18:13:39: netdata INFO : MAIN : Using host prefix directory '/host'

2021-09-17 18:13:39: netdata INFO : MAIN : TIMEZONE: using strftime(): 'UTC'

2021-09-17 18:13:39: netdata INFO : MAIN : TIMEZONE: fixed as 'UTC'

2021-09-17 18:13:39: netdata INFO : MAIN : SIGNAL: Enabling reaper

2021-09-17 18:13:39: netdata INFO : MAIN : process tracking enabled.

2021-09-17 18:13:39: netdata INFO : MAIN : resources control: allowed file descriptors: soft = 65535, max = 65535

2021-09-17 18:13:39: netdata INFO : MAIN : Adjusted my Out-Of-Memory (OOM) score from 0 to 1000.

2021-09-17 18:13:39: netdata ERROR : MAIN : Cannot adjust netdata scheduling policy to idle (5), with priority 0. Falling back to nice. (errno 38, Function not implemented)

2021-09-17 18:13:39: netdata ERROR : MAIN : Cannot get my current process scheduling policy. (errno 38, Function not implemented)

2021-09-17 18:13:39: netdata INFO : MAIN : netdata started on pid 1.

2021-09-17 18:13:39: netdata FATAL : MAIN : Cannot create directory '/var/lib/netdata/registry'. # : Invalid argument

I suspect as well that it’s probably a user problem.

You can set environment variables on the Docker command line with the -e option (so in this case, it would be -e DOCKER_USR=nameofuser). Note that such options must come before the image name (netdata/netdata in this case) or they get interpreted as arguments for the image itself (which is not what is needed here).