Manteinance tasks not working - drakonis96 - 2025-01-12
Hello everyone! I’m having an issue with my Jellyfin installation on OpenMediaVault 7. I’m using Jellyfin version 10.10.3. The problem occurs when I try to activate any task in the scheduled maintenance section (the ones related to the media work without problems). Although the logs show that the tasks, such as downloading subtitles, are completed (always in 0 minutes and 0 seconds), they are not actually being executed.
The Jellyfin config is on the same shared folder as the media, and its owned by root and the group is users, with the appropriate permissions. However, the jellyfin user I created to run Jellyfin does not seem to have access, even though when checking the permissions, everything appears to be correct. I've also tried changing the owner to "jellyfin" user but still nothing works.
Quote:[2025-01-12 22:05:43.403 +01:00] [INF] [18] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Clean Activity Log" Completed after 0 minute(s) and 0 seconds
[2025-01-12 22:05:44.503 +01:00] [INF] [18] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Clean Cache Directory" Completed after 0 minute(s) and 0 seconds
[2025-01-12 22:05:45.064 +01:00] [INF] [18] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Clean Log Directory" Completed after 0 minute(s) and 0 seconds
[2025-01-12 22:05:46.098 +01:00] [INF] [34] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Clean Transcode Directory" Completed after 0 minute(s) and 0 seconds
[2025-01-12 22:05:46.724 +01:00] [INF] [31] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Clean up collections and playlists" Completed after 0 minute(s) and 0 seconds
[2025-01-12 22:05:47.564 +01:00] [INF] [34] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Migrate Trickplay Image Location" Completed after 0 minute(s) and 0 seconds
[2025-01-12 22:05:48.038 +01:00] [INF] [34] Emby.Server.Implementations.ScheduledTasks.Tasks.OptimizeDatabaseTask: Optimizing and vacuuming jellyfin.db...
[2025-01-12 22:05:48.066 +01:00] [INF] [34] Emby.Server.Implementations.ScheduledTasks.Tasks.OptimizeDatabaseTask: jellyfin.db optimized successfully!
[2025-01-12 22:05:48.066 +01:00] [INF] [34] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Optimize database" Completed after 0 minute(s) and 0 seconds
Any idea how I can solve this? I've been looking on many forums, an
Edit: it happens with both jellyfin images, the official one andd while I linuxserver.found similar issues, no solution was provided. Installation method is docker through yacht, providing PUID and PGID of the jellyfin user on omv (groups users, render and video).
RE: Manteinance tasks not working - TheDreadPirate - 2025-01-12
You need the OpenSubtitles plugin installed and configured for the download subtitles job to do anything.
Most of the other maintanence tasks take a minimal amount of time as long as they are run daily.
RE: Manteinance tasks not working - drakonis96 - 2025-01-13
(2025-01-12, 09:45 PM)TheDreadPirate Wrote: You need the OpenSubtitles plugin installed and configured for the download subtitles job to do anything.
Most of the other maintanence tasks take a minimal amount of time as long as they are run daily.
Thank you for the response. The problem is that the log files are not being cleaned, nor are the records or transcode files. When navigating from the terminal, the files are still there, and the same happens in the Jellyfin interface. Nothing gets deleted. The log file has thousands of lines and keeps growing because every time I manually try to clean it, it shows as completed in 0 seconds, but it clearly doesn't do anything. I think it might be something related to permissions, but I can't figure it out.
RE: Manteinance tasks not working - Efficient_Good_5784 - 2025-01-13
The task that clears/cleans out the logs only does so for logs that are older than 3 days.
A new log is made daily, so logs only have 24 hours to grow in size.
If your server is new, all the work of scanning things, running other tasks like trickplays and chapter image extraction and etc., will have the logs grow really large.
If you're also running into some form of error, it's not uncommon for the error to happen a bunch of times and be written to the logs too each time.
As for transcodes, maybe a transcode is being used by a client when you try to clear the transcode directory. Or it may be a permissions issue.
RE: Manteinance tasks not working - drakonis96 - 2025-01-13
(2025-01-13, 08:16 AM)Efficient_Good_5784 Wrote: The task that clears/cleans out the logs only does so for logs that are older than 3 days.
A new log is made daily, so logs only have 24 hours to grow in size.
If your server is new, all the work of scanning things, running other tasks like trickplays and chapter image extraction and etc., will have the logs grow really large.
If you're also running into some form of error, it's not uncommon for the error to happen a bunch of times and be written to the logs too each time.
As for transcodes, maybe a transcode is being used by a client when you try to clear the transcode directory. Or it may be a permissions issue.
Thank you for your response. Does that also apply to the activity section? That section does not clean either when I click on the maintenance button.
While deploying the container, I get no errors, but I do get some warnings.
Code: jellyfin | [09:58:50] [WRN] [6] Microsoft.EntityFrameworkCore.Migrations: An operation of type 'SqlOperation' will be attempted while a rebuild of table 'ImageInfos' is pending. The database may not be in an expected state. Review the SQL generated by this migration to help diagnose any failures. Consider moving these operations to a subsequent migration.
jellyfin | [09:58:50] [WRN] [6] Microsoft.EntityFrameworkCore.Migrations: An operation of type 'SqlOperation' will be attempted while a rebuild of table 'ImageInfos' is pending. The database may not be in an expected state. Review the SQL generated by this migration to help diagnose any failures. Consider moving these operations to a subsequent migration.
jellyfin | [09:58:50] [WRN] [6] Microsoft.EntityFrameworkCore.Migrations: An operation of type 'SqlOperation' will be attempted while a rebuild of table 'Permissions' is pending. The database may not be in an expected state. Review the SQL generated by this migration to help diagnose any failures. Consider moving these operations to a subsequent migration.
jellyfin | [09:58:50] [WRN] [6] Microsoft.EntityFrameworkCore.Migrations: An operation of type 'SqlOperation' will be attempted while a rebuild of table 'Permissions' is pending. The database may not be in an expected state. Review the SQL generated by this migration to help diagnose any failures. Consider moving these operations to a subsequent migration.
jellyfin | [09:58:50] [WRN] [6] Microsoft.EntityFrameworkCore.Migrations: An operation of type 'SqlOperation' will be attempted while a rebuild of table 'Preferences' is pending. The database may not be in an expected state. Review the SQL generated by this migration to help diagnose any failures. Consider moving these operations to a subsequent migration.
jellyfin | [09:58:50] [WRN] [6] Microsoft.EntityFrameworkCore.Migrations: An operation of type 'SqlOperation' will be attempted while a rebuild of table 'Preferences' is pending. The database may not be in an expected state. Review the SQL generated by this migration to help diagnose any failures. Consider moving these operations to a subsequent migration.
jellyfin | [09:58:50] [WRN] [6] Microsoft.EntityFrameworkCore.Migrations: An operation of type 'SqlOperation' will be attempted while a rebuild of table 'Users' is pending. The database may not be in an expected state. Review the SQL generated by this migration to help diagnose any failures. Consider moving these operations to a subsequent migration.
jellyfin | [09:58:50] [WRN] [6] Microsoft.EntityFrameworkCore.Migrations: An operation of type 'SqlOperation' will be attempted while a rebuild of table 'Users' is pending. The database may not be in an expected state. Review the SQL generated by this migration to help diagnose any failures. Consider moving these operations to a subsequent migration.
jellyfin | [09:58:50] [WRN] [6] Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager: No XML encryptor configured. Key {943c6609-1aa5-41a0-9351-cd3d32bd0b0e} may be persisted to storage in unencrypted form.
jellyfin | [09:58:51] [WRN] [6] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: The WebRootPath was not found: /run/s6-rc:s6-rc-init:NJCoAo/servicedirs/svc-jellyfin/wwwroot. Static files may be unavailable.
END OF LINE
As for permissions, I've got the container and the files with the following permissions. Could you please tell me if this is correct?
Code: rroot@openmediavault:~# ps aux | grep jellyfin
root 943606 0.0 0.0 220 76 ? S 10:21 0:00 s6-supervise svc-jellyfin
jellyfin 943731 4.7 3.0 275348848 992492 ? Ssl 10:21 0:44 /usr/bin/jellyfin --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg
root 964928 0.0 0.0 6352 2140 pts/0 S+ 10:36 0:00 grep jellyfin
root@openmediavault:~# ls -la /srv/dev-disk-by-uuid-34a38ce7-c6f8-4c5e-8a61-4d23bc6a71d2/USBhdd12tb/media/jellyfin/config
total 56
drwxrwsr-x 7 jellyfin users 4096 ene 13 10:11 .
drwxrwsr-x 3 root users 4096 ene 13 09:58 ..
drwxrwsr-x 3 root users 4096 ene 13 09:58 .aspnet
drwxrwxr-x 3 root users 4096 ene 13 09:58 .cache
drwxrwsr-x 5 jellyfin users 4096 ene 13 10:11 cache
drwxrwsr-x 7 jellyfin users 4096 ene 13 09:58 data
-rwxrwxr-x 1 jellyfin users 2740 ene 13 10:24 encoding.xml
-rwxrwxr-x 1 jellyfin users 1342 ene 13 10:11 livetv.xml
drwxrwsr-x 2 jellyfin users 4096 ene 13 10:34 log
-rwxrwxr-x 1 jellyfin users 1362 ene 13 09:58 logging.default.json
-rwxrwxr-x 1 jellyfin users 3639 ene 13 10:21 migrations.xml
-rwxrwxr-x 1 jellyfin users 1080 ene 13 10:10 network.xml
-rwxrwxr-x 1 jellyfin users 6753 ene 13 10:10 system.xml
Also, this happens when i try to manually remove a file from the container as the jellyfin user who runs it:
Code: jellyfin@2a06773cb4b9:/config/cache$ ls
2568c4206ba4499db6a053b0c7a4272c_channels images omdb transcodes
jellyfin@2a06773cb4b9:/config/cache$ rm 2568c4206ba4499db6a053b0c7a4272c_channels
rm: remove write-protected regular file '2568c4206ba4499db6a053b0c7a4272c_channels'? Y
rm: cannot remove '2568c4206ba4499db6a053b0c7a4272c_channels': Permission denied
jellyfin@2a06773cb4b9:/config/cache$
RE: Manteinance tasks not working - TheDreadPirate - 2025-01-13
As bitmap already stated, logs older than 3 days are deleted.
Transcode files are cleaned when the associated playback ends. If that post-playback cleanup does not occur (rare), the clean up job will only remove them if they are older than 24 hours. This is to prevent the cleanup job from accidentally cleaning up files that are still being used.
The activity log is similar in that it will remove activity entries older than 30 days. That job does not have a trigger in a default setup. I don't recall there being a setting in the UI to change that value, but it is set in system.xml if you want to change it up or down.
The clean cache job will remove files that haven't been modified in over a day.
The cleanup collections and playlists job will remove collection and playlist items that are no longer present in a library or have been moved to a different file system location.
RE: Manteinance tasks not working - drakonis96 - 2025-01-14
(2025-01-13, 01:44 PM)TheDreadPirate Wrote: As bitmap already stated, logs older than 3 days are deleted.
Transcode files are cleaned when the associated playback ends. If that post-playback cleanup does not occur (rare), the clean up job will only remove them if they are older than 24 hours. This is to prevent the cleanup job from accidentally cleaning up files that are still being used.
The activity log is similar in that it will remove activity entries older than 30 days. That job does not have a trigger in a default setup. I don't recall there being a setting in the UI to change that value, but it is set in system.xml if you want to change it up or down.
The clean cache job will remove files that haven't been modified in over a day.
The cleanup collections and playlists job will remove collection and playlist items that are no longer present in a library or have been moved to a different file system location.
Oh, alright. Thank you very much for the clarification. I thought pressing the button would delete the logs and transcodes immediately, regardless of their age. I'll wait a few days to see if everything works as expected.
|