NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Docker amd64 v
« Previous 1 2 3 4 5 … 9 Next »
Unable to write buffer. How do I debug?

 
  • 0 Vote(s) - 0 Average
Unable to write buffer. How do I debug?
Sibiu
Offline

Junior Member

UK
Posts: 4
Threads: 1
Joined: Dec 2020
#1
2022-08-14, 06:57 PM
I am trying to run NextPVR as an addon to home assistant, which means that home assistant essentially manages the docker environment, ensuring that the folders and ports are mapped etc. but otherwise it is a docker container. My NPVR docker image has two mount points, one /config that is mapped to a local folder on my ha server and /share which is where the buffer is held. /share is actually mapped to a cifs mounted folder on the ha instance.

Anyway enough background, when I try to play a channel in NPVR I get the following in the log
Code:
[color=#6a9955][font=Consolas, 'Courier New', monospace]2022-08-14[/font][/color][color=#d4d4d4][font=Consolas, 'Courier New', monospace] [/font][/color][color=#6a9955][font=Consolas, 'Courier New', monospace]16:45:46.945[/font][/color][color=#d4d4d4][font=Consolas, 'Courier New', monospace] [/font][/color][color=#ce9178][font=Consolas, 'Courier New', monospace][b][ERROR][/b][/font][/color][color=#d4d4d4][color=#d4d4d4][font=Consolas, 'Courier New', monospace][[/font][/color][/color][color=#569cd6][font=Consolas, 'Courier New', monospace]6[/font][/color][color=#d4d4d4][color=#d4d4d4][font=Consolas, 'Courier New', monospace]]  Unexpected error writing to OutputSink: [/font][/color][/color][color=#ce9178][font=Consolas, 'Courier New', monospace][i]System.UnauthorizedAccessException[/i][/font][/color][color=#d4d4d4][color=#d4d4d4][font=Consolas, 'Courier New', monospace]: Access to the path [/font][/color][/color][color=#ce9178][font=Consolas, 'Courier New', monospace]'/share/fs/multimedia/Buffer/live-ITV2-1-1.ts'[/font][/color][color=#d4d4d4][color=#d4d4d4][font=Consolas, 'Courier New', monospace] is denied.[/font][/color][/color]
[color=#d4d4d4][font=Consolas, 'Courier New', monospace][color=#d4d4d4] ---> [/color][color=#ce9178][i]System.IO.IOException[/i][/color][color=#d4d4d4]: Permission denied[/color]
[color=#d4d4d4]   --- End of inner exception stack trace ---[/color]
[color=#ce9178][i]   at System.IO.FileStream.WriteNative(ReadOnlySpan`1 source)[/i][/color]
[color=#ce9178][i]   at System.IO.FileStream.FlushWriteBuffer()[/i][/color]
[color=#ce9178][i]   at System.IO.FileStream.WriteSpan(ReadOnlySpan`1 source)[/i][/color]
[color=#ce9178][i]   at System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count)[/i][/color]
[color=#ce9178][i]   at NShared.Writer.OutputSink.Write(Byte[] data, Int32 offset, Int32 length)[/i][/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.945[/color] [color=#569cd6][DEBUG][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]] StopStream([/color][color=#569cd6]1572865[/color][color=#d4d4d4])...[/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.945[/color] [color=#569cd6][DEBUG][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]] clientHandle[[/color][color=#569cd6]0fdfb396-392b-45a5-8bea-40c8eff81ba2[/color][color=#d4d4d4]] = [/color][color=#569cd6]1572865[/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.945[/color] [color=#569cd6][DEBUG][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]] Calling StopStream()[/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.951[/color] [color=#569cd6][DEBUG][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]] StopStream([/color][color=#569cd6]1[/color][color=#d4d4d4])[/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.952[/color] [color=#569cd6][DEBUG][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]] StopStream handle: [/color][color=#569cd6]1[/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.953[/color] [color=#569cd6][DEBUG][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]] Closing TSWriter....: LIVE&/share/fs/multimedia/Buffer/live-[/color][color=#569cd6]ITV2-1-1.ts[/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.956[/color] [color=#569cd6][DEBUG][/color][color=#d4d4d4][[/color][color=#569cd6]16[/color][color=#d4d4d4]] [/color][color=#569cd6]writer.Close[/color][color=#d4d4d4]() failed: [/color][color=#ce9178][i]System.UnauthorizedAccessException[/i][/color][color=#d4d4d4]: Access to the path [/color][color=#ce9178]'/share/fs/multimedia/Buffer/live-ITV2-1-1.ts'[/color][color=#d4d4d4] is denied.[/color]
[color=#d4d4d4] ---> [/color][color=#ce9178][i]System.IO.IOException[/i][/color][color=#d4d4d4]: Permission denied[/color]
[color=#d4d4d4]   --- End of inner exception stack trace ---[/color]
[color=#ce9178][i]   at System.IO.FileStream.WriteNative(ReadOnlySpan`1 source)[/i][/color]
[color=#ce9178][i]   at System.IO.FileStream.FlushWriteBuffer()[/i][/color]
[color=#ce9178][i]   at System.IO.FileStream.Dispose(Boolean disposing)[/i][/color]
[color=#ce9178][i]   at System.IO.Stream.Close()[/i][/color]
[color=#ce9178][i]   at NShared.Writer.OutputSink.<Close>b__23_0()[/i][/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.956[/color] [color=#ce9178][b][ERROR][/b][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]] [/color][color=#569cd6]writer.Close[/color][color=#d4d4d4]() did not complete in a timely fashion[/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.956[/color] [color=#569cd6][DEBUG][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]] Close@[/color][color=#569cd6]2[/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.956[/color] [color=#569cd6][DEBUG][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]] deleting /share/fs/multimedia/Buffer/live-[/color][color=#569cd6]ITV2-1-1.ts.map[/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.962[/color] [color=#569cd6][DEBUG][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]] Close@exit[/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.962[/color] [color=#569cd6][DEBUG][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]] StopStream@exit[/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.987[/color] [color=#569cd6][DEBUG][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]] stopping graph[/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.987[/color] [color=#569cd6][DEBUG][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]] destroying graph[/color]
[color=#6a9955]2022-08-14[/color] [color=#6a9955]16:45:46.987[/color] [color=#b5cea8][INFO][/color][color=#d4d4d4][[/color][color=#569cd6]21[/color][color=#d4d4d4]]  Stopped[/color][/font][/color]

This reads to me that there is a problem writing to the buffer folder, however if I log on to the docker container and try to write a test file as the same user as NPVR it is sucessful
Code:
root@local-nextpvr:/share/fs/multimedia# ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.9  1.3 23357400 220012 ?     Ssl  16:42   0:05 dotnet /app/NextPVRServer.dll
root         188  0.0  0.0  19572  3436 pts/1    Ss   16:47   0:00 /bin/bash
root         341  0.0  0.0  34408  2860 pts/1    R+   16:51   0:00 ps aux
root@local-nextpvr:/share/fs/multimedia# ls
@Recently-Snapshot  @Recycle  Audio  Books  Buffer  Pictures  Samples  Video
root@local-nextpvr:/share/fs/multimedia# cd Buffer/
root@local-nextpvr:/share/fs/multimedia/Buffer# echo >live-ITV2-1-1.ts hello
root@local-nextpvr:/share/fs/multimedia/Buffer# ls
live-ITV2-1-1.ts

My question is, if the container user can write to the folder, but NPVR cannot, what is the problem, or what can I do to get more information as I have run out of ideas on how to troubleshoot

Thanks

Paul
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,837
Threads: 954
Joined: May 2006
#2
2022-08-14, 08:02 PM
Upload the zipped logs that NextPVR provides and we can have look for possible issues.

Running a bash shell may not be the same user the container starts with, that that is a startup parameter.

Martin
Sibiu
Offline

Junior Member

UK
Posts: 4
Threads: 1
Joined: Dec 2020
#3
2022-08-14, 08:08 PM
The most recent logs as requested

Regards

Paul


Attached Files
.zip   logs-20220814-2006.zip (Size: 173.34 KB / Downloads: 1)
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,837
Threads: 954
Joined: May 2006
#4
2022-08-14, 08:35 PM (This post was last modified: 2022-08-14, 08:40 PM by mvallevand.)
Thanks for the logs I don't see any issue either, except NextPVR could trap the error better. We don't see that your folder has read attributes.

Maybe try running the NextPVR docker with another username?

Martin
mkomko
Offline

Junior Member

Austria
Posts: 5
Threads: 1
Joined: Sep 2023
#5
2023-09-18, 08:30 PM
@Sibiu: Did you ever find a solution? I have the same problem.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,837
Threads: 954
Joined: May 2006
#6
2023-09-18, 08:44 PM
(2023-09-18, 08:30 PM)mkomko Wrote: @Sibiu: Did you ever find a solution? I have the same problem.

No point in asking others since this is not a NextPVR problem, recording and live TV works.   Start by uploading the zipped logs for us, the problem will be how you name mount the folders.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to live stream Atanoman 4 349 2025-01-04, 07:22 PM
Last Post: Atanoman
  Unable to Scan for New Channels pkscout 5 904 2023-08-11, 01:24 AM
Last Post: mvallevand
Wink Shared buffer between clients danny.bcn87 3 724 2023-02-10, 12:55 AM
Last Post: mvallevand
  Unable to Add IPTV XMLTV (m3u works fine) add45 34 8,163 2021-05-25, 03:10 PM
Last Post: add45
  SOLVED: Unable to start HDHomerun Stream tredman 3 1,834 2021-01-18, 01:01 PM
Last Post: tredman
  Unable to detect HDHR Connect Quatro daphatty 10 3,299 2020-07-23, 12:58 AM
Last Post: daphatty
  Unable to get to login page after channel refresh steveh 4 1,776 2020-05-23, 03:41 PM
Last Post: steveh

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

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

Linear Mode
Threaded Mode