pullStream will get stuck on ‘connecting’ on DNS error
I’m trying out multiple edge servers pulling from a common source server, and I’ve noticed that sometimes, some streams on some edges will no longer be active, even though they should be ‘persistent’ as defined by pullStream
This is the relevant config entry:
{
"audioCodecBytes": "",
"configId": 16,
"emulateUserAgent": "EvoStream Media Server (www.evostream.com) player",
"forceTcp": true,
"httpProxy": "",
"isAudio": true,
"keepAlive": true,
"localStreamName": "awesomestream",
"operationType": 1,
"pageUrl": "",
"ppsBytes": "",
"rangeEnd": -1,
"rangeStart": -2,
"rtcpDetectionInterval": 10,
"sendRenewStream": false,
"spsBytes": "",
"ssmIp": "",
"status": {
"current": {
"code": 1,
"description": "Connecting",
"timestamp": 1421569197,
"uniqueStreamId": 0
},
"previous": {
"code": 4,
"description": "Disconnected",
"timestamp": 1421569156,
"uniqueStreamId": 0
}
},
"swfUrl": "",
"tcUrl": "",
"tos": 256,
"ttl": 256,
"uri": "rtmp://hiddensecretrtmphost.net/awesomestream"
}
I’ve grepped the log and seen this:
1421569197:0:/common/src/utils/misc/uri.cpp:354:FromString:Unable to resolve host: hiddensecretrtmphost.net
1421569197:0:/thelib/src/application/baseclientapplication.cpp:371:PullExternalStream:Invalid URI: <STR name="">rtmp://hiddensecretrtmphost.net/awesomestream</STR>
So i guess there was a network/DNS hiccup and that DNS query failed THAT ONE TIME. Since then it has NOT TRIED TO RECONNECT, probably because whatever error handling you’re doing to DNS failures marked the URI as completely invalid, and therefore it will not try again.
This is a serious problem, as it means that someone has to constantly monitor the streams on each of the edges, and if they stop being active while the stream on the source server is fine (because the edge is stuck in "connecting" state), they need to remove and recreate the config entry for them to go again.
EvoStream Media Server (www.evostream.com) version 1.6.6 build 3511 - Gladiator - (built for Debian-6.0.5-x86_64 on 2015-01-17T03:29:24.000)