HTPC-Manager
HTPC-Manager copied to clipboard
Synology package and apps with SSL
Accessing sickbeard or couch potato in htpc manager with SSL cannot connect and fetch data (the test in settings or any fetching of data). The log for sickbeard says Unable to contact sickbeard via https://myip:8899/api/apikey/?cmd=sb.ping
but when I explicitly run the URL, the return field is "success".
Your should post a log. No one can help you without one.
OK. should I post it here or is there a preferred site for that? If I am running on a synology nas, how can I enable debugging? I've tried logging in as root in WinSCP and running python Htpc.py --debug
but it doesn't get far enough to start on the nas. I made sure HTPC manager was not running prior but no luck. Should I use a different SSH or telnet program?
I just saw that your fork has more information in the readme for reporting bugs. Is using --loglevel debug
just relevant to your fork? Should I try your fork?
Post it on pastebin. First double check your settings as placeholders can look like values. Wipe the log. Use ssh to cd to htpc manager folder start htpc-manager with --loglevel debug. Enter the modules that don't work then post the log.
Well it seems HTPC manager doesn't like starting from the command line in synology. It resets the port to 8085. I noticed on install the port was using 8087 but the settings said 8085. I changed it to 8087 in case it would cause issues but it doesn't seem to matter what I set port to in general settings. In Htpc.py however, if run from the command line, the port resets to 8085. I just manually set it to 8087 in the script and it started barebone. None of my settings were loaded. the debug file is here
http://pastebin.com/VT162jnZ
Sorry its a bit different for nas users. You need to set the -datadir to access your current settings. Yeah, you can test my fork but there are some issue with the install method. Check the wiki in my repo. Ill add some features like download log etc so this isnt so pita on nas.
Is it working without ssl? Is Sickbeard and/or couch potato running on the synology or somewhere else? What happens when you wget/curl the https-ping-url from the synology?
@styxit Ill make a pr regarding download log to your repo as well, the damn "insert random nas" is just pita..
Yes everything works without SSL and HTPC manager, sickbeard, couchpotato work with ssl. It's just when HTPC manager tries to access sickbeard and couchpotato which is the issue.
wget/curl discovered the problem. I am using a self-signed from my nas and therefore the names don't match and that causes the error. My browser has the exception for it which is why it worked. --no-check-certificate
worked with wget/curl but it looks like urlopen() as of last year will now validate by default. It looks like I will need to pass an SSL context with urlopen() and manually enter the names or bypass checking all together. I'm not skilled with web programming so I'm not really sure how to do that without reading quite a bit. Is this a quick fix for you? perhaps just a checkbox for self-signed certificate in general settings?
Thanks for your help
Maybe use a valid ssl certificate? https://www.startssl.com offers them for free.
understood
I think htpc manager should support self signed cert, it would be trival to replace urllib2 with requests.
Could do this as an option/checkbox, not disable the certificate check by default.
that would be great!
So I am also on a synology and DO have a valid Purchased SSL cert. I am having the exact same issue. I tried using the external url form my CP install (mydomain.com) and checked SSL and also tried using internal IP (192.xxx.xxx.xxx) with SSL. Both seem to return an error however if I build the url manually similar to how https://github.com/styxit/HTPC-Manager/blob/master/modules/couchpotato.py builds the URL and ping that page in a browser via SSL it responds as expected with a success message as long as key is correct.
I wouldn't say you have the exact same issue (this should have been closed). The op used self signed cert while yours are valid. If you provide a log maybe we can help you out?
@Hellowlol yeah but I am having the same issue and have a real certificate. Also I saw that in your branch of HTPC-Manager you have sonarr support. However I'm using the synocommunity package for this and then updated to latest using builtin updater and would love to move to yours for just this one feature. Any advice?
See https://github.com/Hellowlol/HTPC-Manager/wiki/Installing-HTPC-on-Synology-NAS (see the issue that mention there) or wait for https://github.com/SynoCommunity/spksrc/pull/1747