# local service unavailable

`TNL_TARGET_UNAVAILABLE`

tnl could not reach the local service at startup or while serving a visitor request.

tnl cannot reach the local service

```text
+--[ where it stopped ]----------------------------------------+
|                                                              |
|  visitor                                                     |
|     |                                                        |
|     v                                                        |
|  tnl server                                                  |
|     |                                                        |
|     v                                                        |
|  tnl                                                         |
|     |                                                        |
|     x  local service unavailable                             |
|  local service                                               |
|                                                              |
+--------------------------------------------------------------+
```

## what happened

- the local service stopped or has not finished starting
- the target points to the wrong port or loopback address
- the local service closed the connection or returned an invalid HTTP response

## if you are visiting

- ask the public URL owner to check the local service, then retry

## if you run tnl

- check the target passed to `tnl publish` or registered with `tnl dev`
- start the local service and verify that its target accepts connections on the machine running `tnl`
- if the command failed at startup, rerun it; if the tunnel is still running, retry the visit after restarting the local service

help: https://tnl.dev/e/target
