PlexPy is now "Tautulli" -- upgrade tips

Status
Not open for further replies.

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
PlexPy is a python script that goes with Plex Media Server, if you use it in jails. It is a secondary thing that collects and present statistics, contacts you with notifications about your plex server, etc. Many FreeNAS users who install their own (i.e., non-plugin) Plex on their FreeNAS will also run PlexPy concurrently.

First of all, thank you to @sunrunner20 in the IRC channel for bringing to, effectively, FreeBSD's attention that plexpy is now "Tautulli". Apparently, the dev for that python script decided/was forced to changed the name from "plexpy" to something not mentioning Plex(tm), so now it's "Tautulli", which, other than sounding like a random Finnish word to me, has no significance I am aware of.

As a result of being informed of this, I contacted "Feld", who is one of the FreeBSD guys that is responsible for the ports of most of the software a lot of you guys are using (plexmediaserver, e.g., and like dozens of others). That was Thursday I think. Well today (Saturday), Feld has put in the FreeBSD ports tree the tautulli software. If you use portmaster or poudriere, I think at this point you are getting an automatic ports move. If you're not using portmaster or poudriere, then you don't need me to tell you how to install anything, and you can take it from here.

Anyway, the "upgrade" is significant, Tautulli is way nicer than PlexPy. And the upgrade is seamless if you do a few things. You can either cobble this together from the note in the original ports commit, or you can do the DrKK technique which seemed to work just fine, and maintained all the settings of my old plexpy seamlessly:

0. Stop the plexpy service, and cut her off in the rc.conf in whatever way floats your boat.
1. You'll need to install tautulli and start the service one time. Verify that your web front end is listening, and you can get to it. Of course, it will be jacked up for now.
2. Stop tautulli. Go to your old plexpy directory, which I believe is /usr/local/plexpy for almost everyone. In there, you will find config.ini, and this should be copied, as-is, to /var/db/tautulli
3. You will also find plexpy.db. You're going to want to take that file, and copy it, as is, WITH ITS ORIGINAL NAME, into /var/db/tautulli
4. Now, in /var/db/tautulli, make sure you do *NOT* have a tautulli.db in there. If there is one, blow it away.
5. When tautulli cannot find a tautulli.db, only then will it look for a plexpy.db. If it finds one, it will convert it to a proper tautulli.db.
6. *NOW*, go ahead and turn on the service at boot (whatever your preferred method is, I prefer: "sysrc tautulli_enable=yes")
7. Turn on the service ("service tautulli start)
8. Now check your usual plexpy web page. You should now see the magic.
9. **IF** you do not, the problem is almost certainly the ownership of the directory or files (particularly tautulli.db) in the /var/db/tautulli diectory. In most cases, you'll want those files (and the directory) to be owned by the same user as your plexpy user was, which for almost everyone is "nobody". Use "chown" as appropriate to effectuate that change, and restart the service.

OK, let me know how you all make out. I know we have a few thousand, or certainly hundreds, of people using plexpy.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Also for the record, is a Tautulli Android App as a "beta" in the store. I am not sure what use it is, but I've installed it.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Not sure why I was interested in this, as I switched to emby several months ago, but I thought I'd take a look.

My plexpy jail was probably created back in 9.3 so is pretty out of date. To that effect, I couldn't update plexpy from GIT (security issues) and tautulli isn't available in the port tree.

I thought I'd create a new jail and managed to get it up and running, although it didn't seem to be using /var/db for the config or db file as these were still in /usr/local/share/Tautulli.

Anyway, copied over the files from the plexpy jail and started up with python Tautulli.py and it seemed to have all the old data.

Can't for the life of me get it to run as a service though. Added the relevant line to /etc/rc.conf but it said a file was missing from /etc/rc.d. Checked plexpy jail and this has a plexpy file so found something similar in the init-script folder - init.freenas and copied to /etc/rc.d/tautulli

This appears to start the service, but I can't access from IP:8181.

Not a biggy, as I'm not using Plex, but wondered what I'd done wrong. It does look a little nicer, and a must for anyone still using Plex :D
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
Thanks for posting this @DrKK

I am still running a warden based jail of plex and formally plexpy (installed through pkg) and it auto updated to Tautulli through plexpy GUI. Database was intact and everything updated well.

Probably not very relevant as I'm still lingering on warden (haven't had time to deal with iocage yet) but thought I would share.
 
Last edited:

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Thanks for posting this @DrKK

I am still running a warden based jail of plex and formally plexpy (installed through pkg) and it auto updated to Tautulli through plexpy GUI. Database was interacted and everything updated well.

Probably not very relevant as I'm still lingering on warden (haven't had time to deal with iocage yet) but thought I would share.
Hey, my main FreeNAS, the one people actually *USE* to serve files and whatnot, is still on 9.10, with warden. Only my backup box is "experimenting" with the "release" version of 11.1.
 
Joined
Apr 9, 2015
Messages
1,258
I had some issues and found that sqlite3 has dropped support the call "fdatasync" anymore. If you see the error

Code:
Traceback (most recent call last):
  File "Tautulli.py", line 35, in <module>
	import plexpy
  File "/usr/local/share/Tautulli/plexpy/__init__.py", line 18, in <module>
	import sqlite3
  File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
	from dbapi2 import *
  File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 28, in <module>
	from _sqlite3 import *
ImportError: /usr/local/lib/libsqlite3.so.0: Undefined symbol "fdatasync"


You will need to downgrade the sqlite version and then it will work. The same as the issue that has crept up with some other applications. After that it will work perfectly. Below is the post with the instructions to do this.

https://forums.freenas.org/index.php?threads/error-trying-to-process-tv-shows.60696/#post-436811
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
I had some issues and found that sqlite3 has dropped support the call "fdatasync" any more. If you see the error

Code:
Traceback (most recent call last):
  File "Tautulli.py", line 35, in <module>
	import plexpy
  File "/usr/local/share/Tautulli/plexpy/__init__.py", line 18, in <module>
	import sqlite3
  File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
	from dbapi2 import *
  File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 28, in <module>
	from _sqlite3 import *
ImportError: /usr/local/lib/libsqlite3.so.0: Undefined symbol "fdatasync"


You will need to downgrade the sqlite version and then it will work. The same as the issue that has crept up with some other applications. After that it will work perfectly. Below is the post with the instructions to do this.

https://forums.freenas.org/index.php?threads/error-trying-to-process-tv-shows.60696/#post-436811
My installation is in a 9.10 FreeNAS and jail; I didn't run into this issue.
 
Joined
Apr 9, 2015
Messages
1,258
My installation is in a 9.10 FreeNAS and jail; I didn't run into this issue.

Form my understanding anyone on 11.0 or higher will come across the problem.
 

Andy C

Explorer
Joined
Feb 18, 2015
Messages
67
I was happily using Plex and PlexPy. That fact that Plex Corp requested the author of PlexPy to change its name has forced me to switch to Emby.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Form my understanding anyone on 11.0 or higher will come across the problem
...unless they're using an iocage jail built on the FreeBSD 11.1 release.
 

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
What is the upgrade process for Tautulli once it is installed and running? I am on 11.1U4, but I believe I am in an old warden jail as I created it through the webUI. I admit, at some point (I think once 11.2 is out and confirmed stable) I will have to convert to iocage, but for now, how do I update? The webUI presents a "update available" button which seems to do a bunch of nothing. It does show a restart and update screen, but when it reloads its still on the old version.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
@LIGISTIX Tautulli can be upgraded from the GUI. That is how I have always done it. Also if I am not mistaken, there is an auto-update option in the preferences for Tautulli now (don't believe it was there when it was Plexpy).
update.png
 

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
@LIGISTIX Tautulli can be upgraded from the GUI. That is how I have always done it. Also if I am not mistaken, there is an auto-update option in the preferences for Tautulli now (don't believe it was there when it was Plexpy).
update.png

It doesn’t look like hitting update works in the GUI for me. Not exactly sure why that would be. It’s a warden jail, not iocage, could that have anything to do with it?


Sent from my iPhone using Tapatalk
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
It’s a warden jail, not iocage, could that have anything to do with it?
Shouldn't, mine is warden as well.
What happens you click "check for updates"?

Maybe you can try better luck by posting a separate thread or asking on the tautulli forums (GitHub).
 

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
Shouldn't, mine is warden as well.
What happens you click "check for updates"?

Maybe you can try better luck by posting a separate thread or asking on the tautulli forums (GitHub).

I press update, it shows a restarting and will be back up in 140 seconds or something to that affect. And when it resumes the update wasn’t applied.

Sorry, on my phone so can’t see exactly what it says, but that’s the gist of it.


Sent from my iPhone using Tapatalk
 

mwittemans

Cadet
Joined
Jul 26, 2016
Messages
8
All,
I can confirm the issue and solution when installing/upgrading from PlexPy to Tautilli, under a warden r11.0 jail.
When you install or update, Tautulli will not start and give following error
Code:
root@tserver:/usr/local/share/Tautulli # python2 Tautulli.py
Traceback (most recent call last):
  File "Tautulli.py", line 35, in <module>
	import plexpy
  File "/usr/local/share/Tautulli/plexpy/__init__.py", line 18, in <module>
	import sqlite3
  File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
	from dbapi2 import *
  File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 28, in <module>
	from _sqlite3 import *
ImportError: /usr/local/lib/libsqlite3.so.0: Undefined symbol "fdatasync"



Solution is provided by Ray Milvard in this post https://forums.freenas.org/index.php?threads/error-trying-to-process-tv-shows.60696/#post-436811


pkg delete -f sqlite3
fetch "http://pkg.freebsd.org/freebsd:11:x86:64/release_0/All/sqlite3-3.13.0.txz"
pkg add sqlite3-*.txz




Tested and verified working on both my Test and Production 11.0-RELEASE-p1 Jails (root@tserver:~ # freebsd-version)
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
under a warden r11.0 jail.
...which is your problem. The "solution" you mention is not a solution, merely a workaround--the solution is to move to an iocage jail.
 
Status
Not open for further replies.
Top