Jellyfin Forum
SOLVED: Jellyfin destroys itself. - 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: Jellyfin destroys itself. (/t-solved-jellyfin-destroys-itself)



Jellyfin destroys itself. - RostigerSpieler - 2024-07-23

I am currently having problems with Jellyfin again. When the server self-destructed, I was using version 10.9.7.

The problem occurred when I was watching a movie. While watching a movie, the movie stopped in the middle and the server crashed.

Then I checked my PC where the server was running. The hard disk there was full. So I cleared the hard disk and now have over 40GB available again.

However, I can no longer start the server. When I try to start it, it always crashes immediately with the following message:


Code:
[2024-07-24 00:24:52.461 +02:00] [INF] [1] Main: Jellyfin version: "10.9.7"
[2024-07-24 00:24:52.482 +02:00] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, C:\Users\djdan\AppData\Local\Jellyfin\log]"]
[2024-07-24 00:24:52.486 +02:00] [INF] [1] Main: Arguments: ["C:\Program Files\Jellyfin\Server\jellyfin.dll", "--datadir", "C:\Users\djdan\AppData\Local\Jellyfin"]
[2024-07-24 00:24:52.488 +02:00] [INF] [1] Main: Operating system: "Microsoft Windows 10.0.26252"
[2024-07-24 00:24:52.489 +02:00] [INF] [1] Main: Architecture: X64
[2024-07-24 00:24:52.491 +02:00] [INF] [1] Main: 64-Bit Process: True
[2024-07-24 00:24:52.492 +02:00] [INF] [1] Main: User Interactive: True
[2024-07-24 00:24:52.493 +02:00] [INF] [1] Main: Processor count: 8
[2024-07-24 00:24:52.494 +02:00] [INF] [1] Main: Program data path: "C:\Users\djdan\AppData\Local\Jellyfin"
[2024-07-24 00:24:52.495 +02:00] [INF] [1] Main: Log directory path: "C:\Users\djdan\AppData\Local\Jellyfin\log"
[2024-07-24 00:24:52.496 +02:00] [INF] [1] Main: Config directory path: "C:\Users\djdan\AppData\Local\Jellyfin\config"
[2024-07-24 00:24:52.497 +02:00] [INF] [1] Main: Cache path: "C:\Users\djdan\AppData\Local\Jellyfin\cache"
[2024-07-24 00:24:52.498 +02:00] [INF] [1] Main: Web resources path: "C:\Program Files\Jellyfin\Server\jellyfin-web"
[2024-07-24 00:24:52.499 +02:00] [INF] [1] Main: Application directory: "C:\Program Files\Jellyfin\Server\"
[2024-07-24 00:24:52.544 +02:00] [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)
[2024-07-24 00:28:26.304 +02:00] [INF] [1] Main: Jellyfin version: "10.9.8"
[2024-07-24 00:28:26.327 +02:00] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, C:\Users\djdan\AppData\Local\Jellyfin\log]"]
[2024-07-24 00:28:26.331 +02:00] [INF] [1] Main: Arguments: ["C:\Program Files\Jellyfin\Server\jellyfin.dll", "--datadir", "C:\Users\djdan\AppData\Local\Jellyfin"]
[2024-07-24 00:28:26.334 +02:00] [INF] [1] Main: Operating system: "Microsoft Windows 10.0.26252"
[2024-07-24 00:28:26.335 +02:00] [INF] [1] Main: Architecture: X64
[2024-07-24 00:28:26.337 +02:00] [INF] [1] Main: 64-Bit Process: True
[2024-07-24 00:28:26.338 +02:00] [INF] [1] Main: User Interactive: True
[2024-07-24 00:28:26.340 +02:00] [INF] [1] Main: Processor count: 8
[2024-07-24 00:28:26.341 +02:00] [INF] [1] Main: Program data path: "C:\Users\djdan\AppData\Local\Jellyfin"
[2024-07-24 00:28:26.342 +02:00] [INF] [1] Main: Log directory path: "C:\Users\djdan\AppData\Local\Jellyfin\log"
[2024-07-24 00:28:26.343 +02:00] [INF] [1] Main: Config directory path: "C:\Users\djdan\AppData\Local\Jellyfin\config"
[2024-07-24 00:28:26.345 +02:00] [INF] [1] Main: Cache path: "C:\Users\djdan\AppData\Local\Jellyfin\cache"
[2024-07-24 00:28:26.346 +02:00] [INF] [1] Main: Web resources path: "C:\Program Files\Jellyfin\Server\jellyfin-web"
[2024-07-24 00:28:26.347 +02:00] [INF] [1] Main: Application directory: "C:\Program Files\Jellyfin\Server\"
[2024-07-24 00:28:27.161 +02:00] [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)

So I installed version 10.9.8 in the hope that this would solve the problem. Unfortunately without success.

What can I do now? Which files do I have to back up to do a complete (new) reinstallation?


Server: Windows 11 (AMD Server)
Server Version: 10.9.7 / 10.9.8


RE: Jellyfin destroys itself. - James.Ashwin - 2024-07-24

Stop both instances of the server and try spinning up one instance and connecting. It looks like you're running 10.9.7 alongside 10.9.8.


RE: Jellyfin destroys itself. - TheDreadPirate - 2024-07-24

There is a possibility that your database is borked. But the specific error is complaining that some of the config XMLs are malformed. Stop Jellyfin then go to C:\Users\djdan\AppData\Local\Jellyfin\config and delete all the XMLs in there. Then start Jellyfin. Jellyfin will restore them with defaults.

40GB is not a lot of space, btw. Transcodes are written to disk. If you have a 70GB 4K HDR video (a typical file size) the transcode will be AT LEAST that big. Probably bigger if it is being transcoded from HEVC to H264.

Once you get Jellyfin back up and running, you can change where transcodes are written to in the Dashboard > Playback. The option "Transcode path". You can write transcodes to a drive with more free space.


RE: Jellyfin destroys itself. - Efficient_Good_5784 - 2024-07-24

(2024-07-24, 02:36 AM)TheDreadPirate Wrote: 40GB is not a lot of space, btw.  Transcodes are written to disk.  If you have a 70GB 4K HDR video (a typical file size) the transcode will be AT LEAST that big.  Probably bigger if it is being transcoded from HEVC to H264.
More so if multiple people are transcoding at the same time.

Using your example, if 3 people are streaming different 4K HDR videos that each need to be transcoded, & each are around 70GB in size, you can expect the transcode folder to be filled with at least ~210GB.


RE: Jellyfin destroys itself. - RostigerSpieler - 2024-07-24

@TheDreadPirate

Then I might as well reinstall jellyfin. It's the same thing. I can live with the lost paths. However, I will have to create all access data again. Where are these saved?


Edit:
Problem solved.

I backed up the XMLs you mentioned from the config folder, and then deleted them from the config folder and then restarted the server. This caused it to recreate the files and start correctly.

Then I stopped the server again and just copied the system.xml from the backup folder back into the config folder and replaced the newly created one. And lo and behold, it still starts correctly again and all the basic settings are back Smiling-face

So your tip was worth its weight in gold. Thank you very much Smiling-face


But one more question.

Is it better to use the server without hardware acceleration or with?

When I activate hardware acceleration, the following fields are automatically activated: H264, VC1, HEVC 10Bit and VP9 10 Bit.

Do I need all these settings?

My movies and series are available in the formats MKV, m2ts, avi, mpeg and mp4.


RE: Jellyfin destroys itself. - TheDreadPirate - 2024-07-24

It depends on your hardware. Generally hardware acceleration is much preferred. You mentioned your CPU is an AMD CPU. Does it have an iGPU? Is there a dedicated GPU in the system?


RE: Jellyfin destroys itself. - RostigerSpieler - 2024-07-24

@TheDreadPirate

Yes. I have AMD 3400G APU in my Server-PC.


RE: Jellyfin destroys itself. - TheDreadPirate - 2024-07-24

You can use HWA, but don't expect miracles from it.

You'd have to use VAAPI. Check MPEG-2, VC-1, H264, HEVC (not 10-bit), and VP9 (not 10-bit).

Leave unchecked "Allow encoding in HEVC" and AV1.


RE: Jellyfin destroys itself. - RostigerSpieler - 2024-11-22

Thank you @TheDreadPirate That helps me. U can close here Smiling-face