Ombi icon indicating copy to clipboard operation
Ombi copied to clipboard

Ombi does not sync with Plex anymore

Open sfreek76 opened this issue 2 years ago • 23 comments

Describe the bug All of a sudden Ombi does not show new movies or tv-shows as available

To Reproduce Steps to reproduce the behavior:

  1. Go to Settings / Plex
  2. Click on Manually run full sync

Expected behavior Now all new movies and TV-Shows should show up after a while but they don't.

Screenshots plex new additions ombi search

Logs (Logs directory where Ombi is located) ombi log.pdf

Desktop:

  • OS: MacOS Monterey, Ombi runs as a package (not docker) on Synology NAS DSM 7.1.1-42962 Update 2

Ombi Version:

  • Version 4.22.5
  • Media Server Plex 1.30.1.6483
  • Database Type: SQLite

sfreek76 avatar Dec 15 '22 11:12 sfreek76

Hi!
Thanks for the issue report. Before a real human comes by, please make sure you used our bug report format.
Have you looked at the wiki yet? https://docs.ombi.app/
Before posting make sure you also read our FAQ.
Make the title describe your issue. Having 'not working' or 'I get this bug' for 100 issues, isn't really helpful.
If we need more information or there is some progress we tag the issue or update the tag and keep you updated.
Thanks!
Ombi Bot.

github-actions[bot] avatar Dec 15 '22 11:12 github-actions[bot]

Run a clear and resync and report back please

On Thu, 15 Dec 2022 at 11:29 am, github-actions[bot] < @.***> wrote:

Hi!

Thanks for the issue report. Before a real human comes by, please make sure you used our bug report format.

Have you looked at the wiki yet? https://docs.ombi.app/

Before posting make sure you also read our FAQ https://docs.ombi.app/info/faq/.

Make the title describe your issue. Having 'not working' or 'I get this bug' for 100 issues, isn't really helpful.

If we need more information or there is some progress we tag the issue or update the tag and keep you updated.

Thanks!

Ombi Bot.

— Reply to this email directly, view it on GitHub https://github.com/Ombi-app/Ombi/issues/4828#issuecomment-1352926572, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSVULEQ3AJI3OVEQRWWISTWNL6LPANCNFSM6AAAAAAS7TWI5U . You are receiving this because you are subscribed to this thread.Message ID: @.***>

tidusjar avatar Dec 15 '22 13:12 tidusjar

Thanks a lot, seem to work again. How can I prevent this issue in the future and what could be the cause? Do I have to do a "clear and resync" regularely?

sfreek76 avatar Dec 15 '22 14:12 sfreek76

OK; it seems i have to do a "clear and resync" every time I add a movie or TV-Show to Plex, otherwise it won't show up in ombi. Connection to Plex is fine although... What to do about it?

sfreek76 avatar Dec 20 '22 12:12 sfreek76

It seems that looking at your logs there's duplicate keys in your Plex library. Is it possible to refresh the metadata in Plex?

tidusjar avatar Dec 20 '22 22:12 tidusjar

I've never done that before because I'm scared to loose all my matches I did by hand and they were a lot... Wouldn't I loose them too if I do a complete refresh of metadata?

sfreek76 avatar Dec 21 '22 09:12 sfreek76

Refreshing the metadata doesn't do anything with Matches IIRC, all it just does is refresh the metadata e.g. IMDB information and ID's

tidusjar avatar Dec 21 '22 09:12 tidusjar

OK, thanks for the clarification. Sorry for asking but I never did a refresh of metadata in Plex, do I have to do a "Scan Library Files" under "Librarys" or is there another way to force refresh of metadata? I've seen there's a setting in "Scheduled Tasks" to refresh metadata every 3 days, this is ticket off in my settings... Thanks!

sfreek76 avatar Dec 21 '22 09:12 sfreek76

So i've managed to refresh metadata on all libraries that I want to have represented in ombi. Is there something I should do next? Should I refresh metadata regularely in Plex to prevent the issue with ombi?

sfreek76 avatar Dec 21 '22 11:12 sfreek76

Do a clean and resync a last time. If still no success upload a new set of logs

tidusjar avatar Dec 21 '22 12:12 tidusjar

Will do, thanks! Would it be a good idea to tick "refresh metadata every 3 days" in Settings / library?

EDIT: Got a Exception, see log (not sure if it has anything to do with current issue) obi-log.pdf

sfreek76 avatar Dec 21 '22 12:12 sfreek76

Situation gets worse, As implied in last post I got massive DB errors all of a sudden! Did not do or change anything. What can I do? Thanks!

ombi-log2.pdf ombi-log3.pdf

EDIT: One recurring error I see in the logs is a scheduled task at 07:00 on which my Plex Server refused connection (cause it's offline then) from then it seems downhill... I tried to reschedule but did not find the corresponding cron job in scheduled tasks for that time... Could this be the issue? maybe you see more in logs than me because I'm no dev...

PS: Only way to resolve the issue for a day ist a "Clear Data and resync"

sfreek76 avatar Dec 26 '22 20:12 sfreek76

Apologies. I’m on vacation with limited signal so not able to look at the moment

On Mon, 26 Dec 2022 at 9:25 pm, sfreek76 @.***> wrote:

Situation gets worse, As implied in last post I got massive DB errors all of a sudden! Did not do or change anything. What can I do? Thanks! ombi-log2.pdf https://github.com/Ombi-app/Ombi/files/10304714/ombi-log2.pdf

— Reply to this email directly, view it on GitHub https://github.com/Ombi-app/Ombi/issues/4828#issuecomment-1365447658, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSVULHD5QEQWSZ3OJFSU6TWPH5LJANCNFSM6AAAAAAS7TWI5U . You are receiving this because you commented.Message ID: @.***>

tidusjar avatar Dec 26 '22 21:12 tidusjar

oh, OK, enjoy your vacation! Glad if you could take a look into this after you are back! Thanks!

sfreek76 avatar Dec 27 '22 07:12 sfreek76

Hope you had fine vacations and wish you all the best for new year!

Did you had a chance to take a look? I've managed to reschedule Plex Sync but from time to time I get SQLite Error 19 regarding Plex Server Content Key and I don't know why because it runs for days without problem then all of a sudden the error occurs although nothing changed. You can see error in Log at the top:

ombi-log3.pdf

Only thing that helps in that situation ist a "Clear an Resync" but I can't do that all the time, right? If so, is there a way to automate it?

Thanks for any advice!

sfreek76 avatar Jan 14 '23 09:01 sfreek76

Would be grateful for any help here, issue happened again today:

2023-02-04 08:17:55.359 +01:00 [Warning] Exception thrown when attempting to cache the Plex Content in server "myServer" Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'UNIQUE constraint failed: PlexServerContent.Key'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace ---

sfreek76 avatar Jan 21 '23 08:01 sfreek76

I still have the issue above, in the meantime I tried to reconnect the server to see if it works then but getting cryptic URL. I think the last part after server key (...key=%2flibrary%2Fmetadata%2F53334) is wrong? Because when I copy&paste the URL in browser it opens my Plex Server but then says that something has gone wrong and it did not found the according page. I may be wrong but I think this could also be the problem in above issue? How can I adjust the URL then? would be great if someone could help, thanks a lot in advance!

Bildschirmfoto 2023-02-05 um 10 06 59

sfreek76 avatar Feb 05 '23 08:02 sfreek76

The issue lies in your OmbiExternal.db. Stop Ombi, delete OmbiExternal.db, start Ombi and wait for 5 minutes. This should let Ombi recreate your OmbiExternal.db and the issue should no longer be there anymore

twanariens avatar Feb 05 '23 11:02 twanariens

OK, did that, thanks! Let's hope the issue is resolved now. I'll keep you posted...

sfreek76 avatar Feb 05 '23 15:02 sfreek76

Error re-apeared today:

2023-02-08 08:19:00.250 +01:00 [Warning] Exception thrown when attempting to cache the Plex Content in server "myPlexServer" Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'FOREIGN KEY constraint failed'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Ombi.Store.Repository.BaseRepository2.InternalSaveChanges() in /home/runner/work/Ombi/Ombi/src/Ombi.Store/Repository/BaseRepository.cs:line 96 at Ombi.Store.Repository.BaseRepository2.Delete(T request) in /home/runner/work/Ombi/Ombi/src/Ombi.Store/Repository/BaseRepository.cs:line 66 at Ombi.Schedule.Jobs.Plex.PlexContentSync.ProcessTvShow(PlexServers servers, Metadata show, HashSet1 contentToAdd, Dictionary2 contentProcessed) in /home/runner/work/Ombi/Ombi/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs:line 475 at Ombi.Schedule.Jobs.Plex.PlexContentSync.ProcessServer(PlexServers servers, Boolean recentlyAddedSearch) in /home/runner/work/Ombi/Ombi/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs:line 241 at Ombi.Schedule.Jobs.Plex.PlexContentSync.StartTheCache(PlexSettings plexSettings, Boolean recentlyAddedSearch) in /home/runner/work/Ombi/Ombi/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs:line 155

sfreek76 avatar Feb 08 '23 08:02 sfreek76

Out of curiosity, not sure how running as a package works, but can you edit the appsettings.json file and change the log levels to Debug. Once you have done that restart Ombi and do a normal sync and then upload the logs again?

It's easier if you upload the logs to something like pastebin rather than PDF's.

After that remember to put the log levels back in the appsettings.json

tidusjar avatar Feb 14 '23 21:02 tidusjar

Thanks for your reply. How do I do that since I have a Synology packet installed?

Still get the error after a while:

Exception thrown when attempting to cache the Plex Content in server "myServer" SQLite Error 19: 'UNIQUE constraint failed: PlexServerContent.Key'

EDIT: Managed to find the file, but not sure how to change log-level: ombi log settings.pdf

sfreek76 avatar Mar 12 '23 09:03 sfreek76

So I get this "new" error: https://pastebin.com/AQaXpHRq

Would be great if we could finally resolve this and you could look into my last two posts again! Thanks!

And another error today: https://pastebin.com/d1KGbgur

But why I am posting here anyways, it seems you lost interest to solve this which is sad for an actual great product! 👎

sfreek76 avatar Mar 23 '23 08:03 sfreek76