jellyfin / jellyfin-packaging

Jellyfin Packaging and Build Workflows
GNU General Public License v3.0
16 stars 16 forks source link

Debian 12 (Debuntu) automatic installer doesn't correctly install jellyfin. #21

Closed ThaBluNate closed 4 months ago

ThaBluNate commented 4 months ago

In Debian 12, if you use the automatic installer from jellyfin docs, curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash, jellyfin won't install correctly

Generally, if you install like normal, you are unable to start it again (even with the same command line args as the service)

Video: https://youtu.be/LTMU_kj-dmQ

Non-working solutions: ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web (Gets you into the web GUI, but cant render videos)

joshuaboniface commented 4 months ago

You are not starting the service correctly.

When installed via the Debian packages, Jellyfin is installed as a systemd service. Just running jellyfin doesn't start it with the proper environment and configuration to work. You will need to use sudo systemctl start jellyfin (or sudo service jellyfin start) to start it back up after a shutdown in the WebUI.

joshuaboniface commented 4 months ago

If you do want to though, you can run it from the CLI with /usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg ;-) It's that first argument that's needed since the "Debianized" location of the Web files is different from the place Jellyfin expects by default. And the ffmpeg argument is needed to specify which ffmpeg binary to use.

ThaBluNate commented 4 months ago

If you do want to though, you can run it from the CLI with /usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg ;-) It's that first argument that's needed since the "Debianized" location of the Web files is different from the place Jellyfin expects by default.

I actually did try that just after recording the video - didnt work! Idk why, but it didnt like it :(

joshuaboniface commented 4 months ago

You'd need to do it as the jellyfin user or it wouldn't have write access to the data files, so more like sudo -u jellyfin /usr/bin/jellyfin [...].

ThaBluNate commented 4 months ago

Used systemctl and it's giving the same result as /usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg :( It shows the server list and I cant """connect""" to the server from localhost (???)

joshuaboniface commented 4 months ago

What is the output of sudo systemctl status jellyfin?

ThaBluNate commented 4 months ago
blu@bluMediaServer:~$ sudo systemctl start jellyfin
[sudo] password for blu:
blu@bluMediaServer:~$ █

My trackpad also no longer works

joshuaboniface commented 4 months ago

That indicates the service was issued a start, but to check the status you use sudo systemctl status jellyfin.

ThaBluNate commented 4 months ago

Says it's active, but i need to restart debian anyways so give me a second

joshuaboniface commented 4 months ago

I asked for the full output. Please paste the full output.

ThaBluNate commented 4 months ago

I told ya i had to restart debian - and then log onto github

blu@bluMediaServer:~$ sudo systemctl start jellyfin
[sudo] password for blu: 
blu@bluMediaServer:~$ sudo systemctl status jellyfin
● jellyfin.service - Jellyfin Media Server
     Loaded: loaded (/lib/systemd/system/jellyfin.service; enabled; preset: ena>
    Drop-In: /etc/systemd/system/jellyfin.service.d
             └─jellyfin.service.conf
     Active: active (running) since Tue 2024-05-14 16:05:50 EDT; 1min 31s ago
   Main PID: 595 (jellyfin)
      Tasks: 17 (limit: 3327)
     Memory: 286.6M
        CPU: 22.598s
     CGroup: /system.slice/jellyfin.service
             └─595 /usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --ffmpeg=>

May 14 16:06:27 bluMediaServer jellyfin[595]: [16:06:27] [INF] Clean up collect>
May 14 16:06:28 bluMediaServer jellyfin[595]: [16:06:28] [INF] Available decode>
May 14 16:06:28 bluMediaServer jellyfin[595]: [16:06:28] [INF] Available encode>
May 14 16:06:28 bluMediaServer jellyfin[595]: [16:06:28] [INF] Available filter>
May 14 16:06:28 bluMediaServer jellyfin[595]: [16:06:28] [INF] Available hwacce>
May 14 16:06:30 bluMediaServer jellyfin[595]: [16:06:30] [INF] FFmpeg: /usr/lib>
May 14 16:06:30 bluMediaServer jellyfin[595]: [16:06:30] [INF] ServerId: d5727d>
May 14 16:06:30 bluMediaServer jellyfin[595]: [16:06:30] [INF] Core startup com>
May 14 16:06:30 bluMediaServer jellyfin[595]: [16:06:30] [INF] Startup complete>
May 14 16:06:33 bluMediaServer jellyfin[595]: [16:06:33] [INF] Update Plugins C>
lines 1-22/22 (END)...skipping...
● jellyfin.service - Jellyfin Media Server
     Loaded: loaded (/lib/systemd/system/jellyfin.service; enabled; preset: enabled)
    Drop-In: /etc/systemd/system/jellyfin.service.d
             └─jellyfin.service.conf
     Active: active (running) since Tue 2024-05-14 16:05:50 EDT; 1min 31s ago
   Main PID: 595 (jellyfin)
      Tasks: 17 (limit: 3327)
     Memory: 286.6M
        CPU: 22.598s
     CGroup: /system.slice/jellyfin.service
             └─595 /usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg

May 14 16:06:27 bluMediaServer jellyfin[595]: [16:06:27] [INF] Clean up collections and playlists Completed after 0 minute(s) and 0 seconds
May 14 16:06:28 bluMediaServer jellyfin[595]: [16:06:28] [INF] Available decoders: ["libdav1d", "av1", "av1_cuvid", "av1_qsv", "h264", "h26>
May 14 16:06:28 bluMediaServer jellyfin[595]: [16:06:28] [INF] Available encoders: ["libsvtav1", "av1_nvenc", "av1_qsv", "av1_amf", "av1_va>
May 14 16:06:28 bluMediaServer jellyfin[595]: [16:06:28] [INF] Available filters: ["deinterlace_qsv", "deinterlace_vaapi", "hwupload_cuda",>
May 14 16:06:28 bluMediaServer jellyfin[595]: [16:06:28] [INF] Available hwaccel types: ["cuda", "vaapi", "qsv", "drm", "opencl", "vulkan"]
May 14 16:06:30 bluMediaServer jellyfin[595]: [16:06:30] [INF] FFmpeg: /usr/lib/jellyfin-ffmpeg/ffmpeg
May 14 16:06:30 bluMediaServer jellyfin[595]: [16:06:30] [INF] ServerId: d5727d2fadef40349023d665d9e8a101
May 14 16:06:30 bluMediaServer jellyfin[595]: [16:06:30] [INF] Core startup complete
May 14 16:06:30 bluMediaServer jellyfin[595]: [16:06:30] [INF] Startup complete 0:00:34.8147887
May 14 16:06:33 bluMediaServer jellyfin[595]: [16:06:33] [INF] Update Plugins Completed after 0 minute(s) and 5 seconds

Still just showing me select server screen

joshuaboniface commented 4 months ago

I just tested on two Debian 12 systems with Jellyfin 10.9.1 and cannot reproduce anything like this while using systemctl to manage the service. Note that Jellyfin may take a little time to start especially if you have multiple plugins.

  1. Issued Shutdown in Jellyfin dashboard.

  2. Status of jellyfin.service:

$ systemctl status jellyfin                                                                                                                                                                                         
○ jellyfin.service - Jellyfin Media Server                                                                                                                                                                                                     
     Loaded: loaded (/lib/systemd/system/jellyfin.service; enabled; preset: enabled)                                                                                                                                                           
    Drop-In: /etc/systemd/system/jellyfin.service.d                                                                                                                                                                                            
             └─jellyfin.service.conf                                                                                   
     Active: inactive (dead) since Tue 2024-05-14 16:09:53 EDT; 1s ago                                                 
   Duration: 1min 8.523s                                                                                               
    Process: 608 ExecStart=/usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS (code=exited, status=0/SUCCESS)
   Main PID: 608 (code=exited, status=0/SUCCESS)                                                                                                                                                                                               
        CPU: 19.329s                                                                                                                                                                                                                           

May 14 16:09:53 jf2.p.bonilan.net jellyfin[608]: [16:09:53] [INF] Sending shutdown notifications
May 14 16:09:53 jf2.p.bonilan.net jellyfin[608]: [16:09:53] [INF] WS 10.40.0.102 closed
May 14 16:09:53 jf2.p.bonilan.net jellyfin[608]: [16:09:53] [INF] Stopping NAT discovery
May 14 16:09:53 jf2.p.bonilan.net jellyfin[608]: [16:09:53] [INF] Running query planner optimizations in the database... This might take a while
May 14 16:09:53 jf2.p.bonilan.net jellyfin[608]: [16:09:53] [INF] Disposing CoreAppHost
May 14 16:09:53 jf2.p.bonilan.net jellyfin[608]: [16:09:53] [INF] Disposing MusicBrainzArtistProvider
May 14 16:09:53 jf2.p.bonilan.net jellyfin[608]: [16:09:53] [INF] Disposing MusicBrainzAlbumProvider
May 14 16:09:53 jf2.p.bonilan.net jellyfin[608]: [16:09:53] [INF] Disposing PluginManager
May 14 16:09:53 jf2.p.bonilan.net systemd[1]: jellyfin.service: Deactivated successfully.
May 14 16:09:53 jf2.p.bonilan.net systemd[1]: jellyfin.service: Consumed 19.329s CPU time.
  1. Issued sudo systemctl start jellyfin.

  2. Status of jellyfin.service:

 systemctl status jellyfin
● jellyfin.service - Jellyfin Media Server
     Loaded: loaded (/lib/systemd/system/jellyfin.service; enabled; preset: enabled)
    Drop-In: /etc/systemd/system/jellyfin.service.d
             └─jellyfin.service.conf
     Active: active (running) since Tue 2024-05-14 16:10:00 EDT; 8s ago
   Main PID: 1334 (jellyfin)
      Tasks: 24 (limit: 9477)
     Memory: 179.5M
        CPU: 9.151s
     CGroup: /system.slice/jellyfin.service
             └─1334 /usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg

May 14 16:10:04 jf2.p.bonilan.net jellyfin[1334]: [16:10:04] [INF] Available decoders: ["libdav1d", "av1", "av1_cuvid", "av1_qsv", "h264", "h264_qsv", "h264_cuvid", "hevc", "hevc_qsv", "hevc_cuvid", "mpeg2video", "mpeg2_qsv", "mpeg2_cuvid>
May 14 16:10:04 jf2.p.bonilan.net jellyfin[1334]: [16:10:04] [INF] Available encoders: ["libsvtav1", "av1_nvenc", "av1_qsv", "av1_amf", "av1_vaapi", "libx264", "h264_amf", "h264_nvenc", "h264_qsv", "h264_v4l2m2m", "h264_vaapi", "libx265",>
May 14 16:10:04 jf2.p.bonilan.net jellyfin[1334]: [16:10:04] [INF] Available filters: ["deinterlace_qsv", "deinterlace_vaapi", "hwupload_cuda", "hwupload_vaapi", "libplacebo", "overlay_opencl", "overlay_qsv", "overlay_vaapi", "overlay_vul>
May 14 16:10:04 jf2.p.bonilan.net jellyfin[1334]: [16:10:04] [INF] Available hwaccel types: ["cuda", "vaapi", "qsv", "drm", "opencl", "vulkan"]
May 14 16:10:05 jf2.p.bonilan.net jellyfin[1334]: [16:10:05] [INF] FFmpeg: /usr/lib/jellyfin-ffmpeg/ffmpeg
May 14 16:10:05 jf2.p.bonilan.net jellyfin[1334]: [16:10:05] [INF] ServerId: 10db1aff48944c56b8a1505ddb05eb3b
May 14 16:10:05 jf2.p.bonilan.net jellyfin[1334]: [16:10:05] [INF] Core startup complete
May 14 16:10:05 jf2.p.bonilan.net jellyfin[1334]: [16:10:05] [INF] Startup complete 0:00:04.3370611
May 14 16:10:07 jf2.p.bonilan.net jellyfin[1334]: [16:10:07] [INF] Clean up collections and playlists Completed after 0 minute(s) and 0 seconds
May 14 16:10:08 jf2.p.bonilan.net jellyfin[1334]: [16:10:08] [INF] Update Plugins Completed after 0 minute(s) and 1 seconds
  1. The WebUI is perfectly reachable.

It's possible the symlinks and attempts to fix the manual process start broke something. I would suggest completely purging Jellyfin (sudo apt purge jellyfin jellyfin-web jellyfin-server) and reinstalling to get a clean slate. Note that this will delete Jellyfin data, so back up first if this is not already a fresh/unconfigured instance.

joshuaboniface commented 4 months ago

Either that or you have a bad value cached in your browser and should clear cache first and then attempt to reconnect. But your Jellyfin server is definitely running there.

ThaBluNate commented 4 months ago

I dont beleive there's that symlink anymore, I deleted it. Purged those packages, used sudo apt autoremove for good measure. Install logs -> https://pastebin.com/bB95PVBz I also cleared cache, but it didnt get fixed, only fixes when i delete the server and go back to the main page. (Same issue when used from another pc, so it's not a browser cache issue)

Anyways, deleted the server so it would let me use jellyfin, went back to the main page and went through the welcoming process, shut it down, and this time it worked (???) I'll update it i have related issues soon