Database insert exception errors in the logs

I would like to follow up on another issue I am seeing in your logs - relates to your DVRs and the Plex Media Server database - I will create a separate forum topic for this for you - once I have the information I need to investigate:

Could you download the Plex Media Server Database zip - through the Plex Web Settings / Troubleshooting web page and send it to me - probably too big to attach, so please upload externally and send me link by private message

Your logs show errors inserting entries into the database for a DVR

Oct 04, 2023 23:34:52.095 [7884] ERROR - [Grabber] SQLITE3:0x7ff73c3c7d20, 2067, abort at 34 in [update media_provider_resources set parent_id=:media_provider_resources_parent_id,type=:media_provider_resources_type,status=:media_provider_resources_status,state=:media_provider_resources_state,identifier=:media_provider_resources_identifier,protocol=:media_provider_resources_protocol,uri=:media_provider_resources_uri,uuid=:media_provider_resources_uuid,extra_data=:media_provider_resources_extra_data,last_seen_at=:media_provider_resources_last_seen_at,created_at=:media_provider_resources_created_at,updated_at=:media_provider_resources_updated_at where id=:media_provider_resources_id]: UNIQUE constraint failed: media_provider_resources.uuid

Oct 04, 2023 23:34:52.095 [7884] ERROR - [Grabber] Exception inside transaction (inside=1) (E:\jenkins\server\4164555190\MediaProviders\Grabbers\MediaGrabber.cpp:171): sqlite3_statement_backend::loadOne: UNIQUE constraint failed: media_provider_resources.uuid

Oct 04, 2023 23:34:52.095 [7884] DEBUG - DVR:Device: Device was alive, refreshed device://tv.plex.grabbers.hdhomerun/2022-09-BQIH-Z6V6QE:4.

We addressed issues like this before on VBox DVRs - looks like a similar issue or may be the fix needs further tweaks. We try to create a unique uuid (device identifier) for each DVR to add entries for in the database and this is failing with the above error

Could you please get me the responses from these requests - saving each in a text file with a suitable name to identify the request

http://costinr:S1_3_b1n3@192.168.100.216:34400/discover.json
http://costinr:S1_3_b1n3@192.168.100.216:34400/lineup_status.json

Could you also do the same for these - are these for the same physical DVR?

https://costinr:S1_3_b1n3@cloud.rizescu.eu:2087/discover.json
https://costinr:S1_3_b1n3@cloud.rizescu.eu:2087/lineup_status.json

and these

http://costinr:S1_3_b1n3@192.168.100.17:34400/discover.json
http://costinr:S1_3_b1n3@192.168.100.17:34400/lineup_status.json

and these - are these the same DVR as the one above?

http://costinr:C31_ma1_b1n3@192.168.100.17:34400/discover.json
http://costinr:C31_ma1_b1n3@192.168.100.17:34400/lineup_status.json

None of the DVR’s are up anymore.
I’ve tried several tuners with Live TV & DVR but I gave up because there were a lot of errors (wrong or missing recordings, wrong EPG mappings, etc.)
Thank you very much,

@costinr the issue I noticed in the logs relating to DVRs in now moved from I'm finding Plex server stopped every day - #26 by costinr to this topic

Thank you for sending me the database zip and json responses from the DVR devices

The issue appears to be due to the same device is being accessed with more than one http url - I don’t know if this was a configuration error or it could legitimately arise

Both of these have entries in the database with different deviceID’s but at this moment they are both returning the same deviceID

http://costinr:S1_3_b1n3@192.168.100.17:34400/discover.json

http://costinr:C31_ma1_b1n3@192.168.100.17:34400/discover.json

But all DVR’s are deleted in PMS, since several month ago, I’m wondering why PMS is still trying to access that machines?
Thank you,

At this moment DVRs are never removed but - soft deleted - in case they come back again, We allow users to delete and recreate DVRs and all continues as before

I have been discussing with the development team the idea of providing a Delete All Data option on the Delete DVR command

Where does the DeviceID come from in your xSteVe setup
Trying to understand how the id’s are set

This url
http://costinr:S1_3_b1n3@192.168.100.17:34400/discover.json
previously returned deviceID: 2022-06-1CRZ-KLYJ8J:8
It is now returning deviceID: 2022-09-S0VS-KKUGFW:8

This url
http://costinr:C31_ma1_b1n3@192.168.100.17:34400/discover.json
previously returned deviceID: 2022-09-S0VS-KKUGFW:8
and continues to return deviceID: 2022-09-S0VS-KKUGFW:8

For real actual physical DVRs - the manufacturer would give a unique device Idenfifier

I do not know how xSteVe is setup and why the deviceID changed

I could have a possible explanation: when I’ve made tests with Plex DVR, trying to obtain a functional PMS DVR, I’ve changed several times the xteve machines, and I’ve made backups from inside xteve interface (only xteve backups, not Plex). Also, for testing purposes, I’ve raised up to 4 Plex servers, all connected with my Plex account, each server with it’s own DVR. But when I’ve restored the xteve backups, there is a big probability the backups were switched between them. Also, I’ve switched back and forth between 2 versions of xteve.
Thank you,

I will discuss with the development team. It is effectively a configuration error. I will send you by PM edits to the database to remove the two entries in the provider_media_resources table that have the same deviceID (uuid) as what is being returned now on different virtual DVR and will see if that stops the database exception errors - I mentioned before I also have a feature request to give an option to purge all DVR cached data in this table.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.