Cloud proxy relay 502 bad gateway and 503 service unavailable

Answered

Comments

7 comments

  • Avatar
    Thomas

    I want to clarify, the relay does not always give a 502 or 503. I would say it gives these responses approximately 50% of the time. When it works, it works fine.

    0
    Comment actions Permalink
  • Avatar
    Anton Babinov

    Hello Thomas,

    could you please provide few urls examples of how you open streams via replay? 

    Does the issue occur when you using general relay.vmsproxy.com domain name or do you use specifics relays directly? I assume the issue isn't constant and there are time intervals when relay reports these errors.

    My first guess would be to check stability of the connection between VMS mediaserver and cloud relay. If mediaserver loses connection to relay service, you won't be able to access it via cloud relay. 

    As a first step, I recommend running firewall test script from https://support.networkoptix.com/hc/en-us/articles/360010795813-Firewall-Pass-List article to see if mediaserver can access all relay nodes.

    Please note, that mediaserver needs access to all relay servers in order for your application to work. For example, in Europe we have relay-ams and relay-fr. When you send API request to mediaserver via relay.vmsproxy.com, it will get redirected to either relay-fr or relay-ams. If only one relay server is accessible, you might get 502 error responsed 50% of the time.

     

     

    0
    Comment actions Permalink
  • Avatar
    Thomas

    Hello Anton,

    First of all I want to clarify that the issue does not only happen on video-streams. We are also retrieving data like recorded-time-periods, nonce, etc. We are having the same issue with these requests. We are currently using the "relay-ams.vmsproxy.com" domain, however, this is only because we wanted to see if this fixed our issues. The issues occur on both the default "relay.vmsproxy.com" and the previously mentioned domain. 

    This is our stream URL currently in use:
    https://{cloudSystemId}.relay-ams.vmsproxy.com/hls/{cameraId}.m3u8?auth={authToken}&lo=

    "My first guess would be to check stability of the connection between VMS mediaserver and cloud relay. If mediaserver loses connection to relay service, you won't be able to access it via cloud relay. " 

    How would I go about doing this? I have checked the "Main" logs of our instances an do not see any "disconnect" or similar events. I have manually checked all relay services in our application and they all seem to give valid responses apart from:

    relay-mia.vmsproxy.com

    This relay gives us the following: .relay-mia.vmsproxy.com port 443 after 151 ms: Connection refused

    However, we are from Europe. I assume that the relay wouldn't connect us to this specific relay anyway. This is also a different error then the 502 and 503 errors this issue is about.

    Additional information:

    1. We have tried a direct connection using a VPN to one of our locations. We do not get any errors when doing this.

     

    1. We do quite frequently get these errors in our systems, I do not know if this problem is related. Camera's at all our locations seem to randomly stop sending data for 10 seconds. Our camera's are always in the same LAN as the mediaserver. 












    0
    Comment actions Permalink
  • Avatar
    Thomas

    Just one more thing: 
    Our mediaservers are making loads of connections to the relay (see screenshot), is this normal? (I cropped the image to not include sensitive information)

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hello Thomas,

    Does the issue still persist?

    0
    Comment actions Permalink
  • Avatar
    Thomas

    We have changed our network infrastructure. We are now able to connect to one NX server directly, through which we can access the other instances. We did not find a solution to the issue described. I do not know if the issue still happens when using the proxy.

    0
    Comment actions Permalink
  • Avatar
    Thomas

    The second issue described (about the camera's randomly being off for 10 seconds) does still happen. We don't really have any inconveniences from it tho so we havent looked into it further.

    0
    Comment actions Permalink

Please sign in to leave a comment.