turingmachine / omxplayer-sync

OMXPlayer-Sync facilitates synchronization of multiple OMXPlayer instances over the network in a master/slave fashion.
194 stars 70 forks source link

Running omxplayer-sync under supervisor #89

Closed tsantor closed 5 years ago

tsantor commented 5 years ago

Strange issue occuring with this setup.

While running /usr/bin/omxplayer-sync -muv /home/pi/bbb_sunflower_1080p_30fps_normal.mp4 manually via SSH or the local terminal all is fine. However when running under supervisor it seems to run for about 10 secs and then quit and restart. Over and over and over.

[program:myomxplayer]
command=/usr/bin/omxplayer-sync -muv /home/pi/bbb_sunflower_1080p_30fps_normal.mp4
user=pi
umask=0022
autostart=true
autorestart=true
startsecs=10

stdout_logfile=/home/pi/omxplayer-sync.log
redirect_stderr=true

Tailing the log /home/pi/omxplayer-sync.log shows the following when this occurs:

WARNING: dbus connection could not be established
[Errno 2] No such file or directory: '/tmp/omxplayerdbus.pi'
WARNING: omxplayer did not start.
tsantor commented 5 years ago

So I'm trying to figure out what the issue is here, but I'm coming up short. I can get the file to play longer by increasing the sleep to wait for omx player to appear on the dbus, but it's still not able to establish a dbus connection even after setting it to 20 or 30.

sleep(30) # wait for omxplayer to appear on dbus
tsantor commented 5 years ago

So it looks like this issue has nothing to do with waiting for omxplayer to appear on dbus at all. It seems maybe it was an underlying permissions issue. Simply changing the user to root in the supervisor program config solved the issue.