NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
« Previous 1 … 16 17 18 19 20 … 34 Next »
Fixed? - PostProcessing - NScriptHelper.dll rename failed following 5.2.1 upgrade

 
  • 0 Vote(s) - 0 Average
Fixed? - PostProcessing - NScriptHelper.dll rename failed following 5.2.1 upgrade
lostboy
Offline

Junior Member

UK
Posts: 39
Threads: 6
Joined: Dec 2008
#1
2021-10-26, 04:01 PM (This post was last modified: 2021-10-26, 04:02 PM by lostboy.)
Hi I recently upgraded to 5.2.1 (from 5.1.1) and the last part of my PostProcessing.sh script (renaming the database record following a directory move) errored out (see extract).

I record shows to a /TV_temp directory (on SSD) and then use the PostProcessing.sh script to move them to spinning rust on /TV_Recordings.  

The simple fix was to change the database entry before moving the file, rather than after.  Is the change in behaviour a symptom of more active checking of the existence of recordings / database pruning than before, or has the rename behaviour in NScriptHelper.dll changed?

The error existed irrespective of the AutoRemoveMissingRecordings setting.

An example of the error I was seeing in the logs was:

2021-10-26 15:50:04.624 [DEBUG][66] Got request [127.0.0.1]: /services/service (recording.rename)

2021-10-26 15:50:04.625 [DEBUG][66] method=recording.rename
2021-10-26 15:50:04.625 [DEBUG][66] parameters:
2021-10-26 15:50:04.625 [DEBUG][66]   method: recording.rename
2021-10-26 15:50:04.625 [DEBUG][66]   from: /TV_temp/Escape to the Country/Season 22/Escape.to.the.Country.S22E07.Derbyshire.ts
2021-10-26 15:50:04.625 [DEBUG][66]   to: /TV_Recordings/Escape to the Country/Season 22/Escape.to.the.Country.S22E07.Derbyshire.ts
2021-10-26 15:50:04.625 [DEBUG][66]   sid: 8bca4e38b0a64fe59e4ce20421f9c5f6
2021-10-26 15:50:04.625 [DEBUG][66]   client_ip: 127.0.0.1
2021-10-26 15:50:04.625 [DEBUG][66]   host_callback: ...
2021-10-26 15:50:04.625 [DEBUG][66] Rename
2021-10-26 15:50:04.878 [ERROR][66] Unable to find existing recording with filename: /TV_temp/Escape to the Country/Season 22/Escape.to.the.Country.S22E07.Derbyshire.ts
2021-10-26 15:50:04.878 [DEBUG][66] <?xml version="1.0" encoding="utf-8" ?>
<rsp stat="fail">
  <err code="2" msg="Invalid Args" />
</rsp>

2021-10-26 15:50:04.886 [DEBUG][129] > rmdir: failed to remove directory '/TV_temp': Permission denied
NextPVR 5 on Debian 10 on LXC (Proxmox 7), Clients Kodi on FireStick/~HD/Mi Box S
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2021-10-26, 04:08 PM
What is <AutoCreateFolders> folders set to in your config.xml?
lostboy
Offline

Junior Member

UK
Posts: 39
Threads: 6
Joined: Dec 2008
#3
2021-10-26, 04:12 PM
<AutoCreateFolders>true</AutoCreateFolders>
NextPVR 5 on Debian 10 on LXC (Proxmox 7), Clients Kodi on FireStick/~HD/Mi Box S
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#4
2021-10-26, 04:25 PM
I can't see anything obvious that has changed in the code, but maybe your script should copy the file, do the rename, then delete the original file.
lostboy
Offline

Junior Member

UK
Posts: 39
Threads: 6
Joined: Dec 2008
#5
2021-10-26, 04:34 PM
Good point - thanks sub,  I was using mv - I'll make the change and see how it goes.

Cheers
NextPVR 5 on Debian 10 on LXC (Proxmox 7), Clients Kodi on FireStick/~HD/Mi Box S
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#6
2021-10-26, 04:53 PM
I think mv on the same file system is much better than copy and rename. Uploading the zipped logs showing the error would be beneficial,

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#7
2021-10-26, 05:00 PM
(2021-10-26, 04:53 PM)mvallevand Wrote: I think mv on the same file system is much better than copy and rename.  Uploading the zipped logs showing the error would be beneficial,

Martin
It basically comes down to <AutoRemoveMissingRecordings>. If he's moved it before the rename, then it sees it as missing when it loads the recording list to attempt to find the recording he's trying to move.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#8
2021-10-26, 05:16 PM (This post was last modified: 2021-10-26, 05:26 PM by mvallevand.)
He posted " The error existed irrespective of the AutoRemoveMissingRecordings setting" In any case, could he rename it in the database and then do the mv it takes a long time to copy an hour recording. The call shouldn't require source and dest to exist.

Martin
lostboy
Offline

Junior Member

UK
Posts: 39
Threads: 6
Joined: Dec 2008
#9
2021-10-26, 05:39 PM
I've attached the logs covering the error in the OP - the extract was from nrecord.log.

Although the two directories appear to be on the same file system they are actually bind mounts to separate mounted zfs filesystems (on different pools) so both mv and cp will result in real data transfers.

I guess the appeal of a copy-DBrename-delete is that the database will always point to an existent file.

BTW I tested the copy speed and for an 11GByte ts file the cp command returned in just less than 25 seconds.  I guess that at that point the file is mostly in the cache RAM of the zfs pool, but it will be readable if needed.

Many thank both sub and Martin for your help.


Attached Files
.zip   logs-20211026-1550.zip (Size: 735.48 KB / Downloads: 3)
NextPVR 5 on Debian 10 on LXC (Proxmox 7), Clients Kodi on FireStick/~HD/Mi Box S
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#10
2021-10-26, 05:42 PM
(2021-10-26, 05:16 PM)mvallevand Wrote: He posted " The error existed irrespective of the AutoRemoveMissingRecordings setting"    In any case, could he rename it in the database and then do the mv  it takes a long time to copy an hour recording.  The call shouldn't require source and dest to exist.

Martin
True - I missed that.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Linux install failed -- permission denied? FrogFan 4 389 2025-03-26, 12:39 AM
Last Post: FrogFan
  Roll back upgrade? baj1 16 956 2024-12-09, 02:06 AM
Last Post: mvallevand
  [Failed: No errors, but no data delivered. This is usually because the device failed Bobthegoldfish 3 272 2024-11-29, 12:49 AM
Last Post: mvallevand
  NextPVR i.mjh.nz [Failed: Recording interrupted] Nzbaxterman 6 655 2024-10-29, 11:44 PM
Last Post: sub
  Folder location PostProcessing.sh with LibreElec retrofan 10 1,080 2024-08-14, 04:44 PM
Last Post: retrofan
  Upgrade path for pi4/bullseye to pi5/mx23.3 TheRealRoland 6 791 2024-06-03, 01:27 AM
Last Post: TheRealRoland
  Failed Recordings sgar75 13 1,172 2024-04-23, 09:16 PM
Last Post: mvallevand
  failed recordings CDinger 11 1,070 2024-04-21, 03:29 AM
Last Post: CDinger
  apt upgrade broke NPVR WagMan 11 1,396 2024-01-01, 04:59 PM
Last Post: mvallevand
  Failed to start requested stream satforall 50 4,823 2023-12-27, 04:04 PM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode