[Live-devel] RTSPServer disconnects client session in incomingRequestHandler1

Ralf Globisch RGlobisch at csir.co.za
Wed Oct 29 04:35:54 PDT 2008


Hi,
I've written a RTSP Server using the liveMedia library which streams live data from a webcam unicast over TCP.
The server runs on a Linux box.

When receiving the stream the server randomly disconnects the openRtsp client (sitting on another box).
I've traced it to line 324 in RTSPServer.cpp to the RTSPServer::RTSPClientSession::incomingRequestHandler1() method. 
The debug printf looks something like 

RTSPClientSession[0x81716b0]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x81716b0]::incomingRequestHandler1() read 59 bytes:
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
schedule(2.887354->1225277965.132946)
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
RTSPClientSession[0x81716b0]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x81716b0]::incomingRequestHandler1() read 59 bytes:
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sending REPORT
sending RTCP packet
 80c80006 91c3678d ccb2c08d 223443d4 9e962a26 0000046c 00297480 81ca0006 91c3678d 010f7267 6c6f6269 7363682d 6c647330 31000000
sendRTPOverTCP: 56 bytes over channel 1 (socket 14)
sendRTPOverTCP: completed
schedule(3.643940->1225277968.778138)
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
RTSPClientSession[0x81716b0]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x81716b0]::incomingRequestHandler1() read 59 bytes:
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
sendRTPOverTCP: 2412 bytes over channel 0 (socket 14)
sendRTPOverTCP: completed
RTSPClientSession[0x81716b0]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x81716b0]::incomingRequestHandler1() read 39 bytes (of 39); terminating connection!
RTCPInstance[0x8177a08]::~RTCPInstance()
sending BYE
sending RTCP packet

Intercepting the communication using Wireshark reveals that the client periodically sends packets (I'm guessing RTCP RR) to the server which alternate between 60 bytes and 56 bytes.
The odd thing is that the last packet sent to the server which causes the server to disconnect the client has a 56 byte size according to Wireshark and a 39 bytes size according to the RTSPClientSession output.
The above output was taken whilst streaming a live audio session. However the same occurs with H263 video, and mixed audio + video session, etc all be it at different times:
1) in the video + audio session the client gets consistently disconnected  at about 170 seconds into the stream.
2) in a video only stream the client gets consistently disconnected around 340 seconds

Further observations:
1) The first client session never gets disconnected, only the sessions following. (The client is always connecting from the same IP)
2) It only occurs when streaming over TCP
3) It happens consistently at the "same time"

Please does anyone have any advice on how to debug this further?

Best regards,
Ralf



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.



More information about the live-devel mailing list