Tautulli been running fine but now can't start

sp00nlude

Dabbler
Joined
Sep 10, 2016
Messages
21
Hello,

This seems really odd and I can't figure out what to do. I have several iocage jails running fine and then after a router reboot, Tautulli would not let me access the webui. I found that the jail couldn't start. I deleted the jail and tried to create it again but it kept having the same issue, I went down the path of upgrading from 11.2 to 11.3 U3.2 and also upgraded all my jails (thankfully most went smooth with the exception of transmission which took some time to fix). I was hoping the issue would be resolved but I tried to install Tautulli using the plugin and jail method here still gave me this error:
Code:
root@freenas:~ # iocage exec tautulli service tautulli start
Starting tautulli.
env: python: No such file or directory
/usr/local/etc/rc.d/tautulli: WARNING: failed to start tautulli
Command: service tautulli start failed!


I pkg install python3 instead of python2 and both produced the same error. I also noticed that even after deleting the jail, I still see the folder for my /mnt/storage/apps/tautulli. Should I delete this folder too? I downloaded the tautulli.db so hopefully I can later restore my watch history.

I'm at a loss as to why it doesn't seem to think python is installed.
Code:
python --version
returns Python 3.7.5. If I do the same inside the jail it says command not found.

Any help is appreciated.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
Have you tried install python inside the jail?
 

colmconn

Contributor
Joined
Jul 28, 2015
Messages
174
You need to either edit the first line of the Tautulli.py to point to the the correct python executable. e.g., /usr/local/bin/python3.6 or create a link /usr/local/bin/python to (e.g.) /usr/local/bin/python3.6. Unlike most Linux distributions, FreeBSD tends to avoid having a /usr/local/bin/python preferring to leave the python executable versioned.

Finally, as Sam said you need to be doing this inside a jail not on the freenas host itself.
 

sp00nlude

Dabbler
Joined
Sep 10, 2016
Messages
21
When i tried to pkg install python3 inside the jail, it says everything is up to date. Thanks I looked in Tautulli.py but didn't know which line to update to point to the python executable. I'll review again.
 

colmconn

Contributor
Joined
Jul 28, 2015
Messages
174
When i tried to pkg install python3 inside the jail, it says everything is up to date. Thanks I looked in Tautulli.py but didn't know which line to update to point to the python executable. I'll review again.
the very first line isn’t the file.
 

sp00nlude

Dabbler
Joined
Sep 10, 2016
Messages
21
This is the start of the /usr/local/share/Tautulli/Tautulli.py, where would I update? Looks different from the versions I see online to fix the pathing issue.

Code:
#!/usr/bin/env python

# -*- coding: utf-8 -*-

# This file is part of Tautulli.
#
#  Tautulli is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Tautulli is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with Tautulli.  If not, see <http://www.gnu.org/licenses/>.

import os
import sys

# Ensure lib added to path, before any other imports
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib'))

from future.builtins import str

import appdirs
import argparse
import datetime
import locale
import pytz
import signal
import time
import threading
import tzlocal

 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
In my jail, I run which python, which results in
Code:
python: Command not found.


I then ran pkg search python, which results in a ton entries. However, one popped out:

Code:
python-3.7_3,2                 "meta-port" for the default version of Python interpreter


So then I ran pkg install python-3.7_3,2, and answered y to the prompt. After the installation, which python now results in
Code:
/usr/local/bin/python
. The tautulli.py script should now be able to find a working Python.
 

sp00nlude

Dabbler
Joined
Sep 10, 2016
Messages
21
In my jail, I run which python, which results in
Code:
python: Command not found.


I then ran pkg search python, which results in a ton entries. However, one popped out:

Code:
python-3.7_3,2                 "meta-port" for the default version of Python interpreter


So then I ran pkg install python-3.7_3,2, and answered y to the prompt. After the installation, which python now results in
Code:
/usr/local/bin/python
. The tautulli.py script should now be able to find a working Python.


Thank you, I was able to get the same output for which python. When I start Tautulli, I get this now.

Code:
root@freenas:~ # iocage exec tautulli service tautulli start
Starting tautulli.
Traceback (most recent call last):
  File "/usr/local/share/Tautulli/Tautulli.py", line 38, in <module>
    import plexpy
  File "/usr/local/share/Tautulli/plexpy/__init__.py", line 22, in <module>
    import sqlite3
  File "/usr/local/lib/python3.7/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/usr/local/lib/python3.7/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
/usr/local/etc/rc.d/tautulli: WARNING: failed to start tautulli
Command: service tautulli start failed!


Why is there two lines for sqlite3? Should I remove the line with "_sqlite3"?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
This is just complaining that there's no sqlite3 module for Python. Try pkg install py37-sqlite3 in the jail.
 

sp00nlude

Dabbler
Joined
Sep 10, 2016
Messages
21
This is just complaining that there's no sqlite3 module for Python. Try pkg install py37-sqlite3 in the jail.

Thank you for the help! It's up and running now after pkg install py37-sqlite3 .
 

JohnnyGrey

Dabbler
Joined
Jul 1, 2017
Messages
45
In my jail, I run which python, which results in
Code:
python: Command not found.


I then ran pkg search python, which results in a ton entries. However, one popped out:

Code:
python-3.7_3,2                 "meta-port" for the default version of Python interpreter


So then I ran pkg install python-3.7_3,2, and answered y to the prompt. After the installation, which python now results in
Code:
/usr/local/bin/python
. The tautulli.py script should now be able to find a working Python.

My Tautulli too wasn't able to start as a daemon. It started fine manually. I have no idea how long Tautulli has been down, but your instructions worked like a charm! I probably should probably SSH into my FreeNAS box more often for housekeeping :P
 

Berkyjay

Contributor
Joined
Nov 7, 2015
Messages
100
I'm having the same issues. I attempted the fixes suggested in this thread but I'm still unable to to access the web UI. Is there a log file somewhere that I can access via the shell to see what the issue is?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
I'm having the same issues. I attempted the fixes suggested in this thread but I'm still unable to to access the web UI. Is there a log file somewhere that I can access via the shell to see what the issue is?

Check the networking for your jail. Make sure you have a default gateway and DNS servers defined. If this is the case, try pkg update to set up your package repos, and then run pkg install python-3.7_3,2 and pkg install py37-sqlite3.
 

Berkyjay

Contributor
Joined
Nov 7, 2015
Messages
100
Check the networking for your jail. Make sure you have a default gateway and DNS servers defined. If this is the case, try pkg update to set up your package repos, and then run pkg install python-3.7_3,2 and pkg install py37-sqlite3.

So I'm not seeing anywhere to set or check the default gateway or the DNS server. I've also already updated all the packages and did the python and sqlite installs:

1594580495250.png


1594580522275.png
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
OK, you do have a default gateway set in the jail. What does /etc/resolv.conf inside the jail show? You may need to add nameserver 192.168.1.1; in the resolver field of the Network Properties of the jail.
 

Berkyjay

Contributor
Joined
Nov 7, 2015
Messages
100
OK, you do have a default gateway set in the jail. What does /etc/resolv.conf inside the jail show? You may need to add nameserver 192.168.1.1; in the resolver field of the Network Properties of the jail.

The resolv.conf has this:

Code:
# Generated by resolvconf
search local
nameserver 192.168.1.1


I'm kind of curious though. Is this an issue with Tautulli or an issue with the Jail? Because as with others, the plugin was working after install. But then when I restarted my server that's when it broke. So I'm not really understanding what would have changed on a restart.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
Does pkg update work inside the jail? If it does, then run pkg install python-3.7_3,2 py37-sqlite3, and then afterwards run which python. Tautulli should start.
 

Berkyjay

Contributor
Joined
Nov 7, 2015
Messages
100
Does pkg update work inside the jail? If it does, then run pkg install python-3.7_3,2 py37-sqlite3, and then afterwards run which python. Tautulli should start.

I have already done those things. The jail starts but the web UI is inaccessible.

Code:
root@PlexPy:/ # pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
root@PlexPy:/ #
root@PlexPy:/ # pkg install python-3.7_3,2
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
root@PlexPy:/ # pkg install py37-sqlite3
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
root@PlexPy:/ # which python
/usr/local/bin/python
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
What's service tautulli status?
 
Top