How To Install Tautulli (A Python based monitoring and tracking tool for Plex Media Server.)

Brossy

Cadet
Joined
Mar 19, 2016
Messages
1
I had the same problem with my install. It reminded me of similar issues with sabtosickbeard.py.
I solved it by editing the first line in plexpy.py from

#!/usr/bin/env python


to

#!/usr/local/bin/python2.7


This reflects where python is installed in my jail. I don't know why this fixed it (I mean isn't the line commented out?), but it did;)

Hmmmm, I'm having the same issue, but can't seem to resolve with that. I should mention though that my first line is "#!/bin/sh" and not "#!/usr/bin/env python" as stated above. Admittedly, I am new to this and not a programmer. Any advice?
 

DeanB

Dabbler
Joined
Sep 28, 2015
Messages
14
I've had to reinstall plexpy again, but it now seems something isn't installing properly with the initial line:
pkg install python2 databases/py-sqlite3 security/py-openssl security/ca_root_nss git

I get the following result:

Proceed with this action? [y/N]: y
[plexpy_1] Fetching pkg-1.6.4_1.txz: 100% 2 MiB 2.1MB/s 00:01
Checking integrity... done (0 conflicting)
[plexpy_1] [1/1] Upgrading pkg from 1.4.12 to 1.6.4_1...
[plexpy_1] [1/1] Extracting pkg-1.6.4_1: 100%
Updating FreeBSD repository catalogue...
pkg: Unable to upgrade "FreeBSD" repo schema version 2010 (target version 2012) -- change not found
pkg: need to re-create repo FreeBSD to upgrade schema version
[plexpy_1] Fetching meta.txz: 100% 968 B 1.0kB/s 00:01
[plexpy_1] Fetching packagesite.txz: 100% 5 MiB 2.8MB/s 00:02
Processing entries: 100%
FreeBSD repository update completed. 24652 packages processed.
pkg: No packages available to install matching 'git' have been found in the repositories


I previously had to type y (yes) to two questions, but only once now. The last line seems to be an error.
If I continue on with the instructions, python2 PlexPy.py will no longer launch the service.
 

soulburn

Contributor
Joined
Jul 6, 2014
Messages
100
I've had to reinstall plexpy again, but it now seems something isn't installing properly with the initial line:
pkg install python2 databases/py-sqlite3 security/py-openssl security/ca_root_nss git

I get the following result:

Proceed with this action? [y/N]: y
[plexpy_1] Fetching pkg-1.6.4_1.txz: 100% 2 MiB 2.1MB/s 00:01
Checking integrity... done (0 conflicting)
[plexpy_1] [1/1] Upgrading pkg from 1.4.12 to 1.6.4_1...
[plexpy_1] [1/1] Extracting pkg-1.6.4_1: 100%
Updating FreeBSD repository catalogue...
pkg: Unable to upgrade "FreeBSD" repo schema version 2010 (target version 2012) -- change not found
pkg: need to re-create repo FreeBSD to upgrade schema version
[plexpy_1] Fetching meta.txz: 100% 968 B 1.0kB/s 00:01
[plexpy_1] Fetching packagesite.txz: 100% 5 MiB 2.8MB/s 00:02
Processing entries: 100%
FreeBSD repository update completed. 24652 packages processed.
pkg: No packages available to install matching 'git' have been found in the repositories


I previously had to type y (yes) to two questions, but only once now. The last line seems to be an error.
If I continue on with the instructions, python2 PlexPy.py will no longer launch the service.

Try to type in the prerequisites one at a time, like this. I had a similar issue where it was complaining about git but it seems it's already there so no worries with that last one.

Code:
pkg install python2
pkg install databases/py-sqlite3
pkg install security/py-openssl
pkg install security/ca_root_nss
pkg install git (this command didn't work for me either but it seems to be fine without it)
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
I think you need the git package to update PlexPy from the WUI
 

robuyo

Dabbler
Joined
Apr 13, 2015
Messages
11
I had the same problem with my install. It reminded me of similar issues with sabtosickbeard.py.
I solved it by editing the first line in plexpy.py from

#!/usr/bin/env python


to

#!/usr/local/bin/python2.7


This reflects where python is installed in my jail. I don't know why this fixed it (I mean isn't the line commented out?), but it did;)

With this little change, works like a charm! :D
Thanks both of you.
 

JonnyWong16

Cadet
Joined
Mar 6, 2014
Messages
1
PlexPy dev stopping by to let you guys know that I fixed the shebang line with v1.3.12 so it should be able to start as a service now.

If you modified the shebang line yourself, you might not be able to pull updates due to git conflicts.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
great tutorial!
 
Last edited:

Schuby

Dabbler
Joined
Apr 27, 2016
Messages
37
Anyone else having problems with PlexPy auto-starting in the Plex jail? Everytime I reboot, PlexPy attempts to start then crashes. Upon deleting it's .pid file, I am able to start it successfully. I think it has to do with the network not being initialized before it starts.

Log:

Code:
2016-05-13 02:23:11 - WARNING :: Thread-21 : Failed to access uri endpoint /library/recentlyAdded?X-Plex-Container-Start=0&X-Plex-Co
ntainer-Size=10 with error [Errno 8] hostname nor servname provided, or not known                                                  
2016-05-13 02:23:11 - WARNING :: Thread-21 : PlexPy Pmsconnect :: Unable to parse XML for get_recently_added: 'NoneType' object has
no attribute 'getElementsByTagName'.                                                                                               
2016-05-13 02:23:41 - WARNING :: Thread-18 : Failed to access uri endpoint /myplex/refreshReachability with error [Errno 8] hostname
nor servname provided, or not known                                                                                               
2016-05-13 02:24:11 - WARNING :: Thread-18 : Failed to access uri endpoint /myplex/account with error [Errno 8] hostname nor servnam
e provided, or not known                                                                                                           
2016-05-13 02:24:11 - WARNING :: Thread-18 : PlexPy Pmsconnect :: Unable to parse XML for get_server_response: 'NoneType' object has
no attribute 'getElementsByTagName'.                                                                                              
2016-05-13 02:24:41 - WARNING :: Thread-17 : Failed to access uri endpoint /status/sessions with error [Errno 8] hostname nor servna
me provided, or not known                                                                                                          
2016-05-13 02:24:41 - WARNING :: Thread-17 : PlexPy Pmsconnect :: Unable to parse XML for get_current_activity: 'NoneType' object ha
s no attribute 'getElementsByTagName'.                                                                                             
2016-05-13 02:24:41 - DEBUG   :: Thread-17 : PlexPy Monitor :: Unable to read session list.                                        
2016-05-13 02:24:41 - WARNING :: Thread-17 : PlexPy Monitor :: Unable to get an internal response from the server, ping attempt 1. 
2016-05-13 02:25:11 - WARNING :: Thread-16 : Failed to access uri endpoint /library/recentlyAdded?X-Plex-Container-Start=0&X-Plex-Co
ntainer-Size=10 with error [Errno 8] hostname nor servname provided, or not known                                                  
2016-05-13 02:25:11 - WARNING :: Thread-16 : PlexPy Pmsconnect :: Unable to parse XML for get_recently_added: 'NoneType' object has
no attribute 'getElementsByTagName'.                                                                                               
2016-05-13 02:25:33 - WARNING :: Thread-20 : Failed to access uri endpoint /myplex/refreshReachability with error [Errno 8] hostname
                                                                                                                                   

 
Joined
Jul 18, 2015
Messages
4
Anyone else having problems with PlexPy auto-starting in the Plex jail? Everytime I reboot, PlexPy attempts to start then crashes. Upon deleting it's .pid file, I am able to start it successfully. I think it has to do with the network not being initialized before it starts.

Log:

Code:
2016-05-13 02:23:11 - WARNING :: Thread-21 : Failed to access uri endpoint /library/recentlyAdded?X-Plex-Container-Start=0&X-Plex-Co
ntainer-Size=10 with error [Errno 8] hostname nor servname provided, or not known                                               
2016-05-13 02:23:11 - WARNING :: Thread-21 : PlexPy Pmsconnect :: Unable to parse XML for get_recently_added: 'NoneType' object has
no attribute 'getElementsByTagName'.                                                                                            
2016-05-13 02:23:41 - WARNING :: Thread-18 : Failed to access uri endpoint /myplex/refreshReachability with error [Errno 8] hostname
nor servname provided, or not known                                                                                            
2016-05-13 02:24:11 - WARNING :: Thread-18 : Failed to access uri endpoint /myplex/account with error [Errno 8] hostname nor servnam
e provided, or not known                                                                                                        
2016-05-13 02:24:11 - WARNING :: Thread-18 : PlexPy Pmsconnect :: Unable to parse XML for get_server_response: 'NoneType' object has
no attribute 'getElementsByTagName'.                                                                                           
2016-05-13 02:24:41 - WARNING :: Thread-17 : Failed to access uri endpoint /status/sessions with error [Errno 8] hostname nor servna
me provided, or not known                                                                                                       
2016-05-13 02:24:41 - WARNING :: Thread-17 : PlexPy Pmsconnect :: Unable to parse XML for get_current_activity: 'NoneType' object ha
s no attribute 'getElementsByTagName'.                                                                                          
2016-05-13 02:24:41 - DEBUG   :: Thread-17 : PlexPy Monitor :: Unable to read session list.                                     
2016-05-13 02:24:41 - WARNING :: Thread-17 : PlexPy Monitor :: Unable to get an internal response from the server, ping attempt 1.
2016-05-13 02:25:11 - WARNING :: Thread-16 : Failed to access uri endpoint /library/recentlyAdded?X-Plex-Container-Start=0&X-Plex-Co
ntainer-Size=10 with error [Errno 8] hostname nor servname provided, or not known                                               
2016-05-13 02:25:11 - WARNING :: Thread-16 : PlexPy Pmsconnect :: Unable to parse XML for get_recently_added: 'NoneType' object has
no attribute 'getElementsByTagName'.                                                                                            
2016-05-13 02:25:33 - WARNING :: Thread-20 : Failed to access uri endpoint /myplex/refreshReachability with error [Errno 8] hostname
                                                                                                                                


I guess my problem is the same as yours as PlexPy wont auto start. Then when I try to start it manually I get this error
Code:
root@PlexPy:/ # service plexpy start
Starting plexpy.
PID file '/usr/local/share/plexpy/plexpy.pid' already exists. Exiting.
/etc/rc.d/plexpy: WARNING: failed to start plexpy


So thanks to your advice removing the plexpy.pid file works but I would love to know what my problem is so I dont have to do that everytime. Did you ever figure it out?
 

Schuby

Dabbler
Joined
Apr 27, 2016
Messages
37
I guess my problem is the same as yours as PlexPy wont auto start. Then when I try to start it manually I get this error
Code:
root@PlexPy:/ # service plexpy start
Starting plexpy.
PID file '/usr/local/share/plexpy/plexpy.pid' already exists. Exiting.
/etc/rc.d/plexpy: WARNING: failed to start plexpy


So thanks to your advice removing the plexpy.pid file works but I would love to know what my problem is so I dont have to do that everytime. Did you ever figure it out?

Mine works after unchecking 'external server' and switching from using a hostname to the IP Plex runs on (which is in the same jail). Started working fine after that.


Sent from my iPhone using Tapatalk
 
Joined
Jul 18, 2015
Messages
4
Mine works after unchecking 'external server' and switching from using a hostname to the IP Plex runs on (which is in the same jail). Started working fine after that.


Sent from my iPhone using Tapatalk
Thanks for the quick response. I dont have external server checked, I believe mine says remote server but it isnt checked. I did add in setting under HTTP Host the IP of the PlexPy jail instead of localhost. I have it setup in a different jail, I want to make sure I had it all setup and running right before I added it to my Plex jail. Now after several reboots all seems to be going fine. It autostarts now every single time without any issues. So thank you! Maybe I will just bite the bullet now and ad it to the Plex jail. Thank you Schuby for your help.
 

Schuby

Dabbler
Joined
Apr 27, 2016
Messages
37
Thanks for the quick response. I dont have external server checked, I believe mine says remote server but it isnt checked. I did add in setting under HTTP Host the IP of the PlexPy jail instead of localhost. I have it setup in a different jail, I want to make sure I had it all setup and running right before I added it to my Plex jail. Now after several reboots all seems to be going fine. It autostarts now every single time without any issues. So thank you! Maybe I will just bite the bullet now and ad it to the Plex jail. Thank you Schuby for your help.
No problem! And I meant 'remote server', it just wasn't right in front of me. Hopefully it stays working!


Sent from my iPhone using Tapatalk
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
hmm i am getting this error now as well. I have unchecked "remote server" and changed the hostname as @Schuby and now i can't get the GUI to appear, even after clearing the http_host and http_port
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
alright so i backed up my plexpy.db database and am trying to fresh install but it gives me an error on the very first command

Code:
root@plexpy:/ # pkg install python2 databases/py-sqlite3 security/py-openssl security/ca_root_nss git
Updating repository catalogue
digests.txz                                                           100% 2148KB   2.1MB/s   2.1MB/s   00:01   
packagesite.txz                                                       100% 5612KB   5.5MB/s   3.3MB/s   00:01   
pkg: wrong architecture: freebsd:10:x86:64 instead of freebsd:9:x86:64
Incremental update completed, 25289 packages processed:
0 packages updated, 0 removed and 25289 added.
pkg: Unable to find catalogs


anyone try installing this on 9.10 STABLE?

Supa, would be great if you could update this guide for 9.10
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
@Wolfeman0101 thanks for the reply. By installing the jail without the "virtualbox" template, it worked just fine.
 

mjt5282

Contributor
Joined
Mar 19, 2013
Messages
139
thanks for posting this, installed in the same jail as the Plex Media Server. (running 9.10 and Plex Pass PMS).
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
sorry for the late reply. it runs fine when "VirtualBox-4.3.12" is selected.

This was originally created under 9.3 but I think needed to be recreated for 9.10 which I did.
 
Top