[solved] MP will not delete recordings that are on NAS (2 Viewers)

framug

Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,884
    1,956
    South of France
    Home Country
    France France
    Thanks again for the suggestions. I'll try updating MP when I get the chance and see if it's any better.
    MP 1.23 increased the timeout delay for NAS.
    Please, again and for last, try with latest MP version and, report with logs (as debug) if it doesn't work for you.
     

    RobNorthcott

    MP Donator
  • Premium Supporter
  • October 9, 2007
    540
    102
    Dartmoor, England
    Home Country
    United Kingdom United Kingdom
    OK, MP 1.23 still won't delete those files.
    I'll make a new log later and upload it (may not be until tomorrow though).
    Does Watchdog not force the log mode to debug anymore? If not I'll switch it manually first.
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,884
    1,956
    South of France
    Home Country
    France France
    Well, 1 second was clearly not enought for NAS in single-seat on the past.
    Today, timeout is 1.5 seconds but, in case of client/server, maybe 2 seconds are needed ?
    Don't know..
    We are not magicians (at least, not all the time) :)
    That's why sometimes, we need more accurate informations.
    It help us and you (and all others users), if our crystal ball want to help us to fix this problem. ;)
     

    RobNorthcott

    MP Donator
  • Premium Supporter
  • October 9, 2007
    540
    102
    Dartmoor, England
    Home Country
    United Kingdom United Kingdom
    OK, had a chance to make a new log, with TV Server manually switched to debug this time. It does show the attempt to delete the file now - but I still can't tell why it's failing, so I'll have to pass it to the experts again :)

    Oh, @framug - if you weren't joking in your last post then I apologise if you think I'm expecting miracles from you - I know what it's like to be hassled by users (I'm a software developer in my day job) and certainly didn't intend that. I'm not much of an expert on Windows/Linux mixed networking though, and certainly don't know how MP TV Server works, so I'm grateful of any help I can get on here.
     

    Attachments

    • MediaPortalLogs_05_01_20__21_32.zip
      2 MB

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    CyberSimian is right. The TV service is responsible for deleting files. Therefore the Windows user running the TV service process must have appropriate permissions on the NAS. On this point...

    1. Rob, you said:
    Regarding users, the MP client and TV Server do run under different Windows users, but the user they're connecting to the NAS with is the same one (as in the user on the NAS, not in Windows), and this user has full rights to that directory.

    I don't understand what you're saying here. As far as I'm aware, TV Server does not have any explicit NAS credential configuration. It just attempts access with the current Windows user.

    2. If I recall correctly, updating MP (including TV Server) may blow away customisations in the Windows service properties for the TV service (startup properties, run user etc.). Since you've updated from MP 1.21, please make sure that the Windows service properties for the TV service - in particular: run as user - are still all as you expect.


    From the perspective of the log files...
    About all I can say is that the "DeleteRecordingOnDisk" log entries are not followed by any " - deleting '<file name>'" entries. To me this suggests that either the particular recording doesn't have an files (I'd be surprised if this is the case) or the Windows user running the TV service process cannot even list the files in the corresponding recording directory.

    Are you able to confirm whether the file "\\HEDGEHOGNAS\media\OldRecordings\Sound Waves_ The Symphony of Physics - BBC Four - 2017-03-05.ts" and/or its containing directory actually exists on the NAS?
    ...and what files - other than the TS file - associated with that recording (eg. thumbnail, XML metadata file) are present in that directory?

    Since you're a developer, here is the relevant code:
    https://github.com/MediaPortal/Medi...ce/DiskManagement/RecordingFileHandler.cs#L44
    https://github.com/MediaPortal/Medi...e/DiskManagement/RecordingFileHandler.cs#L118
     

    RobNorthcott

    MP Donator
  • Premium Supporter
  • October 9, 2007
    540
    102
    Dartmoor, England
    Home Country
    United Kingdom United Kingdom
    Thanks @mm1352000 - the files definitely exist, and can be played from "Recordings". Is it just _deleting_ that is handled by TVServer, and the playback is done by Mediaportal? If so, then fiddling with the user on TVServer may help. I may be mixing up two different things here I think...
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    the files definitely exist, and can be played from "Recordings".
    Okay.

    Is it just _deleting_ that is handled by TVServer, and the playback is done by Mediaportal? If so, then fiddling with the user on TVServer may help. I may be mixing up two different things here I think...
    To directly answer your question: it depends. :)

    In your case I'm fairly sure the answer is "yes - only deleting is handled by TV Server". I say that because it appears like at some stage you've chosen to enable the use of UNC paths for recording playback instead of using RTSP:
    Advanced Options

    (from your MediaPortal client settings file)
    Code:
    <section name="tvservice">
      ...
      <entry name="usertsp">no</entry>
      ...

    Using UNC paths means that the MediaPortal client accesses and plays the recording files directly. Hence, the Windows user that you use to run the MediaPortal client must have at least read access to the files on the NAS.

    If you hadn't chosen to use UNC paths (ie. default behaviour = RTSP used for recording playback), the TV Server would stream the recording file from the NAS to MediaPortal [client]. In this case the Windows user used to run the TV service process would need at least read access to the files on the NAS.

    As I've previously indicated, for the TV Server always handles deleting. Therefore if you ever want to delete recordings, the Windows user used to run the TV service process will need write (or delete) access to the files on the NAS.

    Hope that's clear. :)
     

    RobNorthcott

    MP Donator
  • Premium Supporter
  • October 9, 2007
    540
    102
    Dartmoor, England
    Home Country
    United Kingdom United Kingdom
    Yes that makes sense, thanks (although I don't think I changed anything on purpose to do with the UNC/RTSP). But yes - I see what you mean about the user running TVService now. I tried just quickly changing the user for tvservice through services.msc to be the normal Windows user and that completely broke it (tvserver not able to run at all by the look of it) - but I'm short of time now, so I just put it back to default account and I'll have another look later when I can think about it more.

    As always, many thanks for the help :)
     

    Users who are viewing this thread

    Top Bottom