Can't seem to get the gateway to work! [SOLVED]
-
Hi guys, new to all this, tried to use this on my 4k stick but noticed it needs the gateway. Done all the installation as it should and made it a service etc etc. Got the tags @tunnel and @proxy as advised in another forum post. The cameras try to connect but keep seeing this and it fails. Am I missing something?
Flouren DVR
------------------------------------------------- MONOCLE RUNTIME ENVIRONMENT ------------------------------------------------- VERSION = 0.0.4 OS/ARCH = win32\x64 PROCESS = monocle-gateway (PID=708) TIMESTAMP = 2019-07-22T02:25:01.729Z ------------------------------------------------- MONOCLE GATEWAY SERVICE (Version: 0.0.4) ------------------------------------------------- [Monocle Starting] [Monocle Connecting] [Monocle Started] [RTSP Server Starting] [RTSP Server Listening] 0.0.0.0:8555 (RTSP) [RTSP Server Listening] 0.0.0.0:443 (RTSP-TLS) [RTSP Proxy Started] (PID=11760) [RTSP Server Listening] 0.0.0.0:8554 (PROXY) [RTSP Server Started] 2019-07-22T02:25:01.766Z [ERROR] [PROXY SERVER ERROR] Error: listen EADDRINUSE 0.0.0.0:8555 [ '[PROXY SERVER ERROR]', { Error: listen EADDRINUSE 0.0.0.0:8555 at Object._errnoException (util.js:1031:13) at _exceptionWithHostPort (util.js:1052:20) at Server.setupListenHandle [as _listen2] (net.js:1367:14) at listenInCluster (net.js:1408:12) at doListen (net.js:1523:7) at _combinedTickCallback (internal/process/next_tick.js:141:11) at process._tickCallback (internal/process/next_tick.js:180:9) at Function.Module.runMain (pkg/prelude/bootstrap.js:1299:13) at startup (bootstrap_node.js:227:16) at bootstrap_node.js:649:3 errno: 'EADDRINUSE', code: 'EADDRINUSE', syscall: 'listen', address: '0.0.0.0', port: 8555 } ] 2019-07-22T02:25:01.770Z [ERROR] [RTSP Server Error] listen EADDRINUSE 0.0.0.0:8555 [ '[RTSP Server Error]', 'listen EADDRINUSE 0.0.0.0:8555' ] 2019-07-22T02:25:01.770Z [ERROR] [PROXY SERVER ERROR] Error: listen EADDRINUSE 0.0.0.0:443 [ '[PROXY SERVER ERROR]', { Error: listen EADDRINUSE 0.0.0.0:443 at Object._errnoException (util.js:1031:13) at _exceptionWithHostPort (util.js:1052:20) at Server.setupListenHandle [as _listen2] (net.js:1367:14) at listenInCluster (net.js:1408:12) at doListen (net.js:1523:7) at _combinedTickCallback (internal/process/next_tick.js:141:11) at process._tickCallback (internal/process/next_tick.js:180:9) at Function.Module.runMain (pkg/prelude/bootstrap.js:1299:13) at startup (bootstrap_node.js:227:16) at bootstrap_node.js:649:3 errno: 'EADDRINUSE', code: 'EADDRINUSE', syscall: 'listen', address: '0.0.0.0', port: 443 } ] 2019-07-22T02:25:01.771Z [ERROR] [RTSP Server Error] listen EADDRINUSE 0.0.0.0:443 [ '[RTSP Server Error]', 'listen EADDRINUSE 0.0.0.0:443' ] [Monocle Connected] [RTSP Server Registered]
------------------------------------------------- INITIALIZE RTSP STREAM: Car ------------------------------------------------- - NAME : Car - LABEL : PRIMARY - URL : rtsp://192.168.5.10:554/user=admin_password=_channel=1_stream=0.sdp?real_stream - UUID : STREAM:0966d133-0c43-403f-b292-ea9dc061b8fd - SESS : 63e3f751-b455-480f-81cc-633372dc8eca - MODIF : Mon Jul 22 2019 03:19:25 GMT+0100 (GMT Daylight Time) - TAGS : @proxy,@tunnel ------------------------------------------------- 2019-07-22T02:29:48.046Z [INFO] [192.168.5.213:55604 <SJNjJszMr>] RTSP CLIENT SOCKET CONNECTED 2019-07-22T02:29:48.173Z [INFO] [192.168.5.213:55604 <SJNjJszMr>] RTSP CLIENT ATTACHED TO STREAM: Car (STREAM:0966d133-0c43-403f-b292-ea9dc061b8fd) 2019-07-22T02:29:48.185Z [INFO] [192.168.5.213:55604 <SJNjJszMr>] RTSP ENDPOINT SOCKET CONNECTED {192.168.5.10:554} 2019-07-22T02:29:48.197Z [DEBUG] [192.168.5.213:55604 <SJNjJszMr>] [CLIENT REQUEST] --> [DESCRIBE] rtsp://0116e614-8bc3-46f4-8ec4-5078c43f42d4.mproxy.io:443/STREAM:0966d133-0c43-403f-b292-ea9dc061b8fd?session=63e3f751-b455-480f-81cc-633372dc8eca 2019-07-22T02:29:48.203Z [TRACE] [192.168.5.213:55604 <SJNjJszMr>] [CLIENT REQUEST] --> [HEADERS] { "accept": "application/sdp", "user-agent": "Fire OS/6.0 stagefright/1.2 (Linux;Android 7.1.2)", "cseq": "1" } 2019-07-22T02:29:48.211Z [DEBUG] [192.168.5.213:55604 <SJNjJszMr>] [ENDPOINT REQUEST] --> [DESCRIBE] rtsp://192.168.5.10:554/user=admin_password=_channel=1_stream=0.sdp?real_stream 2019-07-22T02:29:48.215Z [TRACE] [192.168.5.213:55604 <SJNjJszMr>] [ENDPOINT REQUEST] --> [HEADERS] { "accept": "application/sdp", "user-agent": "Fire OS/6.0 stagefright/1.2 (Linux;Android 7.1.2)", "cseq": "1" } 2019-07-22T02:30:18.172Z [WARN] [192.168.5.213:55604 <SJNjJszMr>] RTSP CLIENT SOCKET TIMEOUT 2019-07-22T02:30:18.219Z [WARN] [192.168.5.213:55604 <SJNjJszMr>] RTSP ENDPOINT SOCKET TIMEOUT [192.168.5.213:55604 <SJNjJszMr>] 2019-07-22T02:30:18.224Z [INFO] [192.168.5.213:55604 <SJNjJszMr>] RTSP ENDPOINT SOCKET CLOSED [192.168.5.213:55604 <SJNjJszMr>] 2019-07-22T02:30:18.371Z [INFO] [192.168.5.213:55604 <SJNjJszMr>] RTSP CLIENT SOCKET CLOSED 2019-07-22T02:30:18.373Z [INFO] [192.168.5.213:55604 <SJNjJszMr>] RTSP CLIENT DETACHED FROM STREAM: Car (STREAM:0966d133-0c43-403f-b292-ea9dc061b8fd)
Thank you!
-
Don’t use
@proxy
and@tunnel
together. Just use one. I think if you use both@tunnel
will win and that will be used.For Flouren, try using the following two tags:
@proxy, @noaudo
to start testing with.Thanks, Robert
-
@Monocle said in Can't seem to get the gateway to work!:
@proxy, @noaudo
I’ll give that a whirl now, :D
-
@Monocle fire TV flashes like a mad man and seem to have the same errors on the command line.
------------------------------------------------- INITIALIZE RTSP STREAM: Car ------------------------------------------------- - NAME : Car - LABEL : PRIMARY - URL : rtsp://192.168.5.10:554/user=admin_password=_channel=1_stream=0.sdp?real_stream - UUID : STREAM:0966d133-0c43-403f-b292-ea9dc061b8fd - SESS : d1a2baeb-0818-4961-af28-48f3e1736674 - MODIF : Mon Jul 22 2019 03:44:39 GMT+0100 (GMT Daylight Time) - TAGS : @noaudio,@proxy ------------------------------------------------- 2019-07-22T02:45:51.822Z [INFO] [192.168.5.213:55690 <rJOD7szfH>] RTSP CLIENT SOCKET CONNECTED 2019-07-22T02:45:51.947Z [INFO] [192.168.5.213:55690 <rJOD7szfH>] RTSP CLIENT ATTACHED TO STREAM: Car (STREAM:0966d133-0c43-403f-b292-ea9dc061b8fd) 2019-07-22T02:45:51.953Z [INFO] [192.168.5.213:55690 <rJOD7szfH>] RTSP ENDPOINT SOCKET CONNECTED {127.0.0.1:8554} 2019-07-22T02:45:51.956Z [DEBUG] [192.168.5.213:55690 <rJOD7szfH>] [CLIENT REQUEST] --> [DESCRIBE] rtsp://0116e614-8bc3-46f4-8ec4-5078c43f42d4.mproxy.io:443/STREAM:0966d133-0c43-403f-b292-ea9dc061b8fd?session=d1a2baeb-0818-4961-af28-48f3e1736674 2019-07-22T02:45:51.959Z [TRACE] [192.168.5.213:55690 <rJOD7szfH>] [CLIENT REQUEST] --> [HEADERS] { "accept": "application/sdp", "user-agent": "Fire OS/6.0 stagefright/1.2 (Linux;Android 7.1.2)", "cseq": "1" } 2019-07-22T02:45:51.966Z [DEBUG] [192.168.5.213:55690 <rJOD7szfH>] [ENDPOINT REQUEST] --> [DESCRIBE] rtsp://0116e614-8bc3-46f4-8ec4-5078c43f42d4.mproxy.io:443/STREAM:0966d133-0c43-403f-b292-ea9dc061b8fd 2019-07-22T02:45:51.969Z [TRACE] [192.168.5.213:55690 <rJOD7szfH>] [ENDPOINT REQUEST] --> [HEADERS] { "accept": "application/sdp", "user-agent": "Fire OS/6.0 stagefright/1.2 (Linux;Android 7.1.2)", "cseq": "1" } 2019-07-22T02:45:51.977Z [DEBUG] [192.168.5.213:55690 <rJOD7szfH>] [ENDPOINT RESPONSE] <-- [200 (OK)] <cseq=1> (session=undefined) 2019-07-22T02:45:51.979Z [TRACE] [192.168.5.213:55690 <rJOD7szfH>] [ENDPOINT RESPONSE] <-- [HEADERS] { "cseq": "1", "date": "Mon, Jul 22 2019 02:45:51 GMT", "content-base": "rtsp://127.0.0.1:8554/STREAM:0966d133-0c43-403f-b292-ea9dc061b8fd/", "content-type": "application/sdp", "content-length": "549" } 2019-07-22T02:45:51.982Z [TRACE] [192.168.5.213:55690 <rJOD7szfH>] [ENDPOINT RESPONSE] <-- [BODY] v=0 o=- 1563763488377879 1 IN IP4 192.168.5.31 s=LIVE555 Streaming Media v2018.04.25 i=LIVE555 Streaming Media v2018.04.25 t=0 0 a=tool:LIVE555 Streaming Media v2018.04.25 a=type:broadcast a=control:* a=range:npt=0- a=x-qt-text-nam:LIVE555 Streaming Media v2018.04.25 a=x-qt-text-inf:LIVE555 Streaming Media v2018.04.25 m=video 0 RTP/AVP 96 c=IN IP4 0.0.0.0 b=AS:50 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1;profile-level-id=640020;sprop-parameter-sets=Z2QAIK2EAQwgCGEAQwgCGEAQwgCEO1B2BE/KgA==,aO48sA== a=control:track1 2019-07-22T02:45:51.993Z [INFO] [192.168.5.213:55690 <rJOD7szfH>] RTSP ENDPOINT AUTHENTICATION SUCCESSFUL: NONE 2019-07-22T02:45:51.998Z [DEBUG] [192.168.5.213:55690 <rJOD7szfH>] [CLIENT RESPONSE] <-- [200 (OK)] <cseq=1> (session=undefined) 2019-07-22T02:45:52.001Z [TRACE] [192.168.5.213:55690 <rJOD7szfH>] [CLIENT RESPONSE] <-- [HEADERS] { "cseq": "1", "date": "Mon, Jul 22 2019 02:45:51 GMT", "content-base": "rtsp://127.0.0.1:8554/STREAM:0966d133-0c43-403f-b292-ea9dc061b8fd/", "content-type": "application/sdp", "content-length": "549" } 2019-07-22T02:45:52.005Z [TRACE] [192.168.5.213:55690 <rJOD7szfH>] [CLIENT RESPONSE] <-- [BODY] v=0 o=- 1563763488377879 1 IN IP4 192.168.5.31 s=LIVE555 Streaming Media v2018.04.25 i=LIVE555 Streaming Media v2018.04.25 t=0 0 a=control:* a=tool:LIVE555 Streaming Media v2018.04.25 a=type:broadcast a=range:npt=0- a=x-qt-text-nam:LIVE555 Streaming Media v2018.04.25 a=x-qt-text-inf:LIVE555 Streaming Media v2018.04.25 m=video 0 RTP/AVP 96 c=IN IP4 0.0.0.0 b=AS:50 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1;profile-level-id=640020;sprop-parameter-sets=Z2QAIK2EAQwgCGEAQwgCGEAQwgCEO1B2BE/KgA==,aO48sA== a=control:track1 2019-07-22T02:45:52.208Z [INFO] [192.168.5.213:55690 <rJOD7szfH>] RTSP CLIENT SOCKET CLOSED 2019-07-22T02:45:52.211Z [INFO] [192.168.5.213:55690 <rJOD7szfH>] RTSP CLIENT DETACHED FROM STREAM: Car (STREAM:0966d133-0c43-403f-b292-ea9dc061b8fd) 2019-07-22T02:45:52.216Z [INFO] [192.168.5.213:55690 <rJOD7szfH>] RTSP ENDPOINT SOCKET CLOSED [192.168.5.213:55690 <rJOD7szfH>]
-
So the Monocle system and gateway are working properly – so you have everything setup correctly. What is happening in this case (based on the logs you provided) is that the Alexa device is making a connection to the IP camera (via the gateway) and requesting the streaming descriptor (the RTSP DESCRIBE request). The IP camera is properly returning the descriptor (also known as SDP) which includes all the details about the camera stream and audio/video channels available in the stream. At this point in the log we can see that the Alexa device is abruptly disconnecting from the gateway/IP camera. So there is something in the descriptor that Alexa does not like or allow. Sadly there is not an easy way to determine what it is.
So the next steps are a bit of trial and error.
Keep your existing tags and add the following
@ntpnow
. Go ahead and test. This is pretty much a shot in the dark, but this will slightly change the descriptor. This is what is required for Reolink branded cameras. I don’t expect it to work in this case, but it’s worth a try.Next if that did not work, remove
@ntpnow
and replace with@fakefmtp
. This will alter the signature of the H.264 encoding settings to a known working signature. Let see if this gets any further. Sometimes lying to Alexa will get the stream working.Thanks, Robert
-
@Monocle said in Can't seem to get the gateway to work!:
@fakefmtp
You are a star, @ntpnow didn’t work, so done the next step and added “@fakefmtp” works now with no issue. :D So with my other cameras do I just add all the tags (copy and paste) ?
-
Glad to hear it’s working for this NVR/DVR. We plan on digging into issues like this and hopefully provide better alternatives in the future to handle cases like this – but for now just lying to the Alexa device seems to work ok. You may also find that changing H.264 profiles or enabling/disabling H.264+ settings via the camera’s own settings could eliminate the need to use
@fakefmtp
it just a bunch of trial and error.Yes, just copy the same tags for each camera config in the Monocle Web Portal that use the same type of camera, NVR or additional camera feeds from the same NVR/DVR.
Thanks, Robert
-
@monocle said in Can't seem to get the gateway to work! [SOLVED]:
where am i wrong?
MONOCLE RUNTIME ENVIRONMENT
VERSION = 0.0.4
OS/ARCH = win32\x64
PROCESS = monocle-gateway (PID=2836)
TIMESTAMP = 2022-02-14T15:11:16.257Z
MONOCLE GATEWAY SERVICE (Version: 0.0.4)
[Monocle Starting]
[Monocle Connecting]
[Monocle Started]
[RTSP Server Starting]
[RTSP Server Listening] 0.0.0.0:8555 (RTSP)
[RTSP Server Listening] 0.0.0.0:443 (RTSP-TLS)
[RTSP Proxy Started] (PID=9692)
[RTSP Server Listening] 0.0.0.0:8554 (PROXY)
[RTSP Server Started]
2022-02-14T15:11:16.304Z [ERROR] [PROXY SERVER ERROR] Error: listen EADDRINUSE 0.0.0.0:8555
[ ‘[PROXY SERVER ERROR]’,
{ Error: listen EADDRINUSE 0.0.0.0:8555
at Object._errnoException (util.js:1031:13)
at _exceptionWithHostPort (util.js:1052:20)
at Server.setupListenHandle [as _listen2] (net.js:1367:14)
at listenInCluster (net.js:1408:12)
at doListen (net.js:1523:7)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (pkg/prelude/bootstrap.js:1299:13)
at startup (bootstrap_node.js:227:16)
at bootstrap_node.js:649:3
errno: ‘EADDRINUSE’,
code: ‘EADDRINUSE’,
syscall: ‘listen’,
address: ‘0.0.0.0’,
port: 8555 } ]
2022-02-14T15:11:16.320Z [ERROR] [RTSP Server Error] listen EADDRINUSE 0.0.0.0:8555
[ ‘[RTSP Server Error]’, ‘listen EADDRINUSE 0.0.0.0:8555’ ]
2022-02-14T15:11:16.320Z [ERROR] [PROXY SERVER ERROR] Error: listen EADDRINUSE 0.0.0.0:443
[ ‘[PROXY SERVER ERROR]’,
{ Error: listen EADDRINUSE 0.0.0.0:443
at Object._errnoException (util.js:1031:13)
at _exceptionWithHostPort (util.js:1052:20)
at Server.setupListenHandle [as _listen2] (net.js:1367:14)
at listenInCluster (net.js:1408:12)
at doListen (net.js:1523:7)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (pkg/prelude/bootstrap.js:1299:13)
at startup (bootstrap_node.js:227:16)
at bootstrap_node.js:649:3
errno: ‘EADDRINUSE’,
code: ‘EADDRINUSE’,
syscall: ‘listen’,
address: ‘0.0.0.0’,
port: 443 } ]
2022-02-14T15:11:16.320Z [ERROR] [RTSP Server Error] listen EADDRINUSE 0.0.0.0:443
[ ‘[RTSP Server Error]’, ‘listen EADDRINUSE 0.0.0.0:443’ ]
[Monocle Connected]
[RTSP Server Registered]
MONOCLE RTSP SERVICE - INITIALIZED
FQDN = 422ec86d-ec56-4595-8946-55b56e59a220.mproxy.io
HOST = 192.168.56.1
PORT = 443
INITIALIZE RTSP STREAM: camera da rua
- NAME : camera da rua
- LABEL : PRIMARY
- URL : rtsp://192.168.0.153:554/cam/realmonitor?channel=1&subtype=0
- UUID : STREAM:2dfbdabd-003d-48fc-8ca7-4e32e6052440
- SESS : dd30da45-478b-4b46-af0d-098ab62f0cb7
- MODIF : Mon Feb 14 2022 12:12:19 GMT-0300 (Hora oficial do Brasil)
- TAGS : @fakefmtp,@proxy
RTSP STREAM MODIFIED: camera da rua
Any existing RTSP steams will be shut down
and a new stream instance will be registered.2022-02-14T15:12:34.223Z [DEBUG] <RTSP-PROXY> [REQUEST] --> [DEREGISTER] rtsp://192.168.0.153:554/cam/realmonitor?channel=1&subtype=0
2022-02-14T15:12:34.223Z [TRACE] <RTSP-PROXY> [REQUEST] --> [HEADERS] {
“cseq”: “1”,
“transport”: “reuse_connection=0;preferred_delivery_protocol=udp;proxy_url_suffix=STREAM:2dfbdabd-003d-48fc-8ca7-4e32e6052440”
}
2022-02-14T15:12:34.223Z [DEBUG] <RTSP-PROXY> [RESPONSE] <-- [200 (OK)] <cseq=1> (session=undefined)
2022-02-14T15:12:34.223Z [TRACE] <RTSP-PROXY> [RESPONSE] <-- [HEADERS] {
“cseq”: “1”,
“date”: “Mon, Feb 14 2022 15:12:34 GMT”
}
2022-02-14T15:12:34.223Z [INFO] [RTSP PROXY] REGISTERING STREAM [camera da rua/PRIMARY]; (STREAM:2dfbdabd-003d-48fc-8ca7-4e32e6052440)
2022-02-14T15:12:34.239Z [DEBUG] <RTSP-PROXY> [REQUEST] --> [REGISTER] rtsp://192.168.0.153:554/cam/realmonitor?channel=1&subtype=0
2022-02-14T15:12:34.239Z [TRACE] <RTSP-PROXY> [REQUEST] --> [HEADERS] {
“cseq”: “1”,
“transport”: “reuse_connection=0;preferred_delivery_protocol=udp;proxy_url_suffix=STREAM:2dfbdabd-003d-48fc-8ca7-4e32e6052440;username=admin;password=r2411l0604”
}
2022-02-14T15:12:34.239Z [DEBUG] <RTSP-PROXY> [RESPONSE] <-- [200 (OK)] <cseq=1> (session=undefined)
2022-02-14T15:12:34.239Z [TRACE] <RTSP-PROXY> [RESPONSE] <-- [HEADERS] {
“cseq”: “1”,
“date”: “Mon, Feb 14 2022 15:12:34 GMT”
}
2022-02-14T15:13:16.294Z [INFO] [RTSP PROXY] STREAM [camera da rua/PRIMARY] WILL BE DE-REGISTERED IN 4 MINUTES
2022-02-14T15:14:16.329Z [INFO] [RTSP PROXY] STREAM [camera da rua/PRIMARY] WILL BE DE-REGISTERED IN 3 MINUTES