Package: netdata-core
Version: 1.19.0-2

Hi,

since Netdata 1.8, you can bind the netdata webserver to a unix domain socket 
(see https://docs.netdata.cloud/docs/running-behind-nginx/):

```
[web]
   bind to = unix:/var/run/netdata/netdata.sock
```

Unfortunatly, our systemd netdata service on Debian is too restrictive to do 
that:

```
sudo perl -w -pi -e 's|bind socket to IP = \*|bind to = 
unix:/run/netdata.sock|' /etc/netdata/netdata.conf

sudo systemctl restart netdata
systemctl status netdata
[...]
[  525.494010] netdata[647]: 2019-12-15 10:28:37: netdata ERROR : MAIN : 
LISTENER: failed to remove existing (probably obsolete or left-over) file on 
UNIX socket path '/run/netdata.sock'. (errno 30, Read-only file system)
[  525.494623] netdata[647]: 2019-12-15 10:28:37: netdata ERROR : MAIN : 
LISTENER: UNIX bind() on path '/run/netdata.sock' failed. (errno 30, Read-only 
file system)
[  525.494882] netdata[647]: 2019-12-15 10:28:37: netdata ERROR : MAIN : 
LISTENER: Cannot create unix socket '/run/netdata.sock'
```

Fix:

Services like nsd add '/run' to the ReadWritePath:

```
cat /lib/systemd/system/nsd.service
[...]
[Service]
[...]
RuntimeDirectory=nsd
ReadWritePaths=/var/lib/nsd /etc/nsd /run
[...]
```

Maybe we should do that for netdata, too?

PS: with `RuntimeDirectory=netdata`, the "bind to" path to the socket would be 
'/run/netdata/netdata.sock'. Just like the docs.netdata.cloud example above.

Thanks.

Reply via email to