Jellyfin Forum
SOLVED: Fails to Start - 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: SOLVED: Fails to Start (/t-solved-fails-to-start)



Fails to Start - MrXirtam - 2024-06-17

[*]Jellyfin Version: 10.9.6
Installed via: Debian Respository
Brief Description: Ran out of space on my hard drive due to an unrelated rysnc issue. Cleared the space, and now Jellyfin service fails to start back up.
Full explanation: I pulled up my Jellyfin on my desktop PC. It launched and I loaded into a media file. It played for a few minutes, then froze. I logged onto the server and realize the service was in a failed state. Closer examination, I realized the space on my root drive was completely full. Turns out an rsync error on my part filled it all up. I cleared up the space, and I now have at least 176 GB of free space. But upon trying to restart/start the jellyfin service, it starts, but then reverts to the failed state after 5-10 seconds. Checking the logs, I see this error listed after each restart:
Code:
Jun 16 19:11:02 zion jellyfin[1157531]: [19:11:02] [FTL] Unhandled Exception
Jun 16 19:11:02 zion jellyfin[1157531]: System.InvalidOperationException: There is an error in XML document (0, 0).
Jun 16 19:11:02 zion jellyfin[1157531]:  ---> System.Xml.XmlException: Root element is missing.
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Xml.XmlReader.MoveToContent()
Jun 16 19:11:02 zion jellyfin[1157531]:    at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMigrationOptions.Read4_MigrationOptions()
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Jun 16 19:11:02 zion jellyfin[1157531]:    --- End of inner exception stack trace ---
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
Jun 16 19:11:02 zion jellyfin[1157531]:    at Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromStream(Type type, Stream stream)
Jun 16 19:11:02 zion jellyfin[1157531]:    at Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromFile(Type type, String file)
Jun 16 19:11:02 zion jellyfin[1157531]:    at Jellyfin.Server.Migrations.MigrationRunner.RunPreStartup(ServerApplicationPaths appPaths, ILoggerFactory loggerFactory)
Jun 16 19:11:02 zion jellyfin[1157531]:    at Jellyfin.Server.Program.StartApp(StartupOptions options)
Jun 16 19:11:02 zion jellyfin[1157531]:    at Jellyfin.Server.Program.<Main>(String[] args)
Jun 16 19:11:02 zion jellyfin[1157531]: Unhandled exception. System.InvalidOperationException: There is an error in XML document (0, 0).
Jun 16 19:11:02 zion jellyfin[1157531]:  ---> System.Xml.XmlException: Root element is missing.
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Xml.XmlReader.MoveToContent()
Jun 16 19:11:02 zion jellyfin[1157531]:    at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMigrationOptions.Read4_MigrationOptions()
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Jun 16 19:11:02 zion jellyfin[1157531]:    --- End of inner exception stack trace ---
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
Jun 16 19:11:02 zion jellyfin[1157531]:    at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
Jun 16 19:11:02 zion jellyfin[1157531]:    at Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromStream(Type type, Stream stream)
Jun 16 19:11:02 zion jellyfin[1157531]:    at Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromFile(Type type, String file)
Jun 16 19:11:02 zion jellyfin[1157531]:    at Jellyfin.Server.Migrations.MigrationRunner.RunPreStartup(ServerApplicationPaths appPaths, ILoggerFactory loggerFactory)
Jun 16 19:11:02 zion jellyfin[1157531]:    at Jellyfin.Server.Program.StartApp(StartupOptions options)
Jun 16 19:11:02 zion jellyfin[1157531]:    at Jellyfin.Server.Program.<Main>(String[] args)
Jun 16 19:11:02 zion systemd[1]: jellyfin.service: Main process exited, code=killed, status=6/ABRT
Jun 16 19:11:02 zion systemd[1]: jellyfin.service: Failed with result 'signal'.
Jun 16 19:11:02 zion systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 5.
Jun 16 19:11:02 zion systemd[1]: Stopped Jellyfin Media Server.
Jun 16 19:11:02 zion systemd[1]: jellyfin.service: Start request repeated too quickly.
Jun 16 19:11:02 zion systemd[1]: jellyfin.service: Failed with result 'signal'.
Jun 16 19:11:02 zion systemd[1]: Failed to start Jellyfin Media Server.

I'm not sure what root element is missing or how it can be recreated. I'm thinking it has something to do with a Migrations XML file, but doing a find command for it returns nothing:
Code:
sudo find /var/lib/jellyfin -name "MigrationOptions.xml"
Any ideas on how I can fix this?


RE: Fails to Start - TheDreadPirate - 2024-06-17

migrations.xml is in /etc/jellyfin. Try removing it if it is null.


RE: Fails to Start - MrXirtam - 2024-06-17

Wow, easy fix, this did it. The migrations.xml was in there and it was 0 in size. I removed it, and the service starts and runs normally.

Thanks so much!