[Issue]: Jellyfin not autostarting correctly under Devuan 4 Chimaera #4986

Closed
opened 2026-02-07 01:21:26 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @hankster112 on GitHub (Jul 23, 2023).

Please describe your bug

Jellyfin does not autostart like it should on Devuan Linux. It does not autostart on system boot, and when starting manually with jellyfin this occurs:

[15:04:03] [INF] [1] Main: Jellyfin version: 10.8.10
[15:04:03] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /home/username/.local/share/jellyfin/log]"]
[15:04:03] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll"]
[15:04:03] [INF] [1] Main: Operating system: Linux
[15:04:03] [INF] [1] Main: Architecture: X64
[15:04:03] [INF] [1] Main: 64-Bit Process: True
[15:04:03] [INF] [1] Main: User Interactive: True
[15:04:03] [INF] [1] Main: Processor count: 2
[15:04:03] [INF] [1] Main: Program data path: /home/username/.local/share/jellyfin
[15:04:03] [INF] [1] Main: Web resources path: /usr/lib/jellyfin/bin/jellyfin-web
[15:04:03] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
[15:04:03] [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.
[15:04:03] [INF] [2] Main: Received a SIGTERM signal, shutting down

Running sudo jellyfin doesn't work either.

[15:05:16] [INF] [1] Main: Jellyfin version: 10.8.10
[15:05:16] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /root/.local/share/jellyfin/log]"]
[15:05:16] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll"]
[15:05:16] [INF] [1] Main: Operating system: Linux
[15:05:16] [INF] [1] Main: Architecture: X64
[15:05:16] [INF] [1] Main: 64-Bit Process: True
[15:05:16] [INF] [1] Main: User Interactive: True
[15:05:16] [INF] [1] Main: Processor count: 2
[15:05:16] [INF] [1] Main: Program data path: /root/.local/share/jellyfin
[15:05:16] [INF] [1] Main: Web resources path: /usr/lib/jellyfin/bin/jellyfin-web
[15:05:16] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
[15:05:16] [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.
[15:05:16] [INF] [2] Main: Received a SIGTERM signal, shutting down

Running the (slightly modified) script below as posted by @hugueslarrive in #1131 does start it like it should, but then creates several database issues and I cannot login to it.

cd /var/lib/jellyfin & 
if test -f /etc/default/jellyfin; then
    . /etc/default/jellyfin
fi
. /lib/lsb/init-functions
PIDFILE="/run/jellyfin.pid sudo -u jellyfin /usr/bin/jellyfin -- $JELLYFIN_ARGS"
sudo -u jellyfin /usr/bin/jellyfin $JELLYFIN_ARGS

Results in either:

[15:08:52] [INF] [1] Jellyfin.Server.Migrations.MigrationRunner: Applying migration 'MigrateActivityLogDatabase'
[15:08:52] [ERR] [1] Jellyfin.Server.Migrations.MigrationRunner: Could not apply migration 'MigrateActivityLogDatabase'
CannotOpen: SQLitePCL.pretty.SQLiteException: unable to open database file
   at SQLitePCL.pretty.SQLiteException.Throw(Int32 rc, Int32 extended, String msg)
   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
   at SQLitePCL.pretty.SQLiteDatabaseConnectionBuilder.Build()
   at Jellyfin.Server.Migrations.Routines.MigrateActivityLogDb.Perform()
   at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOptions, Action`1 saveConfiguration, ILogger logger)
[15:08:52] [FTL] [1] Main: Error while starting server.
CannotOpen: SQLitePCL.pretty.SQLiteException: unable to open database file
   at SQLitePCL.pretty.SQLiteException.Throw(Int32 rc, Int32 extended, String msg)
   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
   at SQLitePCL.pretty.SQLiteDatabaseConnectionBuilder.Build()
   at Jellyfin.Server.Migrations.Routines.MigrateActivityLogDb.Perform()
   at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOptions, Action`1 saveConfiguration, ILogger logger)
   at Jellyfin.Server.Migrations.MigrationRunner.Run(CoreAppHost host, ILoggerFactory loggerFactory)
   at Jellyfin.Server.Program.StartApp(StartupOptions options)

or:

[15:48:17] [INF] [1] Main: Jellyfin version: 10.8.10
[15:48:17] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /var/lib/jellyfin/.local/share/jellyfin/log]"]                                                                                                                   
[15:48:17] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--webdir=/usr/share/jellyfin/web", "--restartpath=/usr/lib/jellyfin/restart.sh", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"]
[15:48:17] [INF] [1] Main: Operating system: Linux
[15:48:17] [INF] [1] Main: Architecture: X64
[15:48:17] [INF] [1] Main: 64-Bit Process: True
[15:48:17] [INF] [1] Main: User Interactive: True
[15:48:17] [INF] [1] Main: Processor count: 2
[15:48:17] [INF] [1] Main: Program data path: /var/lib/jellyfin/.local/share/jellyfin
[15:48:17] [INF] [1] Main: Web resources path: /usr/share/jellyfin/web
[15:48:17] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
[15:48:18] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /var/lib/jellyfin/.cache/jellyfin
[15:48:18] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[15:48:18] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN addresses : [10.0.0.0/8,172.16.0.0/12,192.168.0.0/16]
[15:48:18] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions : []
[15:48:18] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using LAN addresses: [10.0.0.0/8,172.16.0.0/12,192.168.0.0/16]
[15:48:18] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using bind addresses: []
[15:48:18] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using bind exclusions: []
[15:48:19] [FTL] [1] Main: Error while starting server.
Busy: SQLitePCL.pretty.SQLiteException: database is locked
   at SQLitePCL.pretty.SQLiteException.Throw(Int32 rc, Int32 extended, String msg)
   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3_stmt stmt, Int32 rc)
   at SQLitePCL.pretty.StatementImpl.MoveNext()
   at SQLitePCL.pretty.DatabaseConnection.Execute(IDatabaseConnection This, String sql)
   at Emby.Server.Implementations.Data.BaseSqliteRepository.GetConnection(Boolean readOnly)
   at Emby.Server.Implementations.Data.SqliteItemRepository.Initialize(SqliteUserDataRepository userDataRepo, IUserManager userManager)
   at Emby.Server.Implementations.ApplicationHost.InitializeServices()
   at Jellyfin.Server.Program.StartApp(StartupOptions options)
[15:48:19] [INF] [1] Main: Running query planner optimizations in the database... This might take a while
[15:48:19] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing CoreAppHost
[15:48:19] [INF] [2] Main: Received a SIGTERM signal, shutting down

Modifying /etc/init.d/jellyfin like @hugueslarrive suggested also isn't working. Adding those commands in a script and setting it to run in Jellyfin's crontab at startup also isn't working.

There are several instances where it tries to put all the jellyfin data into the home folder instead of at /var/lib/jellyfin like it should. However I have been unable to reproduce this consistently. I believe Jellyfin is not being passed its env variables at startup which is causing these issues. There shouldn't be hacks like this just to run Jellyfin on a system without systemd. I see https://github.com/jellyfin/jellyfin/pull/6991 was proposed but never merged, which may have fixed the issue.

Jellyfin Version

10.8.z

if other:

No response

Environment

- OS: Devuan 4 Chimaera (fork of Debian 11 Bullseye without systemd)
- Linux Kernel: 5.10.0-23-amd64 
- Virtualization: None
- Clients: Browser, Jellyfin Media Player, Android (Google Play)
- Browser: Ungoogled Chromium 113.0.5672.127, Jellyfin Media Player
- FFmpeg Version: N/A
- Playback Method: N/A
- Hardware Acceleration: N/A
- GPU Model: MSI RX 550 2GB
- Plugins: N/A
- Reverse Proxy: No
- Base URL: None
- Networking: Host
- Storage: Local

Jellyfin logs

No response

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Originally created by @hankster112 on GitHub (Jul 23, 2023). ### Please describe your bug Jellyfin does not autostart like it should on Devuan Linux. It does not autostart on system boot, and when starting manually with `jellyfin` this occurs: ``` [15:04:03] [INF] [1] Main: Jellyfin version: 10.8.10 [15:04:03] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /home/username/.local/share/jellyfin/log]"] [15:04:03] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll"] [15:04:03] [INF] [1] Main: Operating system: Linux [15:04:03] [INF] [1] Main: Architecture: X64 [15:04:03] [INF] [1] Main: 64-Bit Process: True [15:04:03] [INF] [1] Main: User Interactive: True [15:04:03] [INF] [1] Main: Processor count: 2 [15:04:03] [INF] [1] Main: Program data path: /home/username/.local/share/jellyfin [15:04:03] [INF] [1] Main: Web resources path: /usr/lib/jellyfin/bin/jellyfin-web [15:04:03] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/ [15:04:03] [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. [15:04:03] [INF] [2] Main: Received a SIGTERM signal, shutting down ``` Running `sudo jellyfin` doesn't work either. ``` [15:05:16] [INF] [1] Main: Jellyfin version: 10.8.10 [15:05:16] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /root/.local/share/jellyfin/log]"] [15:05:16] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll"] [15:05:16] [INF] [1] Main: Operating system: Linux [15:05:16] [INF] [1] Main: Architecture: X64 [15:05:16] [INF] [1] Main: 64-Bit Process: True [15:05:16] [INF] [1] Main: User Interactive: True [15:05:16] [INF] [1] Main: Processor count: 2 [15:05:16] [INF] [1] Main: Program data path: /root/.local/share/jellyfin [15:05:16] [INF] [1] Main: Web resources path: /usr/lib/jellyfin/bin/jellyfin-web [15:05:16] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/ [15:05:16] [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. [15:05:16] [INF] [2] Main: Received a SIGTERM signal, shutting down ``` Running the (slightly modified) script below as posted by @hugueslarrive in #1131 does start it like it should, but then creates several database issues and I cannot login to it. ``` cd /var/lib/jellyfin & if test -f /etc/default/jellyfin; then . /etc/default/jellyfin fi . /lib/lsb/init-functions PIDFILE="/run/jellyfin.pid sudo -u jellyfin /usr/bin/jellyfin -- $JELLYFIN_ARGS" sudo -u jellyfin /usr/bin/jellyfin $JELLYFIN_ARGS ``` Results in either: ``` [15:08:52] [INF] [1] Jellyfin.Server.Migrations.MigrationRunner: Applying migration 'MigrateActivityLogDatabase' [15:08:52] [ERR] [1] Jellyfin.Server.Migrations.MigrationRunner: Could not apply migration 'MigrateActivityLogDatabase' CannotOpen: SQLitePCL.pretty.SQLiteException: unable to open database file at SQLitePCL.pretty.SQLiteException.Throw(Int32 rc, Int32 extended, String msg) at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc) at SQLitePCL.pretty.SQLiteDatabaseConnectionBuilder.Build() at Jellyfin.Server.Migrations.Routines.MigrateActivityLogDb.Perform() at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOptions, Action`1 saveConfiguration, ILogger logger) [15:08:52] [FTL] [1] Main: Error while starting server. CannotOpen: SQLitePCL.pretty.SQLiteException: unable to open database file at SQLitePCL.pretty.SQLiteException.Throw(Int32 rc, Int32 extended, String msg) at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc) at SQLitePCL.pretty.SQLiteDatabaseConnectionBuilder.Build() at Jellyfin.Server.Migrations.Routines.MigrateActivityLogDb.Perform() at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOptions, Action`1 saveConfiguration, ILogger logger) at Jellyfin.Server.Migrations.MigrationRunner.Run(CoreAppHost host, ILoggerFactory loggerFactory) at Jellyfin.Server.Program.StartApp(StartupOptions options) ``` or: ``` [15:48:17] [INF] [1] Main: Jellyfin version: 10.8.10 [15:48:17] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /var/lib/jellyfin/.local/share/jellyfin/log]"] [15:48:17] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--webdir=/usr/share/jellyfin/web", "--restartpath=/usr/lib/jellyfin/restart.sh", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"] [15:48:17] [INF] [1] Main: Operating system: Linux [15:48:17] [INF] [1] Main: Architecture: X64 [15:48:17] [INF] [1] Main: 64-Bit Process: True [15:48:17] [INF] [1] Main: User Interactive: True [15:48:17] [INF] [1] Main: Processor count: 2 [15:48:17] [INF] [1] Main: Program data path: /var/lib/jellyfin/.local/share/jellyfin [15:48:17] [INF] [1] Main: Web resources path: /usr/share/jellyfin/web [15:48:17] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/ [15:48:18] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /var/lib/jellyfin/.cache/jellyfin [15:48:18] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies [15:48:18] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN addresses : [10.0.0.0/8,172.16.0.0/12,192.168.0.0/16] [15:48:18] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions : [] [15:48:18] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using LAN addresses: [10.0.0.0/8,172.16.0.0/12,192.168.0.0/16] [15:48:18] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using bind addresses: [] [15:48:18] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using bind exclusions: [] [15:48:19] [FTL] [1] Main: Error while starting server. Busy: SQLitePCL.pretty.SQLiteException: database is locked at SQLitePCL.pretty.SQLiteException.Throw(Int32 rc, Int32 extended, String msg) at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc) at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3_stmt stmt, Int32 rc) at SQLitePCL.pretty.StatementImpl.MoveNext() at SQLitePCL.pretty.DatabaseConnection.Execute(IDatabaseConnection This, String sql) at Emby.Server.Implementations.Data.BaseSqliteRepository.GetConnection(Boolean readOnly) at Emby.Server.Implementations.Data.SqliteItemRepository.Initialize(SqliteUserDataRepository userDataRepo, IUserManager userManager) at Emby.Server.Implementations.ApplicationHost.InitializeServices() at Jellyfin.Server.Program.StartApp(StartupOptions options) [15:48:19] [INF] [1] Main: Running query planner optimizations in the database... This might take a while [15:48:19] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing CoreAppHost [15:48:19] [INF] [2] Main: Received a SIGTERM signal, shutting down ``` Modifying /etc/init.d/jellyfin like @hugueslarrive suggested also isn't working. Adding those commands in a script and setting it to run in Jellyfin's crontab at startup also isn't working. There are several instances where it tries to put all the jellyfin data into the home folder instead of at `/var/lib/jellyfin` like it should. However I have been unable to reproduce this consistently. I believe Jellyfin is not being passed its env variables at startup which is causing these issues. There shouldn't be hacks like this just to run Jellyfin on a system without systemd. I see https://github.com/jellyfin/jellyfin/pull/6991 was proposed but never merged, which may have fixed the issue. ### Jellyfin Version 10.8.z ### if other: _No response_ ### Environment ```markdown - OS: Devuan 4 Chimaera (fork of Debian 11 Bullseye without systemd) - Linux Kernel: 5.10.0-23-amd64 - Virtualization: None - Clients: Browser, Jellyfin Media Player, Android (Google Play) - Browser: Ungoogled Chromium 113.0.5672.127, Jellyfin Media Player - FFmpeg Version: N/A - Playback Method: N/A - Hardware Acceleration: N/A - GPU Model: MSI RX 550 2GB - Plugins: N/A - Reverse Proxy: No - Base URL: None - Networking: Host - Storage: Local ``` ### Jellyfin logs _No response_ ### FFmpeg logs _No response_ ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
OVERLORD added the bug label 2026-02-07 01:21:26 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#4986