• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting SOLVED: Ubuntu Jellyfin Installation Issues and Solutions

     
    • 0 Vote(s) - 0 Average

    SOLVED: Ubuntu Jellyfin Installation Issues and Solutions

    Jellyfin v10.9.8.0, Ubuntu v22.04.02
    jelly_looking_for_jam
    Offline

    Junior Member

    Posts: 1
    Threads: 1
    Joined: 2024 Jul
    Reputation: 0
    Country:United States
    #1
    2024-07-31, 10:42 PM
    Hi all, I'm new to Jellyfin and wanted to document some issues and solutions I came across while doing a fresh install on Ubuntu 22.04.2.

    My Jellyfin server is running on 10.9.8.0.

    I downloaded the install script via curl and installed Jellyfin via the Repository (Automatic) section of the Jellyfin documentation.

    Upon trying to start Jellyfin I encountered the following error:
    Code:
    [13:12:56] [ERR] [1] Main: The server is expected to host the web client, but the provided content directory is either invalid or empty: /usr/lib/jellyfin/bin/jellyfin-web. If you do not want to host the web client with the server, you may set the '--nowebclient' command line flag, or set'hostwebclient=false' in your config settings

    The Jellyfin github solution for the following command worked for me (note: I don't recall if I ran this command as sudo - if it throws an error run it as sudo):
    Code:
    ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web

    -

    Afterwards the next error I encountered had the following messages:
    Code:
    [15:59:37] [ERR] [1] Jellyfin.Networking.AutoDiscoveryHost: Unable to bind to 0.0.0.0:7359
    System.Net.Sockets.SocketException (98): Address already in use
    ...
    [15:59:38] [ERR] [1] Microsoft.Extensions.Hosting.Internal.Host: Hosting failed to start
    ...
    [15:59:38] [ERR] [1] Main: Kestrel failed to start! This is most likely due to an invalid address or port bind - correct your bind configuration in network.xml and try again
    [15:59:38] [FTL] [1] Main: Error while starting server
    System.IO.IOException: Failed to bind to address http://0.0.0.0:8096: address already in use.
    ...

    I checked to ensure there were no other instances of Jellyfin or other services using that port via examining output of the following commands:
    Code:
    sudo lsof -i -sTCP:LISTEN
    sudo lsof -i -sTCP:ESTABLISHED

    For thoroughness' sake if Jellyfin were running you would see something like:
    Code:
    COMMAND      PID            USER  FD  TYPE  DEVICE SIZE/OFF NODE NAME
    jellyfin  225356        jellyfin  470u  IPv4 22047874      0t0  TCP *:8096 (LISTEN)
     

    You could then stop and kill Jellyfin via:
    Code:
    sudo service jellyfin stop
    sudo kill -9 <Your_PID>

    -

    Anyhoo, most of the instructions I've found on these forums seem to be for Windows firewall issues so I wanted to document here that the following server iptables rules solved my problems.

    To check existing iptables rules concerning the Jellyfin HTTP port:
    Code:
    sudo iptables -L | grep 8096

    To allow connections to that port on the server:
    Code:
    sudo iptables -A INPUT -p tcp --dport 8096 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
    sudo iptables -A OUTPUT -p tcp --sport 8096 -m conntrack --ctstate ESTABLISHED -j ACCEPT

    To make connections persist after reboot/shutdown:
    Code:
    sudo netfilter-persistent save

    -

    On the client device (a laptop running Ubuntu 22.04.01) I also had to add the following rules: 
    Code:
    sudo iptables -A INPUT -p tcp -s <Your_Server_Hostname> -m conntrack --ctstate ESTABLISHED -j ACCEPT
    sudo iptables -A OUTPUT -p tcp -s <Your_Server_Hostname> -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT

    To make connections persist after reboot/shutdown:
    Code:
    sudo netfilter-persistent save

    -

    Afterwards I restarted the Jellyfin service on my server. Then in the Jellyfin add-on in Kodi the server hostname automatically populated. Since then I've had no issues with Jellyfin or Kodi v21 (using Jellyfin for Kodi add-on with the default/non-native option).

    Hopefully this helps someone else!
    theguymadmax
    Offline

    Community Moderator

    Posts: 1,040
    Threads: 0
    Joined: 2024 Jun
    Reputation: 58
    #2
    2024-07-31, 11:33 PM (This post was last modified: 2024-07-31, 11:35 PM by theguymadmax. Edited 1 time in total.)
    I'm sorry to say this, but this is wrong advice. The issue stems from trying to start Jellyfin by typing 'jellyfin' in the terminal after installing it with the script:
    Code:
    curl -s https://repo.jellyfin.org/install-debuntu.sh | sudo bash
     

    Jellyfin operates as a system service, so it shouldn't be started manually from the terminal. If you attempt to do so, you’ll encounter errors like “no web client,” which is an early indicator that something’s off. If you bypass that step, you’ll encounter errors related to invalid addresses because Jellyfin is already running as a service.

    After running the installation script, you should configure Jellyfin by accessing it through your web browser at http://localhost:8096/ .
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #3
    2024-08-01, 02:03 AM (This post was last modified: 2024-08-01, 02:05 AM by TheDreadPirate. Edited 1 time in total.)
    I am going to second theguymadmax. You tried to run jellyfin by literally just typing "jellyfin" when the service was already running in some state, possibly not fully setup.

    It is literally two commands to install Jellyfin on Ubuntu.

    Code:
    curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash
    sudo ufw allow 8096

    Done.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode