NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
1 2 3 4 5 … 34 Next »
Strange problem writing to CIFS share

 
  • 0 Vote(s) - 0 Average
Strange problem writing to CIFS share
ehfortin
Offline

Junior Member

Posts: 16
Threads: 3
Joined: Aug 2011
#1
2024-12-21, 11:01 PM
Hello,

I've read the few threads regarding similar problems and I don't seems to see the equivalent. I've installed nextpvr on ubuntu 24.04 with the nextpvr-helper. This work a1. I battled with using HDPVR2 and finding an IR blaster that work with my Motorola/Arris receiver which now work very well. So the last thing I wanted to do is to use a CIFS share on my trueness server. The share already exist as it's used by plex and nextpvr when it was on Windows. So, I've created a nextpvr user on truenas and give him full control on this share.

On the ubuntu side, I've added the following line to /etc/fstab:

Code:
//192.168.1.30/Recordings    /mnt/recordings cifs username=nextpvr,password=&&&,uid=998,gid=44 0 0

The aid 44 is for the video group. If I su to user nextpvr on the ubuntu VM, I can access /mnt/recordings, create file, delete them and modify them. If I start recording, nextpvr create the directory and a few files in the directory and even record the first few second of the video but then, the .ts file stop receiving data. That said, nextpvr continue to record for the whole duration of the movie but we only have a few seconds of data.

Code:
drwxr-xr-x 2 nextpvr video       0 Dec 21 14:08  .
drwxr-xr-x 2 nextpvr video       0 Dec 21 14:08  ..
-rwxr-xr-x 1 nextpvr video      23 Dec 21 14:08 'Blue.Beetle.(2023).timing'
-rwxr-xr-x 1 nextpvr video 6329584 Dec 21 14:08 'Blue.Beetle.(2023).ts'
-rwxr-xr-x 1 nextpvr video    1127 Dec 21 14:08 'Blue.Beetle.(2023).xml'

This is an example of the recording. As you can see, I have the usual files created and written to. But as you will see in the log, after writing those files and filling between 4 and 6 MB of the movie, we can see Permission denied.

Code:
2024-12-21 14:08:21.005    [DEBUG][11]    Child PID: 9890
2024-12-21 14:08:21.016    [DEBUG][11]    Creating writer: /mnt/recordings/Blue Beetle (2023)/Blue.Beetle.(2023).ts
2024-12-21 14:08:21.041    [DEBUG][11]    Created Mutex: Global\NPVR-mutex-7212efbe8df0cd2d233055ac957d4562
2024-12-21 14:08:21.045    [DEBUG][11]    Created map: /mnt/recordings/Blue Beetle (2023)/Blue.Beetle.(2023).ts.map
2024-12-21 14:08:21.060    [DEBUG][11]    StartStream [/mnt/recordings/Blue Beetle (2023)/Blue.Beetle.(2023).ts] allocated handle: 1
2024-12-21 14:08:21.060    [DEBUG][11]    Started recording (877:1:/mnt/recordings/Blue Beetle (2023)/Blue.Beetle.(2023).ts)
2024-12-21 14:08:21.069    [DEBUG][11]    Starting thumbnail extraction for /mnt/recordings/Blue Beetle (2023)/Blue.Beetle.(2023).ts
2024-12-21 14:08:34.131    [DEBUG][5]    Got request [192.168.1.101]: /service (recording.lastupdated)
2024-12-21 14:08:34.131    [DEBUG][5]    parameters:
2024-12-21 14:08:34.131    [DEBUG][5]       method: recording.lastupdated
2024-12-21 14:08:34.131    [DEBUG][5]       format: json
2024-12-21 14:08:34.131    [DEBUG][5]       sid: e555ff37-e8af-43fa-9175-78f36f5186fe
2024-12-21 14:08:34.131    [DEBUG][5]       client_ip: 192.168.1.101
2024-12-21 14:08:34.131    [DEBUG][5]       client_local: true
2024-12-21 14:08:34.131    [DEBUG][5]       user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
2024-12-21 14:08:34.131    [DEBUG][5]       host_callback: ...
2024-12-21 14:08:34.131    [DEBUG][5]    LastUpdated
2024-12-21 14:08:34.131    [DEBUG][5]    {"last_update":1734808100}

2024-12-21 14:08:34.218    [DEBUG][11]    Running: ffmpeg -re -y -i "/mnt/recordings/Blue Beetle (2023)/Blue.Beetle.(2023).ts" -vf fps=1/10,scale=220:124 -f mjpeg -flush_packets 1 "/mnt/recordings/Blue Beetle (2023)/Blue.Beetle.(2023).thumbnails"
2024-12-21 14:08:34.225    [DEBUG][22]    Starting timing extraction for /mnt/recordings/Blue Beetle (2023)/Blue.Beetle.(2023).ts
2024-12-21 14:08:34.227    [DEBUG][11]    No /var/opt/nextpvr/scripts/ParallelProcessing.sh
2024-12-21 14:08:34.528    [DEBUG][11]    PowerManagement StayAwake (needs implementation)
2024-12-21 14:08:34.528    [DEBUG][11]    Active...staying awake
2024-12-21 14:08:43.236    [DEBUG][22]    Running: "ffprobe" -loglevel error -skip_frame nokey -print_format csv -select_streams v:0 -show_entries frame=best_effort_timestamp_time,pkt_pos "http://127.0.0.1:8866/live?recording_id=877&growing=true&quiet=true&sid=9a35a4724e4344509da7d776d7592ead"
2024-12-21 14:08:43.336    [DEBUG][5]    Got request [127.0.0.1]: /live
2024-12-21 14:08:43.338    [DEBUG][5]    /live?recording_id=877&growing=true&quiet=true&sid=9a35a4724e4344509da7d776d7592ead
2024-12-21 14:08:43.338    [DEBUG][5]     - recording_id: 877
2024-12-21 14:08:43.338    [DEBUG][5]     - growing: true
2024-12-21 14:08:43.338    [DEBUG][5]     - quiet: true
2024-12-21 14:08:43.338    [DEBUG][5]     - sid: 9a35a4724e4344509da7d776d7592ead
2024-12-21 14:08:43.340    [DEBUG][5]    range: bytes=0-
2024-12-21 14:08:43.343    [DEBUG][5]    StreamNative@1..
2024-12-21 14:08:43.343    [DEBUG][5]    StreamNative@2
2024-12-21 14:08:43.343    [DEBUG][5]    StreamNative@3
2024-12-21 14:08:43.343    [DEBUG][5]    StreamNative@4
2024-12-21 14:08:43.346    [DEBUG][5]    RollingFile.Open(/mnt/recordings/Blue Beetle (2023)/Blue.Beetle.(2023).ts) ..
2024-12-21 14:08:43.350    [DEBUG][5]    About to stream recording: /mnt/recordings/Blue Beetle (2023)/Blue.Beetle.(2023).ts
2024-12-21 14:08:43.350    [DEBUG][5]    Request had range request
2024-12-21 14:08:43.350    [DEBUG][5]    Requested Range: 0- (6329584 bytes)
2024-12-21 14:08:43.364    [ERROR][21]    Unexpected error writing to OutputSink: System.UnauthorizedAccessException: Access to the path '/mnt/recordings/Blue Beetle (2023)/Blue.Beetle.(2023).ts' is denied.
---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset)
   at System.IO.Strategies.BufferedFileStreamStrategy.WriteSpan(ReadOnlySpan`1 source, ArraySegment`1 arraySegment)
   at System.IO.Strategies.BufferedFileStreamStrategy.Write(Byte[] buffer, Int32 offset, Int32 count)
   at NShared.Writer.OutputSink.Write(Byte[] data, Int32 offset, Int32 length)
2024-12-21 14:08:43.367    [ERROR][21]    Unexpected error writing to OutputSink: System.UnauthorizedAccessException: Access to the path '/mnt/recordings/Blue Beetle (2023)/Blue.Beetle.(2023).ts' is denied.
---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset)
   at System.IO.Strategies.BufferedFileStreamStrategy.WriteSpan(ReadOnlySpan`1 source, ArraySegment`1 arraySegment)
   at System.IO.Strategies.BufferedFileStreamStrategy.Write(Byte[] buffer, Int32 offset, Int32 count)
   at NShared.Writer.OutputSink.Write(Byte[] data, Int32 offset, Int32 length)

It make no sense to have access for a few seconds and then, having access denied to the path. I'm attaching the whole logs for anybody to look at but I think the cut/paste section above is what is of interest. Note that I can play the .ts (very short but still) and that if I delete it from nextpvr, it remove everything including the directory. 

It may not make sense but is it possible that nextpvr change identity between the initial file creating and for the rest of the append to the .ts file? 

Any idea/suggestion/comment will be appreciated.

Thank you.

ehfortin


Attached Files
.zip   nrecord.log.zip (Size: 42.81 KB / Downloads: 2)
ehfortin
Offline

Junior Member

Posts: 16
Threads: 3
Joined: Aug 2011
#2
2024-12-22, 03:38 PM
Hello,

For now, I'm using NFS which work great. Still have no clue why CIFS is acting the way it is and would like to understand what may be the problem but at least I have an alternative which work. I will continue to do some testing around this but at the moment, I have another problem with the IR Blaster. In the last 24 hours, it worked for 3 movies and didn't for another two (was recording just about anything to see if it was reliable). The recordings were made on the same 2-3 channels which show that it's not a problem with some digit. But the receiver never wake up with the "OK/Select" for some of the recording but worked for others. Will do more testing around that.

Thank you.

ehfortin
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,819
Threads: 954
Joined: May 2006
#3
2024-12-22, 03:46 PM
My STB needs a wakeup key after 6 hours, perhaps you need something that.

Martin
ehfortin
Offline

Junior Member

Posts: 16
Threads: 3
Joined: Aug 2011
#4
2024-12-24, 02:11 AM
(2024-12-22, 03:46 PM)mvallevand Wrote: My STB needs a wakeup key after 6 hours, perhaps you need something that.

Martin

Possible. I'll try to figure what is going on. It like most of the time, all digit work when sending IR command but sometime one is missed or one is just acting weird. For example, let say I'm going for channel 1300. Something it become 100 but I've also seen 1301 while I called 1300. IR is a strange beast when using recorded command. Seems like anything can conflict at any moment. I guess that's part of the pleasure.

Thank you.

ehfortin
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,819
Threads: 954
Joined: May 2006
#5
2024-12-24, 02:32 AM
Earlier you asked why I was sending multiple IRsends. I figure best leave well enough alone. Before IR I used FireWire tuning on the stb and it was great but except for some trouble with the electrical tape hold the IR to the box it has been much better than I expected.

I only have to go into the 900's so that extra key could be the issue.

Martin
ehfortin
Offline

Junior Member

Posts: 16
Threads: 3
Joined: Aug 2011
#6
2024-12-27, 08:00 PM
I've done a completely new script that will send a combo of IR command (like "Enter" followed by "Back") to make sure the receiver is awake and, if the "Enter" went into one of those "on-demand" channel, it will get out of it. It then wait a few seconds and then will send the exact number of irsend equivalent (I'm now using a broadlink RM mini 3 as my IRblaster was having a hard time with sending the proper IR required for the Arris VIP2502 sub) so if it's a two digits channel, it will only send two digits and if it's a 4 digits channel, it will adapt to this. The Broadlink RM mini 3 doesn't have a wired IR blaster. So it's sending the IR command through the top in all direction. But it's installed a few inches to the STB so it should work well pretty much all of the time.

I was out for a few days so I now have to get back to figuring out if there is some timing issue or if I should record again a few of the IR command as, from one time to the other, there always some subtil changes. As the broadlink is having his own small processor, I don't expect the fact that I'm running NextPVR in a VM as the issue (I think the IR blaster I had before was having issue with this because a VM is not realtime and IR seems sensible to delay) but that's something I'm keeping in mind if I don't get to a high level of accuracy after doing some tweaking.

ehfortin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
Photo Drive access problem Jakesty 3 244 2025-04-21, 06:57 PM
Last Post: mvallevand
  Scanning problem once again... carsten1212 5 770 2023-07-22, 01:04 PM
Last Post: carsten1212
  Strange problem jammy 7 1,090 2023-06-30, 04:29 PM
Last Post: mvallevand
  Is my problem dotnet? Heifer 21 2,448 2022-10-18, 11:14 PM
Last Post: mvallevand
  Empty files when writing to samba share aimaim 3 862 2022-07-05, 10:31 PM
Last Post: mvallevand
  Debian NextPVR on Cifs share Oempa 7 1,469 2022-07-05, 09:03 PM
Last Post: sub
  Problem finding channels philipbonev 1 848 2022-04-25, 10:41 PM
Last Post: sub
  Strange 'log' file ? ceejayemm 1 685 2022-04-08, 10:28 AM
Last Post: mvallevand
  Static ip address problem Armsp0 4 1,002 2022-01-31, 11:22 PM
Last Post: sub
  Recording to remote samba share dlfergrd 13 3,093 2021-09-03, 08:05 PM
Last Post: dlfergrd

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

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

Linear Mode
Threaded Mode