> Markdown version of https://tuna.am/en/docs/troubleshooting/errors/resource-not-responding/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# Resource is not responding

Instead of your site, the tunnel address opens this page (it is shown in Russian only):

```text
Ресурс не отвечает
Код ошибки: 502

Трафик успешно проходит через сервер к агенту, но агент не может установить соединение с localhost:3000, текст ошибки:
dial tcp 127.0.0.1:3000: connect: connection refused

```

In English: "Resource is not responding. Error code: 502. Traffic reaches the agent through the server, but the agent can't connect to localhost:3000. Error text: …"

The HTTP status of the response is `502`. The page comes from the tuna client itself on your machine, so it shows the local port and the exact error text.

## Cause

The tunnel is running and the request reached the tuna client, but the client couldn't pass it on to the local service. Common causes, by error text:

* `connection refused` — nothing is listening on this port: the service isn't running, has crashed, or listens on a different port;
* `i/o timeout` — a firewall blocks the port, or the address isn't reachable from this machine;
* `no such host` — the service address contains a hostname that doesn't resolve;
* `malformed HTTP response` or a TLS error — the service uses HTTPS while the tunnel talks to it over HTTP, or the other way round.

[Apps](https://tuna.am/en/docs/apps.md) and gateways can return a similar response. There is no page there, just the error text with the same `502` status:

```text
dial tcp 127.0.0.1:8080: connect: connection refused

```

It means the Tuna node couldn't reach the app's service or the tuna client that publishes it.

## What to do

1. Make sure the service is running and open it locally: `curl http://localhost:3000`.
2. Check the port: the tunnel must point to the same port the service listens on. For example, for a service on port 8080, run `tuna http 8080`.
3. If the service listens on an address other than `127.0.0.1` or on a unix socket, pass it explicitly — see [What you can publish](https://tuna.am/en/docs/tunnels/http.md#upstream). For a unix socket, the error page shows the socket path instead of `localhost` and a port.
4. If the service uses HTTPS, pass the address with the scheme: `tuna http https://localhost:8443`. See [HTTPS application](https://tuna.am/en/docs/tunnels/http.md#https-upstream) for details.
5. For an app in proxy mode, check the upstream addresses in the [app settings](https://my.tuna.am/team_apps?lang=en). In tunnel mode, check that `tuna app` is running and the service at the `--url` address responds.

If the tunnel isn't yours and someone sent you the link, refresh the page in a minute or contact whoever sent it.
