> On 17 Sep 2019, at 14:35, Robert Lagus <rob...@lagus.net> wrote:
> 
> I tried to start the ofserver with: 
> sudo systemctl restart owserver
> Job for owserver.service failed because the service did not take the steps 
> required by its unit configuration.
> See "systemctl status owserver.service" and "journalctl -xe" for details.
> 

You have two independent problems: 

1) the ds2482 is not found by owserver. You should first debug this problem 
starting owserver manually: 
sudo /usr/bin/owserver -c /etc/owfs.conf --debug

2) the owserver.service unit file on buster is problematic.


I cannot give you advice on 1), but I have solved 2) with a drop-in unit 
configuration file. I run owserver on an headless server with the following 
configuration.

$ sudo systemctl cat owserver.service
# /lib/systemd/system/owserver.service
[Unit]
Description=Backend server for 1-wire control
Documentation=man:owserver(1)

[Service]
Type=notify
NotifyAccess=all
ExecStart=/usr/bin/owserver -c /etc/owfs.conf
Restart=on-failure
#User=Debian-ow
#Group=Debian-ow

[Install]
WantedBy=multi-user.target
Also=owserver.socket

# /etc/systemd/system/owserver.service.d/override.conf
[Service]
User=Debian-ow
Group=Debian-ow
ExecStart=
ExecStart=/usr/bin/owserver -c /etc/owfs.conf --foreground

[Install]
Also=


A long story short. 

/lib/systemd/system/owserver.service is the system file shipped with Buster, 
and it did not work for me out of the box.
/etc/systemd/system/owserver.service.d/override.conf is an override file, that 
you create with `sudo systemctl edit owserver.service`.

My changes with respect to the shipped configuration.

1) Do not run the server as root. I use an USB adapter, and I wrote a couple of 
udev rules to change the ttyUSBxx group to Debian-ow and symlink it to a 
persistent /dev node. Skip this if you plan to run owserver with root 
privileges. (I’m not sure, but I think that root privileges are necessary to 
access the i2c bus.)

2) Add the the --foreground option to the owserver command. This is crucial for 
starting owserver under systemctl without socket activation.

3) Disable socket activation. I expect the owserver service to start at boot, 
before that the first client connects, so socket activation is not needed. I 
found that in edge conditions socket activation may interfere with the correct 
startup, therefore I prefer to disable it.


Bye

S.



_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to