Jellyfin Forum
Can't start server - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Can't start server (/t-can-t-start-server--6340)



Can't start server - Roxxas - 2024-06-05

Hello, I just started having this problem of not being able to watch my movies because the webserver would not connect. It gives me a code 502 Bad Gateway (Open Resty)
I have seen another post saying it might be because of my low disk space but i've removed like 1tb of data and it still didn't work, I restarted twice and updated my ubuntu.

I am using Linuxserver.io Jellyfin latest and problem came with 10.9.4, don't know what to do. Also the 22.04 is wrong I just updated to 24.04.

I tried logging with local IP and port and did not work. everything setup behind NPM and it worked well before, all my other containers are working.

Thanks in advance for help.

Logs below :

Code:
[23:23:08] [INF] [1] Main: Jellyfin version: 10.9.4

[23:23:08] [INF] [1] Main: Environment Variables: ["[JELLYFIN_CACHE_DIR, /config/cache]", "[JELLYFIN_DATA_DIR, /config/data]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_CONFIG_DIR, /config]", "[JELLYFIN_WEB_DIR, /usr/share/jellyfin/web]"]

[23:23:08] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"]

[23:23:08] [INF] [1] Main: Operating system: Ubuntu 22.04.4 LTS

[23:23:08] [INF] [1] Main: Architecture: X64

[23:23:08] [INF] [1] Main: 64-Bit Process: True

[23:23:08] [INF] [1] Main: User Interactive: True

[23:23:08] [INF] [1] Main: Processor count: 20

[23:23:08] [INF] [1] Main: Program data path: /config/data

[23:23:08] [INF] [1] Main: Log directory path: /config/log

[23:23:08] [INF] [1] Main: Config directory path: /config

[23:23:08] [INF] [1] Main: Cache path: /config/cache

[23:23:08] [INF] [1] Main: Web resources path: /usr/share/jellyfin/web

[23:23:08] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/

[23:23:08] [FTL] [1] Main: Unhandled Exception

System.InvalidOperationException: There is an error in XML document (0, 0).

---> System.Xml.XmlException: Root element is missing.

  at System.Xml.XmlTextReaderImpl.Throw(Exception e)

  at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)

  at System.Xml.XmlTextReaderImpl.ParseDocumentContent()

  at System.Xml.XmlReader.MoveToContent()

  at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMigrationOptions.Read4_MigrationOptions()

  at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)

  at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  --- End of inner exception stack trace ---

  at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

  at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)

  at Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromStream(Type type, Stream stream)

  at Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromFile(Type type, String file)

  at Jellyfin.Server.Migrations.MigrationRunner.RunPreStartup(ServerApplicationPaths appPaths, ILoggerFactory loggerFactory)

  at Jellyfin.Server.Program.StartApp(StartupOptions options)

  at Jellyfin.Server.Program.<Main>(String[] args)

Unhandled exception. System.InvalidOperationException: There is an error in XML document (0, 0).

---> System.Xml.XmlException: Root element is missing.

  at System.Xml.XmlTextReaderImpl.Throw(Exception e)

  at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)

  at System.Xml.XmlTextReaderImpl.ParseDocumentContent()

  at System.Xml.XmlReader.MoveToContent()

  at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMigrationOptions.Read4_MigrationOptions()

  at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)

  at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  --- End of inner exception stack trace ---

  at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

  at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)

  at Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromStream(Type type, Stream stream)

  at Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromFile(Type type, String file)

  at Jellyfin.Server.Migrations.MigrationRunner.RunPreStartup(ServerApplicationPaths appPaths, ILoggerFactory loggerFactory)

  at Jellyfin.Server.Program.StartApp(StartupOptions options)

  at Jellyfin.Server.Program.<Main>(String[] args)



RE: Can't start server - TheDreadPirate - 2024-06-05

Is /etc/jellyfin/migrations.xml empty? If the file is empty, delete the file and restart the service.


RE: Can't start server - Roxxas - 2024-06-06

Hi, yes it was empty. I deleted it and updated to 10.9.5 doing so and it still don't work. Error code below :



[19:31:42] [INF] [1] Jellyfin.Server.Migrations.MigrationRunner: Applying migration 'MigrateActivityLogDatabase'

[19:31:42] [WRN] [1] Jellyfin.Server.Migrations.Routines.MigrateActivityLogDb: Migrating the activity database may take a while, do not stop Jellyfin.

[19:31:42] [ERR] [1] Jellyfin.Server.Migrations.MigrationRunner: Could not apply migration 'MigrateActivityLogDatabase'

Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: ActivityLog'.

at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)

at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext()

at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()

at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()

at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)

at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()

at Emby.Server.Implementations.Data.SqliteExtensions.Query(SqliteConnection sqliteConnection, String commandText)+MoveNext()

at Jellyfin.Server.Migrations.Routines.MigrateActivityLogDb.Perform()

at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOptions, Action1 saveConfiguration, ILogger logger)

[19:31:42] [FTL] [1] Main: Error while starting server

Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: ActivityLog'.

at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)

at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext()

at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()

at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()

at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)

at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()

at Emby.Server.Implementations.Data.SqliteExtensions.Query(SqliteConnection sqliteConnection, String commandText)+MoveNext()

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.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig)


RE: Can't start server - TheDreadPirate - 2024-06-06

I had a test Linuxserver docker setup sitting around offline. I upgraded it from 10.8.13 straight to 10.9.5 and everything started normally....

At any point recently did your system run out of disk space?


RE: Can't start server - Roxxas - 2024-06-06

https://forum.jellyfin.org/t-failed-to-start-jellyfin-service-jellyfin-media-server I noticed this, same problem. And yes I indeed ran out of space in my disks, I had like 30gbs left, I did some space 1.8tb free now and it's still not working. I made space before updating... also the migrations.xml file looks like this now :

https://pastebin.com/uJV6LYJA

I haven't setup anything such as automatic database backup, so if anything I'd have to do a rescan of all files.


RE: Can't start server - Roxxas - 2024-06-06

Will try this as it seems to be the same issue I have. https://github.com/jellyfin/jellyfin/issues/3667 Will document on how I fix.


RE: Can't start server - TheDreadPirate - 2024-06-06

I meant more like COMPLETELY running out of space. Zero bytes free. Which doesn't appear to be the case.

Can you turn on debug logging and then share the debug log?

https://jellyfin.org/docs/general/administration/troubleshooting/


RE: Can't start server - Roxxas - 2024-06-06

https://forum.jellyfin.org/t-solved-could-not-apply-migration-migrateactivitylogdatabase
This fixes.

But I just deleted my config files and done a resetup of my configuration, start from scratch. sometimes it good to do that. I still have all my movies/shows in a seperate folder.