Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. #63

Open
sinhngoc2008 opened this issue Sep 9, 2020 · 3 comments

Comments

@sinhngoc2008
Copy link

I'm using ShartRTSP to connect to HIPCAM camera by rtsp protocol.
The handshake of rtsp is so well and I receive packet from rtsp server. But around 1 or 2 minutes later SharpRTSP cannot get data from network.
I try to print out the debug message and see that the SharpRTSP send GET_PARAMETER every timeout / 2 interval. But without OK message response , SharpRTSP continue to send GET_PARAMETER again and this cause the problem.
Please take a look the debug message in the attached file.
rtspinfo.txt

@ngraziano
Copy link
Owner

Hello,
Some camera do not want GET_PARAMETER but instead need OPTION for keep alive.

If you are using the sample code in RtspClientExample/RTSPClient.cs, to use OPTION for keep alive you can remove the code from line 1050 to 1057 by the code from line 1061 to 1066. Or you can remove all the keep alive for try.

Another way to check is to use wireshark to capture an exchange with VLC to see what are the differences (if VLC is working ok).

@RogerHardiman
Copy link
Collaborator

I think you have found an issue in Sharp RTSP

NewCommand: Rtsp.Messages.RtspResponse
Headers: CSeq: 8
Headers: Server: Hipcam RealServer/V1.0
Headers: Session: eKoPfUYGRpb
Headers: 
The thread 0x3d18 has exited with code 0 (0x0).

When the camera sends a reply to the GET_PARAMETER message, there is an empty Header.
This is probably poor data from the camera but it is possible SharpRTSP does not handle the empty Header properly.

Is it possible to get access to the camera please and then I can test some things from here.

Thanks
Roger

@RogerHardiman RogerHardiman pinned this issue Oct 7, 2020
@sinhngoc2008
Copy link
Author

I'm sorry, this is a private camera of a company, so I cannot public the url to you.
the thing is Header of GET_PARAMETER response always null from starting, but it still keep the connection up to 2 minutes.
I don't know why it disconnect in only 2 minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants