# Error message: “502 Bad Gateway”

An error message `502: Bad Gateway’ is displayed when attempting to access the user interface`.

To ensure that all components are operational, execute “status\_datasentinel” while logged in as the owner of datasentinel.

```
$ status_datasentinel

datasentinel_backend.service                                       loaded active running   Datasentinel backend API
datasentinel_dispatcher.service                                    loaded active running   Datasentinel Agentless
datasentinel_grafana.service                                       loaded active running   Datasentinel grafana daemon
datasentinel_influxdb.service                                      loaded active running   InfluxDB service
datasentinel_postgresql.service                                    loaded active running   Datasentinel PostgreSQL instance
nginx.service                                                      loaded active running   A high performance web server and a reverse proxy server
```

A 502 error from **nginx** indicates that the proxy server was unable to establish a connection to a local component on another port, either grafana or the backend.

The most common reason is a firewall issue, especially [**SELINUX**](/manual/implementation/troubleshooting/selinux.md)

Check to see if the firewall on the Linux machine is blocking traffic on the port you are trying to connect to.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datasentinel.io/manual/implementation/troubleshooting/error-message-502-bad-gateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
