Jump to content

Sometime MediaServer keep recording files open and it's not possible to delete it.


dj_guigui

Recommended Posts

Hi,

 

When i try to delete recording files within the Windows Explorer, sometime the deletion is refused because file is open in Media Server.

 

I need to stop Media Server in order to delete the file and then start it again.

 

Is there a known problem about that ?

 

Thanks in adavance.

 

Best regards.

Link to comment

Hello,

 

I know that from DVBViewer GE. There I can only delete recordings that have already been completed when I have completed the GE.

 

I therefore use the programs Lockhunter (cf. https://lockhunter.com/download.htm) or Unlocker (cf. https://unlocker.de.softonic.com/?utm_source=bing&utm_medium=paid&utm_campaign=bing_de_categories_sb&msclkid=1c10708ceed010e3ab96130ad73f3fb5) to unlock the recordings to move them to another directory or drive.

 

 

Many greetings

 

Webturtle

 

PS But be carefully not to unlock recordings that are still being recorded an move or delete them!!!  :jawdrop:

 

P.P.S. Wenn ich vorher bemerkt hätte, daß Du in der Schweiz bist, hätten wir auch auf deutsch posten können. Ähm falls es sich um die deutschsprachige Schweiz handelt.

 

Edited by Webturtle
Link to comment
5 hours ago, dj_guigui said:

When i try to delete recording files within the Windows Explorer, sometime the deletion is refused because file is open in Media Server. I need to stop Media Server in order to delete the file and then start it again. Is there a known problem about that ?

 

No known problem. But a known feature in certain szenarios, e.g. if a client is currently accessing the recording, particularly DVBViewer that may use it as timeshift file when playing the recorded channel.

 

However, you are not supposed to delete Media Server recordings in the Explorer. You should do it on the Recordings page of the Media Server web interface, so that the Media Server gets to know that the recording has been deleted and updates the recordings database accordingly, in order to avoid malfunction in certain cases where a recording is expected to exist, but actually doesn't.

 

If deleting a recording in the web interface fails, we can go on investigating...

 

Link to comment

Hello,

 

So, this morning,  i tried to delete about 10 recordings from the Recordings page of the Media Server web interface, although the Recording services did not report any errors when deleting, i have one .log file that remains and if i try to delete it with the file explorer, I get the message that the file is in use by the DVBViewer Media Server.

 

For information, the recording has ended 72h ago and no one is currently accessing the recording.

 

Thanks for your help.

 

Best regards.

Link to comment
23 hours ago, dj_guigui said:

i have one .log file that remains and if i try to delete it with the file explorer, I get the message that the file is in use by the DVBViewer Media Server.

 

I've checked the code, but I can't spot where and why closing a log file could fail. Creating the log, writing to it and closing it when the recording gets stopped is quite straight forward. However, the issue may be a side effect of some other error, e.g. an exception letting the media server skip parts of the code.

 

For further investigation the recording log itself and additionally the svcdebug.log from the configuration folder would be of interest, particularly for checking what happened when the recording in question was stopped. Please attach the files as ZIP.

 

Link to comment
On 11/29/2022 at 6:59 PM, Griga said:

 

No known problem. But a known feature in certain szenarios, e.g. if a client is currently accessing the recording, particularly DVBViewer that may use it as timeshift file when playing the recorded channel.

 

However, you are not supposed to delete Media Server recordings in the Explorer. You should do it on the Recordings page of the Media Server web interface, so that the Media Server gets to know that the recording has been deleted and updates the recordings database accordingly, in order to avoid malfunction in certain cases where a recording is expected to exist, but actually doesn't.

 

If deleting a recording in the web interface fails, we can go on investigating...

 

I don't have these logs in the configuration folder. Do i have to activate somethning for this log to be generated ("Write Debug Log" option from web interface is already checked.) ?

 

Here is the logs that are presents :

 

channellogos.ini
ChannelLogos2.ini
epg.dat
EpisodeSearchPresets.txt
ffmpegprefs.bak
ffmpegprefs.ini
iphoneprefs.bak
iphoneprefs.ini
log.txt
Radio.ini
searches.xml
service.bak
service.xml
service20151223184513.bak
svchardware.bak
svchardware.xml
svctimers.bak
svctimers.xml
svcuserdata.bak
svcuserdata.xml
svcuserdata20130122065519.bak
svcuserdata20151223184517.bak
tasks.xml
uPnPProfilesV2-backup-1.31.0.0.xml
uPnPProfilesV2.xml
UPnPProfilesV4.xml
webstreaming.ini

 

Best regards.

Link to comment

Thanks, that reveales what has happened. The recording log is incomplete, confirming that it hasn't been closed correctly. As suspected, the issue is caused by an exception, triggered by the attempt to automatically send a mail to you, containing information about the successfully finished recording:

 

//recording has been stopped:
03.12.22 01:40:00.504 TRecording ($076ACA30)    C:\Temp\TV\2022-12-02_23-55-00_RTS Deux (fra)_Adult Material - S01E03 - Hayley - WQM.ts Discontinuities: 0  -  Total size: 6,51 GB  -  Device: Pinnacle RoyalTS Tuner (2)
//DVBViewer clients are prompted to update the list of recordings:
03.12.22 01:40:00.509 SendUpdate           DVBVUPDATE REC
//The mail component causes an exception error, letting the server skip code until the exception is caught:
03.12.22 01:40:00.515 TVCR                 Process          SMTP component already connected

 

I don't know what "SMTP component already connected" means. I've never seen it before, and I'm not really familiar with this part of the Media Server. Did you receive the mail anyway?

 

I'm not sure if I can prevent this error. However, it should not let the Media Server skip important parts of the recorder code. The error should be caught and logged earlier at a point, where the attempt to send the the mail is finished, not when the whole process of stopping the recording is finished. At least this will be fixed in the upcoming 3.2.3 release (most likely before christmas), so that recording log files will be closed correctly.

 

Link to comment

P.S.

 

There are other mail-related errors that frequently appear in your svcdebug.log, e.g.

 

30.09.22 11:00:00.869 TSMTPMailer          SmtpRequestDone  11 - 535

 

535 means "Authentication failed". It looks like you have tried to set up the Media Server for automatically sending mails about finished recordings, but they never work due to an invalid password or some other wrong setting. "SMTP component already connected" may just be a follow-up error. So disabling the useless "Send mail when recordings are finished" option or correcting the E-Mail configuration will probably also fix the "recording files are not closed" issue.

 

Link to comment
13 hours ago, Griga said:

P.S.

 

There are other mail-related errors that frequently appear in your svcdebug.log, e.g.

 

30.09.22 11:00:00.869 TSMTPMailer          SmtpRequestDone  11 - 535

 

535 means "Authentication failed". It looks like you have tried to set up the Media Server for automatically sending mails about finished recordings, but they never work due to an invalid password or some other wrong setting. "SMTP component already connected" may just be a follow-up error. So disabling the useless "Send mail when recordings are finished" option or correcting the E-Mail configuration will probably also fix the "recording files are not closed" issue.

 

Indeed, I did have email notification enabled with a gmail account.

I think the problem is that google recently changed the security model and it is no longer possible to use your account in the same way to send emails.

 

And I confirm that I no longer receive notification emails.

 

I turned off notifications and I'll let you know if the problem persists.

 

Thank you for your help.

 

Best regards.

Link to comment
1 hour ago, dj_guigui said:

I think the problem is that google recently changed the security model and it is no longer possible to use your account in the same way to send emails.

 

You are right. I've found information about it here. It applies to the network library used by the DVBViewer Media Server. We would need to switch to a newer version of this library and implement some additional stuff for making gmail work again.

 

Such a change affects the whole Media Server, thus requiring careful testing before it is released. Unfortunately we can't include this anymore in the upcoming 3.2.3 release. Maybe next year...

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...