[Live-devel] Live555 Proxy Server - Stuck in endless loop
Erik Montnemery
erik at montnemery.com
Sun Apr 17 03:25:11 PDT 2016
>> By the way, I think there might be a bug in the handling of the
>> periodic liveness commands:
> No, the periodic ‘liveness’ commands are intended to test that the TCP connection is still alive, and also to compensate for a large number of servers that require these periodic commands in tell them that their client (in this case, the proxy server) is still alive. However, they were never intended to test for every possible way that a server might be buggy.
>
> If a server does not respond at all to an incoming “OPTIONS” command (and the RTSP TCP connection is still alive), then the server is badly broken. You need to repair (or replace) your server.
Thanks Ross!
It seems what happened was that the camera lost its Wi-Fi connection
before sending the OPTIONS response. The TCP connection remains alive,
but the send() of the "OPTIONS" response silently fails.
I modified the Wi-Fi reconnection script on the camera to restart the
RTSP-server when reconnecting to the AP to make sure the connection is
torn down to avoid any silent drop of TCP packages.
This seems to work, except that the RTSP Proxy does not reconnect to the server.
Clients are give the error message: RTSP/1.0 404 File Not Found, Or In
Incorrect Format
Log, 192.168.0.126 is in the process of reconnecting to the AP:
Apr 09 22:10:30 Sending request: OPTIONS
rtsp://192.168.0.126/ch0_0.h264/ RTSP/1.0
Apr 09 22:10:30 CSeq: 596
Apr 09 22:10:30 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:10:30 Session: 66334873
Apr 09 22:10:30
Apr 09 22:10:30
Apr 09 22:10:30 Received 154 new bytes of response data.
Apr 09 22:10:30 Received a complete OPTIONS response:
Apr 09 22:10:30 RTSP/1.0 200 OK
Apr 09 22:10:30 CSeq: 596
Apr 09 22:10:30 Date: Sat, Apr 09 2016 20:12:20 GMT
Apr 09 22:10:30 Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY,
PAUSE, GET_PARAMETER, SET_PARAMETER
Apr 09 22:10:30
Apr 09 22:10:30
Apr 09 22:10:33 Sending request: OPTIONS
rtsp://192.168.0.124/ch0_0.h264/ RTSP/1.0
Apr 09 22:10:33 CSeq: 231
Apr 09 22:10:33 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:10:33 Session: 66334873
Apr 09 22:10:33
Apr 09 22:10:33
Apr 09 22:10:33 Received 154 new bytes of response data.
Apr 09 22:10:33 Received a complete OPTIONS response:
Apr 09 22:10:33 RTSP/1.0 200 OK
Apr 09 22:10:33 CSeq: 231
Apr 09 22:10:33 Date: Sun, Apr 10 2016 04:12:23 GMT
Apr 09 22:10:33 Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY,
PAUSE, GET_PARAMETER, SET_PARAMETER
Apr 09 22:10:33
Apr 09 22:10:33
Apr 09 22:10:33 Sending request: OPTIONS
rtsp://192.168.0.125/ch0_0.h264/ RTSP/1.0
Apr 09 22:10:33 CSeq: 231
Apr 09 22:10:33 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:10:33 Session: 2AE8944A
Apr 09 22:10:33
Apr 09 22:10:33
Apr 09 22:10:33 Received 154 new bytes of response data.
Apr 09 22:10:33 Received a complete OPTIONS response:
Apr 09 22:10:33 RTSP/1.0 200 OK
Apr 09 22:10:33 CSeq: 231
Apr 09 22:10:33 Date: Sun, Apr 10 2016 04:12:23 GMT
Apr 09 22:10:33 Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY,
PAUSE, GET_PARAMETER, SET_PARAMETER
Apr 09 22:10:33
Apr 09 22:10:33
Apr 09 22:10:46 Sending request: OPTIONS
rtsp://192.168.0.123/ch0_0.h264/ RTSP/1.0
Apr 09 22:10:46 CSeq: 233
Apr 09 22:10:46 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:10:46 Session: 749ABB43
Apr 09 22:10:46
Apr 09 22:10:46
Apr 09 22:10:46 Received 154 new bytes of response data.
Apr 09 22:10:46 Received a complete OPTIONS response:
Apr 09 22:10:46 RTSP/1.0 200 OK
Apr 09 22:10:46 CSeq: 233
Apr 09 22:10:46 Date: Sun, Apr 10 2016 04:12:36 GMT
Apr 09 22:10:46 Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY,
PAUSE, GET_PARAMETER, SET_PARAMETER
Apr 09 22:10:46
Apr 09 22:10:46
Apr 09 22:10:51
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,H264]::closeStreamSource()
Apr 09 22:10:51 Sending request: PAUSE rtsp://192.168.0.126/ch0_0.h264/ RTSP/1.0
Apr 09 22:10:51 CSeq: 597
Apr 09 22:10:51 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:10:51 Session: 66334873
Apr 09 22:10:51
Apr 09 22:10:51
Apr 09 22:10:51
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,MPEG4-GENERIC]::closeStreamSource()
Apr 09 22:11:00 Sending request: OPTIONS
rtsp://192.168.0.126/ch0_0.h264/ RTSP/1.0
Apr 09 22:11:00 CSeq: 598
Apr 09 22:11:00 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:11:00 Session: 66334873
Apr 09 22:11:00
Apr 09 22:11:00
Apr 09 22:11:03 Sending request: OPTIONS
rtsp://192.168.0.124/ch0_0.h264/ RTSP/1.0
Apr 09 22:11:03 CSeq: 232
Apr 09 22:11:03 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:11:03 Session: 66334873
Apr 09 22:11:03
Apr 09 22:11:03
Apr 09 22:11:03 Received 154 new bytes of response data.
Apr 09 22:11:03 Received a complete OPTIONS response:
Apr 09 22:11:03 RTSP/1.0 200 OK
Apr 09 22:11:03 CSeq: 232
Apr 09 22:11:03 Date: Sun, Apr 10 2016 04:12:53 GMT
Apr 09 22:11:03 Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY,
PAUSE, GET_PARAMETER, SET_PARAMETER
Apr 09 22:11:03
Apr 09 22:11:03
Apr 09 22:11:03 Sending request: OPTIONS
rtsp://192.168.0.125/ch0_0.h264/ RTSP/1.0
Apr 09 22:11:03 CSeq: 232
Apr 09 22:11:03 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:11:03 Session: 2AE8944A
Apr 09 22:11:03
Apr 09 22:11:03
Apr 09 22:11:03 Received 154 new bytes of response data.
Apr 09 22:11:03 Received a complete OPTIONS response:
Apr 09 22:11:03 RTSP/1.0 200 OK
Apr 09 22:11:03 CSeq: 232
Apr 09 22:11:03 Date: Sun, Apr 10 2016 04:12:53 GMT
Apr 09 22:11:03 Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY,
PAUSE, GET_PARAMETER, SET_PARAMETER
Apr 09 22:11:03
Apr 09 22:11:03
Apr 09 22:11:11
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,H264]::createNewStreamSource(session
id 770418308)
Apr 09 22:11:11 Sending request: PLAY rtsp://192.168.0.126/ch0_0.h264/ RTSP/1.0
Apr 09 22:11:11 CSeq: 599
Apr 09 22:11:11 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:11:11 Session: 66334873
Apr 09 22:11:11
Apr 09 22:11:11
Apr 09 22:11:11
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,H264]::createNewRTPSink()
Apr 09 22:11:11
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,MPEG4-GENERIC]::createNewStreamSource(session
id 770418308)
Apr 09 22:11:11
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,MPEG4-GENERIC]::createNewRTPSink()
Apr 09 22:11:13 ProxyRTSPClient[rtsp://192.168.0.126/ch0_0.h264/]:
lost connection to server ('errno': 11). Resetting...
Apr 09 22:11:13 ProxyServerMediaSubsession[(NULL),H264]::closeStreamSource()
Apr 09 22:11:13
ProxyServerMediaSubsession[(NULL),MPEG4-GENERIC]::closeStreamSource()
Apr 09 22:11:13
ProxyServerMediaSubsession[(NULL),H264]::~ProxyServerMediaSubsession()
Apr 09 22:11:13
ProxyServerMediaSubsession[(NULL),MPEG4-GENERIC]::~ProxyServerMediaSubsession()
Apr 09 22:11:13 Opening connection to 192.168.0.126, port 554...
Apr 09 22:11:13 Enter ProxyRTSPClient::continueAfterPLAY, resultCode-115
Apr 09 22:11:13 ...remote connection opened
Apr 09 22:11:13 Sending request: DESCRIBE
rtsp://192.168.0.126/ch0_0.h264 RTSP/1.0
Apr 09 22:11:13 CSeq: 600
Apr 09 22:11:13 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:11:13 Accept: application/sdp
Apr 09 22:11:13
Apr 09 22:11:13
Apr 09 22:11:13 Sending request: OPTIONS
rtsp://192.168.0.126/ch0_0.h264 RTSP/1.0
Apr 09 22:11:13 CSeq: 601
Apr 09 22:11:13 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:11:13
Apr 09 22:11:13
Apr 09 22:11:13 Received 1024 new bytes of response data.
Apr 09 22:11:13 Received a complete DESCRIBE response:
Apr 09 22:11:13 RTSP/1.0 200 OK
Apr 09 22:11:13 CSeq: 600
Apr 09 22:11:13 Date: Sat, Apr 09 2016 20:13:04 GMT
Apr 09 22:11:13 Content-Base: rtsp://192.168.0.126/ch0_0.h264/
Apr 09 22:11:13 Content-Type: application/sdp
Apr 09 22:11:13 Content-Length: 857
Apr 09 22:11:13
Apr 09 22:11:13 v=0
Apr 09 22:11:13 o=- 1460232784210050 1 IN IP4 192.168.1.128
Apr 09 22:11:13 s=H.264 Program Stream, streamed by the LIVE555 Media Server
Apr 09 22:11:13 i=ch0_0.h264
Apr 09 22:11:13 t=0 0
Apr 09 22:11:13 a=DevVer:pusher2
Apr 09 22:11:13 a=GroupName:IPCAM
Apr 09 22:11:13 a=NickName:CIF
Apr 09 22:11:13 a=CfgSection:PROG_CHN0
Apr 09 22:11:13 a=tool:LIVE555 Streaming Media v2011.08.13
Apr 09 22:11:13 a=type:broadcast
Apr 09 22:11:13 a=control:*
Apr 09 22:11:13 a=range:npt=0-
Apr 09 22:11:13 a=x-qt-text-nam:H.264 Program Stream, streamed by the
LIVE555 Media Server
Apr 09 22:11:13 a=x-qt-text-inf:ch0_0.h264
Apr 09 22:11:13 m=video 0 RTP/AVP 96
Apr 09 22:11:13 c=IN IP4 0.0.0.0
Apr 09 22:11:13 b=AS:4000
Apr 09 22:11:13 a=rtpmap:96 H264/90000
Apr 09 22:11:13 a=control:trackID=1
Apr 09 22:11:13 a=fmtp:96
packetization-mode=1;profile-level-id=64001F;sprop-parameter-sets=Z2QAH6wrUCgC3IA=,aO48MA==
Apr 09 22:11:13 a=framesize:96 1280-720
Apr 09 22:11:13 a=cliprect:0,0,1280,720
Apr 09 22:11:13 m=audio 0 RTP/AVP 97
Apr 09 22:11:13 a=rtpmap:97 mpeg4-generic/8000/2
Apr 09 22:11:13 a=fmtp:97
streamtype=5;profile-level-id=1;cpresent=0;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1590
Apr 09 22:11:13 a=control:trackID=2
Apr 09 22:11:13
Apr 09 22:11:13
ProxyServerMediaSession[rtsp://192.168.0.126/ch0_0.h264/] added new
"ProxyServerMediaSubsession" for RTP/video/H264 track
Apr 09 22:11:13
ProxyServerMediaSession[rtsp://192.168.0.126/ch0_0.h264/] added new
"ProxyServerMediaSubsession" for RTP/audio/MPEG4-GENERIC track
Apr 09 22:11:16 Sending request: OPTIONS
rtsp://192.168.0.123/ch0_0.h264/ RTSP/1.0
Apr 09 22:11:16 CSeq: 234
Apr 09 22:11:16 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:11:16 Session: 749ABB43
Apr 09 22:11:16
Apr 09 22:11:16
Apr 09 22:11:16 Received 154 new bytes of response data.
Apr 09 22:11:16 Received a complete OPTIONS response:
Apr 09 22:11:16 RTSP/1.0 200 OK
Apr 09 22:11:16 CSeq: 234
Apr 09 22:11:16 Date: Sun, Apr 10 2016 04:13:06 GMT
Apr 09 22:11:16 Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY,
PAUSE, GET_PARAMETER, SET_PARAMETER
Apr 09 22:11:16
Apr 09 22:11:16
Apr 09 22:11:33 Sending request: OPTIONS
rtsp://192.168.0.124/ch0_0.h264/ RTSP/1.0
Apr 09 22:11:33 CSeq: 233
Apr 09 22:11:33 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:11:33 Session: 66334873
Apr 09 22:11:33
Apr 09 22:11:33
Apr 09 22:11:33 Received 154 new bytes of response data.
Apr 09 22:11:33 Received a complete OPTIONS response:
Apr 09 22:11:33 RTSP/1.0 200 OK
Apr 09 22:11:33 CSeq: 233
Apr 09 22:11:33 Date: Sun, Apr 10 2016 04:13:23 GMT
Apr 09 22:11:33 Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY,
PAUSE, GET_PARAMETER, SET_PARAMETER
Apr 09 22:11:33
Apr 09 22:11:33
Apr 09 22:11:33 Sending request: OPTIONS
rtsp://192.168.0.125/ch0_0.h264/ RTSP/1.0
Apr 09 22:11:33 CSeq: 233
Apr 09 22:11:33 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:11:33 Session: 2AE8944A
Apr 09 22:11:33
Apr 09 22:11:33
Apr 09 22:11:33 Received 154 new bytes of response data.
Apr 09 22:11:33 Received a complete OPTIONS response:
Apr 09 22:11:33 RTSP/1.0 200 OK
Apr 09 22:11:33 CSeq: 233
Apr 09 22:11:33 Date: Sun, Apr 10 2016 04:13:23 GMT
Apr 09 22:11:33 Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY,
PAUSE, GET_PARAMETER, SET_PARAMETER
Apr 09 22:11:33
Apr 09 22:11:33
Apr 09 22:11:41
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,H264]::createNewStreamSource(session
id 0)
Apr 09 22:11:41 Initiated:
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,H264]
Apr 09 22:11:41
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,H264]::createNewRTPSink()
Apr 09 22:11:41
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,H264]::closeStreamSource()
Apr 09 22:11:41
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,MPEG4-GENERIC]::createNewStreamSource(session
id 0)
Apr 09 22:11:41 Initiated:
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,MPEG4-GENERIC]
Apr 09 22:11:41
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,MPEG4-GENERIC]::createNewRTPSink()
Apr 09 22:11:41
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,MPEG4-GENERIC]::closeStreamSource()
Apr 09 22:11:41
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,H264]::createNewStreamSource(session
id 3166858091)
Apr 09 22:11:41 Sending request: SETUP
rtsp://192.168.0.126/ch0_0.h264/trackID=1 RTSP/1.0
Apr 09 22:11:41 CSeq: 602
Apr 09 22:11:41 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:11:41 Transport: RTP/AVP;unicast;client_port=46164-46165
Apr 09 22:11:41
Apr 09 22:11:41
Apr 09 22:11:41
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,H264]::createNewRTPSink()
Apr 09 22:11:41
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,MPEG4-GENERIC]::createNewStreamSource(session
id 3166858091)
Apr 09 22:11:41
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,MPEG4-GENERIC]::createNewRTPSink()
Apr 09 22:11:43 Sending request: OPTIONS
rtsp://192.168.0.126/ch0_0.h264/ RTSP/1.0
Apr 09 22:11:43 CSeq: 603
Apr 09 22:11:43 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:11:43
Apr 09 22:11:43
Apr 09 22:11:46
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,H264]::closeStreamSource()
Apr 09 22:11:46
ProxyServerMediaSubsession[rtsp://192.168.0.126/ch0_0.h264/,MPEG4-GENERIC]::closeStreamSource()
Apr 09 22:11:46 Sending request: OPTIONS
rtsp://192.168.0.123/ch0_0.h264/ RTSP/1.0
Apr 09 22:11:46 CSeq: 235
Apr 09 22:11:46 User-Agent: ProxyRTSPClient (LIVE555 Streaming Media
v2016.03.16)
Apr 09 22:11:46 Session: 749ABB43
Apr 09 22:11:46
Apr 09 22:11:46
Apr 09 22:11:46 Received 154 new bytes of response data.
Apr 09 22:11:46 Received a complete OPTIONS response:
Apr 09 22:11:46 RTSP/1.0 200 OK
Apr 09 22:11:46 CSeq: 235
Apr 09 22:11:46 Date: Sun, Apr 10 2016 04:13:36 GMT
Apr 09 22:11:46 Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY,
PAUSE, GET_PARAMETER, SET_PARAMETER
Apr 09 22:11:46
Apr 09 22:11:46
Apr 09 22:11:54
ProxyServerMediaSubsession[(NULL),H264]::~ProxyServerMediaSubsession()
Apr 09 22:11:54
ProxyServerMediaSubsession[(NULL),MPEG4-GENERIC]::~ProxyServerMediaSubsession()
Apr 09 22:11:54 Opening connection to 192.168.0.126, port 554...
More information about the live-devel
mailing list