-
Notifications
You must be signed in to change notification settings - Fork 107
Error when running as a service and not interactively #46
Comments
I am getting the same issue but for both when I run it as a service and directly. Can't seem to figure out why it won't connect to tvheadend. /Edit: I managed to resolve this by upgrading pip, python, etc in the virtualenv. |
@hirenshah - what version of pip, python, etc are running in the virtualenv? I am running python 2.7 |
@jwrober - To be honest I wasn't 100% sure about what I was doing, so I've fished out my bash log so you can see what I did:
|
These are my installation steps taken from yours.
Go into Plex and attempt to connect to the tvhProxy service from DVR menu. Everything works great here, no issues running from interactive command line. Able to scan the channels and setup just fine.
Now as sudoer user, setup the systemd service file
Go into Plex and attempt connect to the tvhProxy service from DVR menu. Get error that channels cannot be scanned. Here is excerpt from /var/log/syslog
So now with a python3 virtual environment, still not working. Getting pretty much the same error when running as a service. |
Only differences I can see is that I still run it using "python" rather than "python3" as it's basically a shortcut to "python3". Also I used "pip" and not "pip3". I didn't set up any environment variables or change any profiles, and based on the error (it can't connect to Tvheadend) if I was to guess you have a difference in permissions between a manual execution and it running as service. Maybe try removing all the profile and variable stuff? |
ok, not sure what I did "different" per se, but got everything working great on a Ubuntu 16.04.03 server with these steps.
Edited the script for my logon details to tvheadend and then followed readme to get the service running. For what ever reason, using environment variables does not work. Need to have everything in the script. |
Anyone know how I can do this using the QNAP tvhProxy docker image? |
tvhProxy works fine for me when I run it from a command line as shown on the readme. However when I setup the systemd tvhProxy.service file, I get a traceback in the /var/log/syslog file when trying to connect with Plex.
I added two environment directives to the tvhProxy.service file for my environment instead of hacking the actual tvhProxy.py file
where userid, passwd, and x.x.x.x are real in my config and obfuscated here. I have these same environment variables in the tvh user's .profile file as well which are picked up fine during the interactive command line startup/run.
I am running tvheadend and plex on debian 9
tvheadend -- v4.2.5-18~g951777a51
plex -- v1.11.1.4753 (beta channel), same issue on current stable v1.10.1.4602
Ideas?
The text was updated successfully, but these errors were encountered: