• 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: I restarted my server from web (button), but failed to restart.

    Pages (2): 1 2 Next »

     
    • 0 Vote(s) - 0 Average

    SOLVED: I restarted my server from web (button), but failed to restart.

    jaiovi
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2024 Jul
    Reputation: 0
    Country:Mexico
    #1
    2024-07-10, 03:16 PM (This post was last modified: 2024-07-10, 05:20 PM by jaiovi. Edited 2 times in total.)
    Hello! 
    Jellyfin 1.9.7 - installed one liner
    Ubuntu 22.0 A1 compute OCI

    I restarted my server from web (button), but failed to restart. Trying to "sudo systemctl start jellyfin" again showed this status code

    Code:
    ubuntu@cine-kixta:/var/log/jellyfin$ sudo service jellyfin status
    × jellyfin.service - Jellyfin
        Loaded: loaded (/etc/systemd/system/jellyfin.service; enabled; vendor preset: enabled)
        Drop-In: /etc/systemd/system/jellyfin.service.d
                └─jellyfin.service.conf
        Active: failed (Result: exit-code) since Wed 2024-07-10 14:31:56 UTC; 11min ago
        Process: 1727 ExecStart=/opt/jellyfin/jellyfin.sh (code=exited, status=203/EXEC)
      Main PID: 1727 (code=exited, status=203/EXEC)
            CPU: 764us

    Jul 10 14:31:56 cine-kixta systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 5.
    Jul 10 14:31:56 cine-kixta systemd[1]: Stopped Jellyfin.
    Jul 10 14:31:56 cine-kixta systemd[1]: jellyfin.service: Start request repeated too quickly.
    Jul 10 14:31:56 cine-kixta systemd[1]: jellyfin.service: Failed with result 'exit-code'.
    Jul 10 14:31:56 cine-kixta systemd[1]: Failed to start Jellyfin.

    I noticed that in /var/logs/jellyfin this status

    Code:
    [2024-07-10 13:19:47.452 +00:00] [INF] Remote IP filter is "Allowlist"
    [2024-07-10 13:19:47.453 +00:00] [INF] Filtered subnets: []
    [2024-07-10 13:19:47.575 +00:00] [FTL] Error while starting server
    Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 8: 'attempt to write a readonly database'.
      at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
      at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
      at Emby.Server.Implementations.Data.SqliteExtensions.Execute(SqliteConnection sqliteConnection, String commandText)
      at Emby.Server.Implementations.Data.ManagedConnection.Execute(String commandText)
      at Emby.Server.Implementations.Data.BaseSqliteRepository.Initialize()
      at Emby.Server.Implementations.Data.SqliteItemRepository.Initialize()
      at Emby.Server.Implementations.ApplicationHost.InitializeServices()
      at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig)
    [2024-07-10 13:19:47.583 +00:00] [INF] Running query planner optimizations in the database... This might take a while
    [2024-07-10 13:19:47.585 +00:00] [INF] Disposing "CoreAppHost"
    [2024-07-10 13:19:47.586 +00:00] [INF] Disposing "PluginManager"

    I made chown to ubuntu and jellyfin, none of them worked

    Code:
    sudo chown -R jellyfin:jellyfin /var/lib/jellyfin

    sudo chmod -R u+rw /var/lib/jellyfin

    Even restarting, the log didnt regenerate (where's saved then?)

    Also I noticed that /opt/jellyfin/jellyfin.sh didn't existed, so I created this file:
    Code:
    #!/bin/bash

    /usr/bin/jellyfin

    And now we have 1 exit code:
    Code:
    × jellyfin.service - Jellyfin
        Loaded: loaded (/etc/systemd/system/jellyfin.service; enabled; vendor preset: enabled)
        Drop-In: /etc/systemd/system/jellyfin.service.d
                └─jellyfin.service.conf
        Active: failed (Result: exit-code) since Wed 2024-07-10 14:59:26 UTC; 2s ago
        Process: 2374 ExecStart=/opt/jellyfin/jellyfin.sh (code=exited, status=1/FAILURE)
      Main PID: 2374 (code=exited, status=1/FAILURE)
            CPU: 327ms

    Jul 10 14:59:26 cine-kixta systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 5.
    Jul 10 14:59:26 cine-kixta systemd[1]: Stopped Jellyfin.
    Jul 10 14:59:26 cine-kixta systemd[1]: jellyfin.service: Start request repeated too quickly.
    Jul 10 14:59:26 cine-kixta systemd[1]: jellyfin.service: Failed with result 'exit-code'.
    Jul 10 14:59:26 cine-kixta systemd[1]: Failed to start Jellyfin.


    sudo journalctl -u jellyfin gets:
    Code:
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2578]: [15:15:53] [INF] [1] Main: Log directory path: /home/ubuntu/.local/share/jellyfin/log
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2578]: [15:15:53] [INF] [1] Main: Config directory path: /home/ubuntu/.config/jellyfin
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2578]: [15:15:53] [INF] [1] Main: Cache path: /home/ubuntu/.cache/jellyfin
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2578]: [15:15:53] [INF] [1] Main: Web resources path: /usr/lib/jellyfin/bin/jellyfin-web
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2578]: [15:15:53] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2578]: [15:15:53] [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/jellyf>
    Jul 10 15:15:53 cine-kixta systemd[1]: [b]jellyfin.service: Main process exited, code=exited, status=1/FAILURE[/b]
    Jul 10 15:15:53 cine-kixta systemd[1]: [b]jellyfin.service: Failed with result 'exit-code'.[/b]
    Jul 10 15:15:53 cine-kixta systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 4.
    Jul 10 15:15:53 cine-kixta systemd[1]: Stopped Jellyfin.
    Jul 10 15:15:53 cine-kixta systemd[1]: Started Jellyfin.
    Jul 10 15:15:53 cine-kixta systemd[1]: Started Jellyfin.
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: Jellyfin version: 10.9.7
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /home/ubuntu/.local/share/jellyfin/log]"]
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll"]
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: Operating system: Ubuntu 22.04.4 LTS
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: Architecture: Arm64
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: 64-Bit Process: True
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: User Interactive: True
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: Processor count: 2
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: Program data path: /home/ubuntu/.local/share/jellyfin
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: Log directory path: /home/ubuntu/.local/share/jellyfin/log
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: Config directory path: /home/ubuntu/.config/jellyfin
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: Cache path: /home/ubuntu/.cache/jellyfin
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: Web resources path: /usr/lib/jellyfin/bin/jellyfin-web
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
    Jul 10 15:15:53 cine-kixta jellyfin.sh[2589]: [15:15:53] [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/jellyf>
    Jul 10 15:15:53 cine-kixta systemd[1]: jellyfin.service: Main process exited, code=exited, status=1/FAILURE
    Jul 10 15:15:53 cine-kixta systemd[1]: jellyfin.service: Failed with result 'exit-code'.
    Jul 10 15:15:54 cine-kixta systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 5.
    Jul 10 15:15:54 cine-kixta systemd[1]: Stopped Jellyfin.
    Jul 10 15:15:54 cine-kixta systemd[1]: jellyfin.service: Start request repeated too quickly.
    Jul 10 15:15:54 cine-kixta systemd[1]: jellyfin.service: Failed with result 'exit-code'.
    Jul 10 15:15:54 cine-kixta systemd[1]: Failed to start Jellyfin.

    Looking forward to the answer
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-07-10, 04:01 PM
    Since you are running Jellyfin directly on Ubuntu, /opt/jellyfin is not used. Just delete that directory and the script you created. And you should not be starting jellyfin simply by typing "jellyfin", which is what appears to be happening.

    You need to be using systemctl to manage jellyfin.

    Code:
    sudo systemctl restart jellyfin

    Stop, start, and status are also valid commands.

    As for the "restart" button in the web, I also noticed this issue and there appears to be an open issue already.

    https://github.com/jellyfin/jellyfin/issues/12161
    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]
    jaiovi
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2024 Jul
    Reputation: 0
    Country:Mexico
    #3
    2024-07-10, 04:15 PM
    (2024-07-10, 04:01 PM)TheDreadPirate Wrote: Since you are running Jellyfin directly on Ubuntu, /opt/jellyfin is not used.  Just delete that directory and the script you created.  And you should not be starting jellyfin simply by typing "jellyfin", which is what appears to be happening.

    You need to be using systemctl to manage jellyfin.

    Code:
    sudo systemctl restart jellyfin

    Stop, start, and status are also valid commands.

    As for the "restart" button in the web, I also noticed this issue and there appears to be an open issue already.

    https://github.com/jellyfin/jellyfin/issues/12161

    Thank you. But even then, by default /etc/systemd/system/jellyfin.service appeared like this.
    Code:
      GNU nano 6.2                                                                                            /etc/systemd/system/jellyfin.service                                                                                                     
    [Unit]
    Description=Jellyfin
    After=network.target

    [Service]
    Type=simple
    User=ubuntu
    Restart=always
    ExecStart=/opt/jellyfin/jellyfin.sh

    [Install]
    WantedBy=multi-user.target

    ExecStart where should point at?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-07-10, 04:27 PM (This post was last modified: 2024-07-10, 04:28 PM by TheDreadPirate. Edited 1 time in total.)
    (2024-07-10, 04:15 PM)jaiovi Wrote: Thank you. But even then, by default /etc/systemd/system/jellyfin.service appeared like this.
    Code:
      GNU nano 6.2                                                                                            /etc/systemd/system/jellyfin.service                                                                                                     
    [Unit]
    Description=Jellyfin
    After=network.target

    [Service]
    Type=simple
    User=ubuntu
    Restart=always
    ExecStart=/opt/jellyfin/jellyfin.sh

    [Install]
    WantedBy=multi-user.target

    ExecStart where should point at?

    That file should not exist in a "one-liner" install.  A package/one-liner install will create this file.

    /etc/systemd/system/multi-user.target.wants/jellyfin.service

    Which looks like this.

    Code:
    [Unit]
    Description = Jellyfin Media Server
    After = network-online.target

    [Service]
    Type = simple
    EnvironmentFile = /etc/default/jellyfin
    User = jellyfin
    Group = jellyfin
    WorkingDirectory = /var/lib/jellyfin
    ExecStart = /usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS
    Restart = on-failure
    TimeoutSec = 15
    SuccessExitStatus=0 143

    [Install]
    WantedBy = multi-user.target
    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]
    jaiovi
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2024 Jul
    Reputation: 0
    Country:Mexico
    #5
    2024-07-10, 05:14 PM
    (2024-07-10, 04:27 PM)TheDreadPirate Wrote:
    (2024-07-10, 04:15 PM)jaiovi Wrote: Thank you. But even then, by default /etc/systemd/system/jellyfin.service appeared like this.
    Code:
      GNU nano 6.2                                                                                            /etc/systemd/system/jellyfin.service                                                                                                     
    [Unit]
    Description=Jellyfin
    After=network.target

    [Service]
    Type=simple
    User=ubuntu
    Restart=always
    ExecStart=/opt/jellyfin/jellyfin.sh

    [Install]
    WantedBy=multi-user.target

    ExecStart where should point at?

    That file should not exist in a "one-liner" install.  A package/one-liner install will create this file.

    /etc/systemd/system/multi-user.target.wants/jellyfin.service

    Which looks like this.

    Code:
    [Unit]
    Description = Jellyfin Media Server
    After = network-online.target

    [Service]
    Type = simple
    EnvironmentFile = /etc/default/jellyfin
    User = jellyfin
    Group = jellyfin
    WorkingDirectory = /var/lib/jellyfin
    ExecStart = /usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS
    Restart = on-failure
    TimeoutSec = 15
    SuccessExitStatus=0 143

    [Install]
    WantedBy = multi-user.target

    FIXED! The possible issue is that web restart changes .service configuration.

    Writing the above configuration in /etc/systemd/system/jellyfin.service , then sudo systemctl daemon-reload

    Also enable user and writing in the following directories:
    Code:
    sudo chown -R jellyfin:jellyfin /var/lib/jellyfin
    sudo chmod -R u+rw /var/lib/jellyfin
    sudo chown -R jellyfin:jellyfin /etc/default/jellyfin
    sudo chmod -R u+rw /etc/default/jellyfin
    sudo chmod 644 /etc/jellyfin/migrations.xml

    sudo systemctl start jellyfin - It's up and running. Thanks!
    paulc
    Offline

    Member

    Posts: 82
    Threads: 7
    Joined: 2023 Jun
    Reputation: 5
    Country:United States
    #6
    2024-07-10, 05:48 PM
    (2024-07-10, 03:16 PM)jaiovi Wrote: Hello! 
    Jellyfin 1.9.7 - installed one liner
    Ubuntu 22.0 A1 compute OCI

    I restarted my server from web (button), but failed to restart. Trying to "sudo systemctl start jellyfin" again showed this status code

    ......

    Looking forward to the answer

    Do you have the Reports plugin activated? Disabling fixed the web button restart failure on my Windows 10 setup.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #7
    2024-07-10, 05:54 PM
    (2024-07-10, 05:48 PM)paulc Wrote:
    (2024-07-10, 03:16 PM)jaiovi Wrote: Hello! 
    Jellyfin 1.9.7 - installed one liner
    Ubuntu 22.0 A1 compute OCI

    I restarted my server from web (button), but failed to restart. Trying to "sudo systemctl start jellyfin" again showed this status code

    ......

    Looking forward to the answer

    Do you have the Reports plugin activated? Disabling fixed the web button restart failure on my Windows 10 setup.

    Interesting.  I will give this a try.
    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]
    1
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #8
    2024-07-10, 06:01 PM
    For me, the Playback Reporting plugin was the culprit. Which makes sense since it has its own database file.
    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]
    1
    paulc
    Offline

    Member

    Posts: 82
    Threads: 7
    Joined: 2023 Jun
    Reputation: 5
    Country:United States
    #9
    2024-07-10, 06:04 PM
    (2024-07-10, 05:54 PM)TheDreadPirate Wrote: Interesting.  I will give this a try.

    I remembered a problem a long time ago with the Restart button and Reports.  

    When this post showed up, I activated the Reports plugin to test and it failed with the same error message.
    Code:
    [2024-07-10 13:27:46.321 -04:00] [FTL] [11] Main: Error while starting server
    Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 8: 'attempt to write a readonly database'.
      at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
      at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
      at Emby.Server.Implementations.Data.SqliteExtensions.Execute(SqliteConnection sqliteConnection, String commandText)
      at Emby.Server.Implementations.Data.ManagedConnection.Execute(String commandText)
      at Emby.Server.Implementations.Data.BaseSqliteRepository.Initialize()
      at Emby.Server.Implementations.Data.SqliteItemRepository.Initialize()
      at Emby.Server.Implementations.ApplicationHost.InitializeServices()
      at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig)
    [2024-07-10 13:27:46.692 -04:00] [INF] [11] Main: Running query planner optimizations in the database... This might take a while
    [2024-07-10 13:27:46.694 -04:00] [INF] [11] Emby.Server.Implementations.ApplicationHost: Disposing "CoreAppHost"
    [2024-07-10 13:27:46.695 -04:00] [INF] [11] Emby.Server.Implementations.ApplicationHost: Disposing "PluginManager"
    I deactivated the Reports plugin and it restarted fine.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #10
    2024-07-10, 06:05 PM
    I opened an issue on the plugins github.

    https://github.com/jellyfin/jellyfin-plu.../issues/89
    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]
    Pages (2): 1 2 Next »

    « 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