Reolink Bad Gateway

My Reolink integration just stop working suddenly. The log is stating there is an API error of 502 Bad Gateway. What could have coursed this to happen and how to fix?

2024-03-11 15:24:43.605 DEBUG (MainThread) [reolink_aio.api] Unknown/192.168.1.***:443::send() HTTP Request params =
{'cmd': 'Login', 'token': 'null'}

2024-03-11 15:24:43.605 DEBUG (MainThread) [reolink_aio.api] Unknown/192.168.1.***:443::send() HTTP Request body =
[{'cmd': 'Login', 'action': 0, 'param': {'User': {'userName': 'admin', 'password': '<password>'}}}]

2024-03-11 15:24:43.775 DEBUG (MainThread) [reolink_aio.api] Unknown/192.168.1.***:443::send() HTTP Response status = 502, content-type = (text/html).
2024-03-11 15:24:43.775 DEBUG (MainThread) [reolink_aio.api.data] Unknown/192.168.1.***:443::send() HTTP Response data:
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>


2024-03-11 15:24:43.775 DEBUG (MainThread) [reolink_aio.api] Host 192.168.1.***:443: 502/Bad Gateway response, trying to login again and retry the command.

Can you log into the camera through a browser? Chances are that the camera just needs a reboot (my older Reolinks sometime need to be power cycled for the same reason).

Hi @bwoodworth, sometimes the camera’s web server crashes due to misunderstood API commands by the camera and makes the internal nginx web server shaky: 502 Bad Gateway. Best way is to restart your camera and it fix it.

1 Like