RTSP Socket Timeout - Alexa Cant Connect to RTSP Stream



  • Attached logs, with Info masked.

    Starts to Load up in Alexa, but doesn’t actually display the screen. It says theres a problem connecting after several attempts. Tried on Fir TV Cube, and on an Echo Show 5.

    Have tried with all Tags ie Tunell, Proxy, Proxy-TCP, No-Audio. Tried every variation. Streams fine via VLC media Player. Can ping the IPV6 address internally fine. When ping Externally goes as far as

    traceroute to XXXXXX-b320-4551-819d-324049eed191.mproxy.io (192.168.0.25), 30 hops max, 60 byte packets
    
    			
    1	 	 	 	*	*	*
    
    			
    2	core22.fsn1.hetzner.com	213.239.245.241	de	0.268 ms	 	 
    core21.fsn1.hetzner.com	213.239.245.237	de	0.255 ms	 
    core22.fsn1.hetzner.com	213.239.245.241	de	0.268 ms
    
    			
    3	core11.nbg1.hetzner.com	213.239.224.9	de	2.587 ms	 	 
    core11.nbg1.hetzner.com	213.239.245.221	de	2.555 ms	 
    core12.nbg1.hetzner.com	213.239.224.13	de	2.697 ms
    
    			
    4	 	 	 	*	*	*
    
    			
    5	 	 	 	*	*	*
    
    			
    6	 	 	 	*	*	*
    
    			
    7	 	 	 	*	*	*
    
    			
    8	 	 	 	*	*	*
    

    No reply for 5 hops. Assuming we reached firewall.

    Gateway running as admin.

    Gateway Server Logs

    -------------------------------------------------
    MONOCLE RUNTIME ENVIRONMENT
    -------------------------------------------------
    VERSION   = 0.0.4
    OS/ARCH   = win32\ia32
    PROCESS   = monocle-gateway (PID=2088)
    TIMESTAMP = 2019-07-18T17:09:35.965Z
    
    -------------------------------------------------
    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=9328)
    [RTSP Server Listening] 0.0.0.0:8554 (PROXY)
    [RTSP Server Started]
    [Monocle Connected]
    [RTSP Server Registered]
    
    -------------------------------------------------
    MONOCLE RTSP SERVICE - INITIALIZED
    -------------------------------------------------
    FQDN = XXXXXX-b320-4551-819d-324049eed191.mproxy.io
    HOST = 192.168.0.25
    PORT = 443
    -------------------------------------------------
    
    
    -------------------------------------------------
    INITIALIZE RTSP STREAM:  Drive
    -------------------------------------------------
     - NAME  : Drive
     - LABEL : PRIMARY
     - URL   : rtsp://192.168.0.223:554/user=USERNAME&password=PASSWORD&channel=4&stream=1
     - UUID  : STREAM:XXXXXX-9319-474f-91a0-b224010f3c59
     - SESS  : XXXXXXX-f615-4192-9d79-b0ba245fd261
     - MODIF : Thu Jul 18 2019 00:19:31 GMT+0100 (GMT Summer Time)
     - TAGS  : @tunnel
    -------------------------------------------------
    
    2019-07-18T22:17:44.634Z [INFO]  [192.168.0.27:45724 <Hk-MgdC-B>] RTSP CLIENT SOCKET CONNECTED
    2019-07-18T22:17:44.740Z [INFO]  [192.168.0.27:45724 <Hk-MgdC-B>] RTSP CLIENT ATTACHED TO STREAM: Drive (STREAM:XXXXXX-9319-474f-91a0-b224010f3c59)
    2019-07-18T22:17:44.763Z [INFO]  [192.168.0.27:45724 <Hk-MgdC-B>] RTSP ENDPOINT SOCKET CONNECTED {192.168.0.223:554}
    2019-07-18T22:17:44.816Z [DEBUG] [192.168.0.27:45724 <Hk-MgdC-B>] [CLIENT REQUEST]  --> [DESCRIBE] rtsp://XXXXXX-b320-4551-819d-324049eed191.mproxy.io:443/STREAM:XXXXXX-9319-474f-91a0-b224010f3c59?session=XXXXXXX-f615-4192-9d79-b0ba245fd261
    2019-07-18T22:17:44.820Z [TRACE] [192.168.0.27:45724 <Hk-MgdC-B>] [CLIENT REQUEST]  --> [HEADERS] {
      "accept": "application/sdp",
      "user-agent": "Fire OS/6.0 stagefright/1.2 (Linux;Android 7.1.2)",
      "cseq": "1"
    }
    2019-07-18T22:17:44.825Z [DEBUG] [192.168.0.27:45724 <Hk-MgdC-B>] [ENDPOINT REQUEST]  --> [DESCRIBE] rtsp://192.168.0.223:554/user=USERNAME&password=PASSWORD&channel=4&stream=1
    2019-07-18T22:17:44.827Z [TRACE] [192.168.0.27:45724 <Hk-MgdC-B>] [ENDPOINT REQUEST]  --> [HEADERS] {
      "accept": "application/sdp",
      "user-agent": "Fire OS/6.0 stagefright/1.2 (Linux;Android 7.1.2)",
      "cseq": "1"
    }
    2019-07-18T22:18:14.732Z [WARN]  [192.168.0.27:45724 <Hk-MgdC-B>] RTSP CLIENT SOCKET TIMEOUT
    2019-07-18T22:18:14.747Z [INFO]  [192.168.0.27:45724 <Hk-MgdC-B>] RTSP CLIENT SOCKET CLOSED
    2019-07-18T22:18:14.750Z [INFO]  [192.168.0.27:45724 <Hk-MgdC-B>] RTSP CLIENT DETACHED FROM STREAM: Drive (STREAM:XXXXXX-9319-474f-91a0-b224010f3c59)
    2019-07-18T22:18:14.754Z [INFO]  [192.168.0.27:45724 <Hk-MgdC-B>] RTSP ENDPOINT SOCKET CLOSED [192.168.0.27:45724 <Hk-MgdC-B>]
    


  • @JasonS said in RTSP Socket Timeout - Alexa Cant Connect to RTSP Stream:

    192.168.0.25

    Let’s start with a few basics.

    The gateway is detecting IP address 192.168.0.25. Is this correct for this Windows machine?

    Basically, the gateway is up and running (no startup errors).
    I see your camera is tagged because the gateway received the camera streaming request.

    What’s missing is the Alexa device establishing a TCP connection to the gateway.

    This could be Windows Firewall blocking access to port 443? Try disabling the firewall to test.
    If you Alexa devices are on a separate network (i.e. Guest Wifi Network) they may not be able to reach the gateway server.

    It could be a routing issue. What type of router do you have? Some routers block the DNS hostname due to DNS REBINDING.

    If you have a PFSense router or Fritzbox, this is highly likely the case!

    Thanks, Robert



  • @Monocle Many Thanks, I’ll try check the items you suggested.

    Thanks again.



  • Hi Robert,

    Thanks for getting back tom me.

    Just tried a few things. Disabled Firewall completely, both on the Gateway and on my Router.

    Unfortunately I receive the same output.

    Fire TV Cube is on the same network, as the Cameras, (all wired, no wifi needed.), the Echo show is also on the same network, but this is wireless.

    I have a Virgin Media Super Hub 3 (https://wikidevi.com/wiki/Virgin_Media_Super_Hub_3). from this router i have also put the gateway as a DMZ and so should be fine for internal and external traffic.

    Unfortunately, I’m still facing the same issue.

    Do you by any chance have a network diagram of ports used for the whole process?

    Thanks
    Jason

    @Monocle said in RTSP Socket Timeout - Alexa Cant Connect to RTSP Stream:

    Let’s start with a few basics.
    The gateway is detecting IP address 192.168.0.25. Is this correct for this Windows machine?
    Basically, the gateway is up and running (no startup errors).
    I see your camera is tagged because the gateway received the camera streaming request.
    What’s missing is the Alexa device establishing a TCP connection to the gateway.
    This could be Windows Firewall blocking access to port 443? Try disabling the firewall to test.
    If you Alexa devices are on a separate network (i.e. Guest Wifi Network) they may not be able to reach the gateway server.
    It could be a routing issue. What type of router do you have? Some routers block the DNS hostname due to DNS REBINDING.
    If you have a PFSense router or Fritzbox, this is highly likely the case!
    Thanks, Robert


Log in to reply