ser2sock.pid?

General Discussion

ser2sock.pid?

Postby jplee3 » Sat Aug 29, 2015 12:18 pm

Anyone else having trouble not being able to get ser2sock to generate a pid in /var/run?
jplee3
Junior Nut
Junior Nut
 
Posts: 29
Joined: Thu Aug 05, 2010 8:13 am

Re: ser2sock.pid?

Postby jplee3 » Sat Aug 29, 2015 12:58 pm

To give some background, I just installed the AlarmDecoder image on my Raspi and everytime I boot/reboot it comes back with this error in /var/log/syslog:

Aug 29 13:52:48 alarmdecoder ser2sock[2191]: [‼] Error opening pid file /var/run/ser2sock.pid

If I `touch ser2sock.pid` and then chown it to pi:pi, things work as expected. But it looks like everything in /var/run is set to root:root by default and will revert back when rebooted as well.
jplee3
Junior Nut
Junior Nut
 
Posts: 29
Joined: Thu Aug 05, 2010 8:13 am

Re: ser2sock.pid?

Postby jplee3 » Sat Aug 29, 2015 1:45 pm

If I restart the service as the root user, there are no problems of course. It seems during boot/init though, the service seems to run as the pi user. Any way to change this?
jplee3
Junior Nut
Junior Nut
 
Posts: 29
Joined: Thu Aug 05, 2010 8:13 am

Re: ser2sock.pid?

Postby kevin » Sat Aug 29, 2015 3:42 pm

As a workaround you can edit the /etc/init.d/ser2sock file and change the PID_FILE variable location to something writable by pi:pi on boot - thanks for pointing this out and it is now on our list of things to look at for the next image :)
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: ser2sock.pid?

Postby jplee3 » Sat Aug 29, 2015 3:50 pm

kevin wrote:As a workaround you can edit the /etc/init.d/ser2sock file and change the PID_FILE variable location to something writable by pi:pi on boot - thanks for pointing this out and it is now on our list of things to look at for the next image :)


Ahh, thanks. I was pulling my hair out over that. I changed to /tmp and it seems to be OK now. Rebooting the Pi and *crossing fingers* - it should be OK though I think.
jplee3
Junior Nut
Junior Nut
 
Posts: 29
Joined: Thu Aug 05, 2010 8:13 am


Return to General

Who is online

Users browsing this forum: No registered users and 30 guests

cron