@cyberopus said:
@sap995 said:
I have done this and I am receiving this error when trying to start or check the status of the service:
/etc/init.d/plexconnect: invalid arguments
- could not access PID file for PlexConnect process
Change line 72 of /etc/init.d/plexconnect from
status_of_proc -p $PIDFILE “$DAEMON $DAEMON_OPTS” “$NAME process” && exit 0 || exit $?
to
status_of_proc -p $PIDFILE “$DAEMON” $NAME && exit 0 || exit $?
And you should be good to go.
I’m running PlexConnect on Raspberry Pi 3 running an up to date version of Raspbian Jessie. After making your suggested change to /etc/init.d/plexconnect
I was able successfully start PlexConnect as a service. However, it will not auto start after a reboot.
After a reboot /var/log/daemon.log
shows no obvious errors
Mar 8 19:34:28 Pi3 systemd[1]: Starting LSB: Plex Media Server...
Mar 8 19:34:28 Pi3 systemd[1]: Starting LSB: This is the Plex Connect daemon...
Mar 8 19:34:28 Pi3 plexconnect[380]: Starting the process PlexConnect.
Mar 8 19:34:28 Pi3 systemd[1]: Started LSB: This is the Plex Connect daemon.
Mar 8 19:34:29 Pi3 plexmediaserver[379]: Starting Plex Media Server: done
Mar 8 19:34:29 Pi3 systemd[1]: Started LSB: Plex Media Server.
PlexConnect.log
gets written to but never actually starts
19:34:30 PlexConnect: started: 19:34:30
19:34:30 PlexConnect: Version: 0.5-dev-101215
19:34:30 PlexConnect: Python: 2.7.9 (default, Mar 8 2015, 00:52:26)
[GCC 4.9.2]
19:34:30 PlexConnect: Host OS: linux2
19:34:30 PlexConnect: PILBackgrounds: Is PIL installed? True
a PID gets written to /var/run/PlexConnect.pid
during boot, but after boot it’s not running, which probably explains this error in /var/log/syslog
when I stop the PlexConnect service.
Mar 8 19:55:16 Pi3 systemd[1]: Stopping LSB: This is the Plex Connect daemon...
Mar 8 19:55:16 Pi3 plexconnect[2027]: /etc/init.d/plexconnect: invalid arguments
Mar 8 19:55:16 Pi3 plexconnect[2027]: could not access PID file for Stoppping the PlexConnect process ... failed!
Mar 8 19:55:16 Pi3 plexconnect[2027]: start-stop-daemon: warning: failed to kill 440: No such process
Mar 8 19:55:16 Pi3 plexconnect[2027]: Stopping the PlexConnect process.
Mar 8 19:55:16 Pi3 systemd[1]: Stopped LSB: This is the Plex Connect daemon.
But when I manually start the service it all works
/var/log/syslog
Mar 8 19:55:16 Pi3 systemd[1]: Stopped LSB: This is the Plex Connect daemon.
Mar 8 19:57:47 Pi3 systemd[1]: Starting LSB: This is the Plex Connect daemon...
Mar 8 19:57:47 Pi3 plexconnect[2168]: Starting the process PlexConnect.
Mar 8 19:57:47 Pi3 systemd[1]: Started LSB: This is the Plex Connect daemon.
/opt/PlexConnect-master/PlexConnect.log
19:57:47 DNSServer: DNSServer: Serving DNS on 192.168.1.240 port 53.
19:57:47 DNSServer: ***
19:57:48 WebServer: started: 19:57:48
19:57:48 WebServer: ***
19:57:48 WebServer: WebServer: Serving HTTP on 192.168.1.240 port 80.
19:57:48 WebServer: ***
19:57:48 WebServer: started: 19:57:48
19:57:48 WebServer: ***
19:57:48 WebServer: WebServer: Serving HTTPS on 192.168.1.240 port 443.
19:57:48 WebServer: ***
Any idea what might be causing the service to fail at boot time?