If you have the certfile option in Settings.cfg set to the default (relative) path, PlexConnect.py will only work when run from the PlexConnect root dir. If you want to run PlexConnect as a service, you need to put the absolute path in the certfile option.
You're the man! That was it, thanks so much for your help! Now everything is finally back to normal.
If you have the certfile option in Settings.cfg set to the default (relative) path, PlexConnect.py will only work when run from the PlexConnect root dir. If you want to run PlexConnect as a service, you need to put the absolute path in the certfile option.
i decided to try and have my apache2 server handle both http and https vhosts and the result is the same as if i use just http vhost and normal https with plexconnect on 443. anyone see an issue with my settings? i've narrowed the issue down to my http server but can't solve it. if i disabled listening on port 80 and just run vhost on 443 and use the plex http server for 80 it runs okay. if i use the plex server for 443 and my apache2 for 80 it does not work.
apache2 error.log
[Sun Nov 10 18:27:12 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Nov 10 18:27:12 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Nov 10 18:27:12 2013] [notice] Apache/2.2.22 (Ubuntu) mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz
NameVirtualHost *:80
Listen 80
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
NameVirtualHost *:443
Listen 443
NameVirtualHost *:443
Listen 443
apache2 000-default.conf
ServerName trailers.apple.com
ServerAlias atv.plexconnect
ProxyRequests Off
SSLEngine off
ProxyPreserveHost On
Order allow,deny
Allow from all
ProxyPass / http://192.168.1.10:81/
ProxyPassReverse / http://192.168.1.10:81/
apache2 000-default-ssl:
ServerName trailers.apple.com
ServerAlias atv.plexconnect
ProxyRequests Off
SSLEngine On
SSLProtocol all -SSLv2
SSLProxyEngine On
SSLCertificateFile /usr/local/lib/plexconnect/assets/certificates/trailers.cer
SSLCertificateKeyFile /usr/local/lib/plexconnect/assets/certificates/trailers.key
ProxyPreserveHost On
Order allow,deny
Allow from all
ProxyPass / https://192.168.1.10:4501/
ProxyPassReverse / https://192.168.1.10:4501/
ServerName trailers.apple.com
ServerAlias atv.plexconnect
ProxyRequests Off
ProxyPreserveHost On
Order allow,deny
Allow from all
AllowEncodedSlashes NoDecode
ProxyPass / http://192.168.1.10:81/ nocanon
ProxyPassReverse / http://192.168.1.10:81/
I'm running PlexConnect on Ubuntu 13.10. Here's my version of an UPSTART script. To me it seems a fair bit simpler than the INIT script. It assumes PlexConnect files to be in /usr/local/lib/plexconnect. Here it is (plexconnect.conf):
# PlexConnect - Plex for Apple TV
#
# The PlexConnect server redirects the Trailer app on Apple TV to
# the local Plex server infrastructure.
description “PlexConnect server”
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
umask 022
send output to a log file (by default /var/log/upstart/)
you can monitor it using ‘sudo tail -f /var/log/upstart/plexconnect.log’
console log
pre-start script
test -x /usr/local/lib/plexconnect/PlexConnect.py || { stop; exit 0; }
test -c /dev/null || { stop; exit 0; }
end script
You can now just create a symlink in /etc/init.d/ called plexconnect linking to the actual PlexConnect_daemon.bash file in the PlexConnect folder and then add it to autostart by writing
After upgrading to Ubuntu Server 13.10, I can no longer get this script to work. When I enter, with or without sudo, "service plexconnect status/start/etc." I get the following back:
mike@nas4atu:/$ service plexconnect start
/etc/init.d/plexconnect: invalid arguments
* could not access PID file for PlexConnect process
* Starting the process PlexConnect
From the Apple TV's perspective, nothing is wrong. I can watch content.
I tried using the bash script that's now included, but it didn't start the service at boot. I'm not sure if it's supposed to or not.
Any ideas? I've tried every vague thing that Google turned up and I haven't had any progress.
i decided to try and have my apache2 server handle both http and https vhosts and the result is the same as if i use just http vhost and normal https with plexconnect on 443. anyone see an issue with my settings? i've narrowed the issue down to my http server but can't solve it. if i disabled listening on port 80 and just run vhost on 443 and use the plex http server for 80 it runs okay. if i use the plex server for 443 and my apache2 for 80 it does not work.
apache2 error.log
[Sun Nov 10 18:27:12 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Nov 10 18:27:12 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Nov 10 18:27:12 2013] [notice] Apache/2.2.22 (Ubuntu) mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz
NameVirtualHost *:80
Listen 80
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
NameVirtualHost *:443
Listen 443
NameVirtualHost *:443
Listen 443
apache2 000-default.conf
ServerName trailers.apple.com
ServerAlias atv.plexconnect
ProxyRequests Off
SSLEngine off
ProxyPreserveHost On
Order allow,deny
Allow from all
ProxyPass / http://192.168.1.10:81/
ProxyPassReverse / http://192.168.1.10:81/
apache2 000-default-ssl:
ServerName trailers.apple.com
ServerAlias atv.plexconnect
ProxyRequests Off
SSLEngine On
SSLProtocol all -SSLv2
SSLProxyEngine On
SSLCertificateFile /usr/local/lib/plexconnect/assets/certificates/trailers.cer
SSLCertificateKeyFile /usr/local/lib/plexconnect/assets/certificates/trailers.key
ProxyPreserveHost On
Order allow,deny
Allow from all
ProxyPass / https://192.168.1.10:4501/
ProxyPassReverse / https://192.168.1.10:4501/
I used the Ubuntu script in Post #48, and I got it set up right. When I start the service, all is well. However, when I try and run:
sudo update-rc.d plexconnect defaults
This is what I see:
insserv: script plexconnect is not an executable regular file, skipped!
The script you are attempting to invoke has been converted to an Upstart
job, but lsb-header is not supported for Upstart jobs.
insserv: warning: script 'plexmediaserver' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `plexmediaserver'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `plexmediaserver'
What am I doing wrong? I hate being this close and yet so far. I don't mind starting the service once in a while, but I need to make it as user friendly as possible for my wife! Thanks for this thread and all the help thus far!
Let me put it this way, I am not good with Ubuntu, so if it is going to be easier to give me a step by step after PMS is installed, I would prefer that! Thanks!