ispyagentdvr-docker
ispyagentdvr-docker copied to clipboard
OpenCV Error on startup
Affected Version v3.3.7.0
Describe the bug When running the docker container and restarting the host platform, the container fails to start with the following error:
agentdvr | Unhandled exception. Emgu.CV.Util.CvException: OpenCV: key_ != -1 && "Can't fetch data from terminated TLS container."
agentdvr | at Emgu.CV.CvInvoke.CvErrorHandler(Int32 status, IntPtr funcName, IntPtr errMsg, IntPtr fileName, Int32 line, IntPtr userData)
agentdvr | at Emgu.CV.CvInvoke.cveResize(IntPtr src, IntPtr dst, Size& dsize, Double fx, Double fy, Inter interpolation)
agentdvr | at Emgu.CV.CvInvoke.Resize(IInputArray src, IOutputArray dst, Size dsize, Double fx, Double fy, Inter interpolation)
agentdvr | at CoreLogic.Compositors.Compositor.FillFrame(Mat frame, Rectangle rectObj, Rectangle containerRect, IAgentControl control, String message, Boolean modified)
agentdvr | at CoreLogic.Compositors.Compositor._NewFramePostProcessHandler(Object sender, NewFrameEventArgs e)
agentdvr | Fatal error. Internal CLR error. (0x80131506)
agentdvr | at Emgu.CV.CvInvoke.cveResize(IntPtr, IntPtr, System.Drawing.Size ByRef, Double, Double, Emgu.CV.CvEnum.Inter)
agentdvr | at Emgu.CV.CvInvoke.cveResize(IntPtr, IntPtr, System.Drawing.Size ByRef, Double, Double, Emgu.CV.CvEnum.Inter)
agentdvr | at Emgu.CV.CvInvoke.Resize(Emgu.CV.IInputArray, Emgu.CV.IOutputArray, System.Drawing.Size, Double, Double, Emgu.CV.CvEnum.Inter)
agentdvr | at CoreLogic.Compositors.Compositor.FillFrame(Emgu.CV.Mat, System.Drawing.Rectangle, System.Drawing.Rectangle, CoreLogic.Objects.IAgentControl, System.String, Boolean)
agentdvr | at CoreLogic.Compositors.Compositor._NewFramePostProcessHandler(System.Object, CoreLogic.Sources.NewFrameEventArgs)
agentdvr | at CoreLogic.Objects.Camera.VideoSourceNewFrame(System.Object, CoreLogic.Sources.NewFrameEventArgs)
agentdvr | at CoreLogic.Sources.Combined.MediaStream.ReadFrames()
agentdvr | at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
agentdvr | at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
agentdvr | at System.Threading.ThreadHelper.ThreadStart()
agentdvr exited with code 143
Steps To Reproduce Steps to reproduce the behavior:
- Start the container
- Reboot the host os
Expected behavior Should start up
Reproduction rate 100%
Screenshots N/a
Host System Information (where ispy agent is running/hosted):
- OS: Ubuntu 20.04.1 LTS
Client System Information (device accessing the web portal, if applicable): N/A
Additional Information docker-compose file:
version: '3'
services:
agentdvr:
image: doitandbedone/ispyagentdvr:latest
container_name: agentdvr
volumes:
- /storage/config/:/agent/Media/XML/
- /storage/media/:/agent/Media/WebServerRoot/Media/
- /storage/commands:/agent/Commands/
ports:
- "80:8090"
- "3478:3478/udp"
- "50000-50010:50000-50010/udp"
Please use the report template:
Affected Version Found at top left "Server Menu" with a server/stack icon. A pop up will be opened, should be in bold letters to the right of your server name. [e.g. v3.0.0.0]
Describe the bug A clear and concise description of what the bug is.
Steps To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Reproduction rate How often does this happen in % [e.g. 100% or 50%]
Screenshots If applicable, add screenshots to help explain your problem.
Host System Information (where ispy agent is running/hosted):
- OS: [e.g. macOS Catalina 10.15.7, Windows 10, Ubuntu 20.04.1 LTS]
Client System Information (device accessing the web portal, if applicable):
- OS: [e.g. macOS Catalina 10.15.7, iOS 8.1, Windows 10, Android 10, Ubuntu 20.04.1 LTS]
- Browser [e.g. stock browser, safari, chrome]
- Browser Version [e.g. 86.0.4240.111 (Official Build) (x86_64)]
Additional Information Add any other information about the problem here. This could include configuration files, video/images that may be causing the issue.
googling "Can't fetch data from terminated TLS container." returns a few results about a bug in opencv but i can't see much more info about it other than someone commenting: "This is because it doesn’t have access to a desktop to render UI. " which Agent doesn't use - possibly you added a desktop source? need some info about what devices you added to it.
I've added the docker compose file in the description. I'm just running the latest version of the docker image.
When I start the container manually, it works fine. Only when I reboot the host OS and the container is autostarted, I get this error.
is there a way to delay-start it? possibly some dependent service hasn't started up in time.
Probably, but what service could this be? It is a single docker container which should be self-sufficient.
i have no idea sorry - the error mentions TLS so possibly something to do with the TLS daemon
@markdegrootnl If you need to sync up timing on container boot sequence, you may be able to use this: https://stackoverflow.com/questions/31746182/docker-compose-wait-for-container-x-before-starting-y
@ispysoftware Is OpenCV actually included or supported? I see Deppstack AI being supported in the list of features but not OpenCV.
@doitandbedone it's included/ built natively and packaged
Hmm. Then I'd like to know if this still an issue and I need to somehow enable, orchestrate something within the image.
On Mon, Sep 12, 2022, 5:47 PM sean tearney @.***> wrote:
@doitandbedone https://github.com/doitandbedone it's included/ built natively and packaged
— Reply to this email directly, view it on GitHub https://github.com/doitandbedone/ispyagentdvr-docker/issues/231#issuecomment-1244753653, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORTFNAPMYOU4O4KIUN3XJDV57FKFANCNFSM46HSSOYA . You are receiving this because you were mentioned.Message ID: @.***>
it's quite possibly fixed - everything has been rebuilt with newer libraries since this was logged
I see what would be the steps to test it? I'm curious on implementing automated testing on github+docker.
On Mon, Sep 12, 2022, 6:23 PM sean tearney @.***> wrote:
it's quite possibly fixed - everything has been rebuilt with newer libraries since this was logged
— Reply to this email directly, view it on GitHub https://github.com/doitandbedone/ispyagentdvr-docker/issues/231#issuecomment-1244785230, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORTFND4AUXPZ7FTXNN63WDV57JRPANCNFSM46HSSOYA . You are receiving this because you were mentioned.Message ID: @.***>