I'll be the first to admit that I don't know much about anything when it comes to Linux. Using Ubuntu 10.04, python 2.7 (one of a two versions installed)
When I execute:
sudo ./PlexConnect_daemon.bash start
i get a message indicating that it was successful. When I use the status command, I'm told that it is running. But when I click the trailers app on my ATV, it fails to load ("Trailers is unavailable.") Since python 2.7 isn't the default version of python installed, I assume that it's trying to use 2.6 and this is causing problems (as this is the last problem I was having with getting Plexconnect to work at all.)
How do I get it to use python 2.7?
Start with then none deamon version and watch the output
add the following line to /etc/rc.local
python /usr/lib/PlexConnect/PlexConnect_daemon.py
save and restart - nothing more to do. Obviously change the path to your PlexConnect installation to reflect your own installation. I have this running on Lubuntu as a VM running on Vmware ESXI 5.5
Cheers,
Darren
Refering to the 2nd post, I have already done everything leading up to the "create init script" section. So I create the script /etc/init.d/plexconnect as directed (using the Ubuntu script provided) and chown, chmod and update-rc.d
And then I go to start the service....and there's no service named plexconnect (?)
tom@HouseMedia:~$ sudo chown root:root /etc/init.d/plexconnect
tom@HouseMedia:~$ sudo chmod 755 /etc/init.d/plexconnect
tom@HouseMedia:~$ sudo update-rc.d plexconnect defaults
update-rc.d: warning: plexconnect start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (3 4 5)
Adding system startup for /etc/init.d/plexconnect ...
/etc/rc0.d/K20plexconnect -> ../init.d/plexconnect
/etc/rc1.d/K20plexconnect -> ../init.d/plexconnect
/etc/rc6.d/K20plexconnect -> ../init.d/plexconnect
/etc/rc2.d/S20plexconnect -> ../init.d/plexconnect
/etc/rc3.d/S20plexconnect -> ../init.d/plexconnect
/etc/rc4.d/S20plexconnect -> ../init.d/plexconnect
/etc/rc5.d/S20plexconnect -> ../init.d/plexconnect
tom@HouseMedia:~$ sudo /sbin/service plexconnect start
sudo: /sbin/service: command not found
Although I am able to start it using: $sudo service plexconnect start
(I'm not sure if there is a difference between the two command line entries though)
The trailers app is still telling me that "Trailers is unavailable" and when I check on the status of plexconnect, I'm told it's not running
tom@HouseMedia:/var/run$ sudo service plexconnect start
* Starting the process PlexConnect
tom@HouseMedia:/var/run$ sudo service plexconnect status
* PlexConnect process is not running
Im not sure to be honest with you. I would look through the Ubuntu link quite a bit to try to see what you may be missing. There are a number of sucessful attempts at getting plexconnect to load at boot on Ubuntu in there. I have used a ton of flavors of linux but I have never installed plexconnect on any of them. Its been a number of years since I have used linux, I currently run OSX all day.
add the following line to /etc/rc.local
python /usr/lib/PlexConnect/PlexConnect_daemon.py
save and restart - nothing more to do. Obviously change the path to your PlexConnect installation to reflect your own installation. I have this running on Lubuntu as a VM running on Vmware ESXI 5.5
Cheers,
Darren
I like this and I gave this a go; no luck. I ensured the execution bit was set on /etc/rc.local as well.
I like this and I gave this a go; no luck. I ensured the execution bit was set on /etc/rc.local as well.
what are the error messages you are getting? anything in the logs?
I like this and I gave this a go; no luck. I ensured the execution bit was set on /etc/rc.local as well.
also what do you see if you go to terminal and simply type in python /usr/lib/PlexConnect/PlexConnect.py
as the others wrote, start the python PlexConnect app manually and see the output first.
After that, create a symlink to /etc/init.d/plexconnect with full path to the bash init script and add it to upstart, thats actually it
as the others wrote, start the python PlexConnect app manually and see the output first.
After that, create a symlink to /etc/init.d/plexconnect with full path to the bash init script and add it to upstart, thats actually it
I'm confused by your suggestion.
What path do I create the symlink (that points to /etc/init.d/plexconnect) in? What "full path to bash init script" are you referring to? Doesn't upstart require an entire script and not just a command?
My apologies for not including the details of my log / output when I run plexconnect manually, see below:
19:45:55 PlexConnect: started: 19:45:55
19:45:55 PlexConnect: Version: 0.3.1+
19:45:55 PlexConnect: Python: 2.7.5 (default, Feb 6 2014, 21:23:43)
[GCC 4.4.3]
19:45:55 PlexConnect: Host OS: linux2
19:45:55 Settings: getsetting enable_plexconnect_autodetect=True
19:45:55 PlexConnect: IP_self: 192.168.0.111
19:45:55 Settings: getsetting hosttointercept=trailers.apple.com
19:45:55 Settings: getsetting port_webserver=80
19:45:55 Settings: getsetting enable_dnsserver=True
19:45:55 DNSServer: started: 19:45:55
19:45:55 Settings: getsetting port_dnsserver=53
19:45:55 Settings: getsetting ip_dnsmaster=208.122.23.23
19:45:55 Settings: getsetting prevent_atv_update=True
19:45:55 DNSServer: ***
19:45:55 DNSServer: DNSServer: Serving DNS on 192.168.0.111 port 53.
19:45:55 DNSServer: intercept: ['trailers.apple.com'] => 192.168.0.111
19:45:55 DNSServer: restrain: ['mesu.apple.com', 'appldnld.apple.com', 'appldnld.apple.com.edgesuite.net'] => 127.0.0.1
19:45:55 DNSServer: forward other to higher level DNS: 208.122.23.23
19:45:55 DNSServer: ***
19:45:55 WebServer: started: 19:45:55
19:45:55 Settings: getsetting port_webserver=80
19:45:55 WebServer: ***
19:45:55 WebServer: WebServer: Serving HTTP on 192.168.0.111 port 80.
19:45:55 WebServer: ***
19:45:55 ATVSettings: init class CATVSettings
19:45:55 ATVSettings: load settings
19:45:55 Settings: getsetting enable_webserver_ssl=True
19:45:55 WebServer: started: 19:45:55
19:45:55 Settings: getsetting port_ssl=443
19:45:55 Settings: getsetting certfile=./assets/certificates/trailers.pem
19:45:55 Settings: getsetting certfile=./assets/certificates/trailers.pem
19:45:55 WebServer: ***
19:45:55 WebServer: WebServer: Serving HTTPS on 192.168.0.111 port 443.
19:45:55 WebServer: ***
19:46:07 DNSServer: DNS request received!
19:46:07 DNSServer: Source: ('192.168.0.164', 54767)
19:46:07 DNSServer: Domain: itunes.apple.com
19:46:07 DNSServer: ***forward request
19:46:07 DNSServer: -> DNS response from higher level
19:46:07 DNSServer: DNS request received!
19:46:07 DNSServer: Source: ('192.168.0.164', 53778)
19:46:07 DNSServer: Domain: EVSecure-ocsp.verisign.com
19:46:07 DNSServer: ***forward request
19:46:07 DNSServer: -> DNS response from higher level
19:46:08 DNSServer: DNS request received!
19:46:08 DNSServer: Source: ('192.168.0.164', 51238)
19:46:08 DNSServer: Domain: e5153.b.akamaiedge.net
19:46:08 DNSServer: ***forward request
as far as I can tell it is working correctly.
You need to do the following :
ln -s /etc/init.d/plexconnect /path/to/plexconnect/PlexConnect_daemon.bash
and then
sudo update-rc.d plexconnect defaults
That should actually do it
as far as I can tell it is working correctly.
You need to do the following :
ln -s /etc/init.d/plexconnect /path/to/plexconnect/PlexConnect_daemon.bash
and then
sudo update-rc.d plexconnect defaults
That should actually do it
No luck.
tom@HouseMedia:~/PlexConnect-master$ ln -s /etc/init.d/plexconnect /home/tom/PlexConnect-master/PlexConnect_daemon.bash
ln: creating symbolic link`/home/tom/PlexConnect-master/PlexConnect_daemon.bash': File exists
tom@HouseMedia:~/PlexConnect-master$ sudo update-rc.d plexconnect defaults
[sudo] password for tom:
update-rc.d: warning: plexconnect start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (3 4 5)
System start/stop links for /etc/init.d/plexconnect already exist.
And then I restart the system and have a look at what's happening...
tom@HouseMedia:~/PlexConnect-master$ sudo service plexconnect status
* PlexConnect process is not running
tom@HouseMedia:~/PlexConnect-master$ sudo service plexconnect start
* PlexConnect process is not running
* Starting the process PlexConnect
tom@HouseMedia:~/PlexConnect-master$ sudo service plexconnect status
* PlexConnect process is not running
the log doesn't show anything new having happened and nothing on the ATV (including trailers) seems to be able to see the network. I then start plexconnect manually and the ATV (including plexonnect) works as it should again. Even with PlexConnect clearly running (everything works) the plexconnect service insists that it has not been started.
if you already have a /etc/init.d/plexconnect file you can't create a symlink there.
if you already have a /etc/init.d/plexconnect file you can't create a symlink there.
Looking up how the ln command works, it appears that you're asking me to create a symlink named, "/PlexConnect-master/PlexConnect_daemon.bash" that references the location "/etc/init.d/plexconnect" Is that what you're asking me to do?
Or should I be creating a symlink in /etc/init.d/plexconnect that references the PlexConnect_daemon.bash ???
it seems you're not dumb, you can figure this one out! :P I didn't look it up, just wrote how I remembered it. Just try it.
But as I said, it seems you had a init script there already, your errors before said so
it seems you're not dumb, you can figure this one out! :P I didn't look it up, just wrote how I remembered it. Just try it.
But as I said, it seems you had a init script there already, your errors before said so
Yep, not dumb, just confused.
I have deleted the existing /etc/init.d/plexconnect file and create the symlink but then I get this strange error doing update-rc.d:
tom@HouseMedia:/etc/init.d$ sudo ln -s /path/to/plexconnect/PlexConnect_daemon.bash /etc/init.d/plexconnect
tom@HouseMedia:/etc/init.d$ sudo update-rc.d plexconnect defaults
update-rc.d: /etc/init.d/plexconnect: file does not exist
tom@HouseMedia:/etc/init.d$ ls
alsa-mixer-save lm-sensors sendsigs
anacron lxdm single
apache2 mediatomb skeleton
apparmor mgetty-fax smbd
atd module-init-tools spamassassin
avahi-daemon mt-daapd ssh
bacula-director mysql stop-bootlogd
bacula-fd networking stop-bootlogd-single
bacula-sd network-interface sysstat
bluetooth network-interface-security tightvncserver
bootlogd network-manager transmission-daemon
calibre nmbd udev
clamav-daemon ntp udev-finish
clamav-freshclam ondemand udevmonitor
console-setup plexconnect udevtrigger
cron plexmediaserver ufw
cups plymouth umountfs
dbus plymouth-log umountnfs.sh
dmesg plymouth-splash umountroot
dns-clean plymouth-stop unattended-upgrades
dropbox postfix urandom
failsafe-x powernowd vboxautostart-service
fancontrol powernowd.early vboxballoonctrl-service
forked-daapd.dpkg-new pppd-dns vboxdrv.dpkg-bak
grub-common procps vboxweb-service
halt rc virtualbox-ose
hostname rc.local webmin
hsf rcS wpa-ifupdown
hwclock README x11-common
hwclock-save reboot xdm
hylafax rsync xinetd
irqbalance rsyslog yum-updatesd
killprocs screen-cleanup
But as you can see, /etc/init.d/plexconnect does indeed exist.
wtf....
yea, you created a symlink to /path/to/plexconnect/ which of course does not exist :D
You should replace that path with /home/tom/PlexConnect-master/PlexConnect_daemon.bash
a
ls -la
command in /etc/init.d/ will show that you basically directed that link to a nonexistent file. It does of course now exist but it doesnt point to anything so it actually does not exist :)
It does of course now exist but it doesnt point to anything so it actually does not exist :)
Very Schrödinger'esque ;)