> On 31 Aug 2016, at 22:28, Mick Sulley <m...@sulley.info> wrote:
> 
> $ owserver
> does nothing
> $ owserver -d /dev/i2c-1
> starts the server
> $ service owserver restart
> returns "Failed to restart owserver.service: Access denied"
> $ sudo service owserver restart
> stops the server
> $ owserver -c /etc/owfs.conf
> does nothing

Sounds a lot like permission problems. 

First, which distro are you using? I will assume you are on raspbian/jessie, 
but let us know if this is not true.

Debian/jessie is systemd based, so please forget about “service XXX 
start|stop|restart” and use “systemctl start|stop|restart XXX.service”

Check permissions of /dev/i2c-1:

$ ls -l /dev/i2c-1 
crw------- 1 root root 89, 1 Sep  1 09:16 /dev/i2c-1

enable owserver at boot

$ sudo systemctl enable owserver.service
Synchronizing state for owserver.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d owserver defaults
insserv: warning: current start runlevel(s) (empty) of script `owserver' 
overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `owserver' 
overrides LSB defaults (0 1 6).
Executing /usr/sbin/update-rc.d owserver enable

to stop/start/restart

$ sudo systemctl stop owserver.service
$ sudo systemctl start owserver.service
$ sudo systemctl restart owserver.service

to check status

$ sudo systemctl status owserver.service
● owserver.service - LSB: 1-wire TCP server
   Loaded: loaded (/etc/init.d/owserver)
   Active: active (running) since Thu 2016-09-01 09:35:12 CEST; 3s ago
  Process: 797 ExecStop=/etc/init.d/owserver stop (code=exited, 
status=0/SUCCESS)
  Process: 805 ExecStart=/etc/init.d/owserver start (code=exited, 
status=0/SUCCESS)
   CGroup: /system.slice/owserver.service
           └─809 /usr/bin/owserver -c /etc/owfs.conf --pid-file /var/run/owfs...


Try these commands (as root or with sudo) and see if systemctl records some 
useful info with

$ sudo journalctl -u owserver.service

Hope this helps

S.

PS:

I just noticed that the LSB scripts in raspbian/jessie are bugged: they return 
with a success status even if owserver failed to start… So do not trust to much 
systemctl status, but always check if the owserver process is really running.
------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to