# `services.unavailable`

The running app couldn't be asked about its services, because it isn't running on this machine, or couldn't do what was asked of one.

Area 14, [Tools](/docs/tooling.md); not declinable; the next step is usually the human's.

## Why Jadpo refuses it

`jadpo services` asks the running app about the containers it runs, never
the container engine: in development the project's running `jadpo dev`,
and with `--deployable <name>` a native deployable running on this
machine, which supervises its services itself. Each listens on a socket
only the app's user can reach while it runs services. When nothing
answers there, there is nothing to ask, and Jadpo won't go to the engine
behind the app's back, since the app would undo what it was told.

A running app can also refuse what it was asked: a service whose image
waits for a person's acceptance, or one `jadpo dev --fake` keeps faked,
isn't running to restart, and an engine that can't be reached can't
start one.

## What it looks like

A print desk whose own integration runs as a container beside it:





```jadpo
application {
    connections: {
        pdfs: {
            package: AcmePdf.v1
            domains: [printing]
        }
    }
}
```

`jadpo services` while no `jadpo dev` runs:

```sh
jadpo services
```

```text
error: No `jadpo dev` is running for this project
  reason: `jadpo services` asks the running app about its services, never the container engine, and in development they run only while `jadpo dev` runs them.
  next: Start `jadpo dev`, then run `jadpo services` again (agent)
  rule: services.unavailable
  help: https://jadpo.dev/docs/errors/services.unavailable
```

`(agent)` at the end of the `next:` line means your coding agent can make the fix itself.

## How to fix it

**If you are developing**, start `jadpo dev` and ask again, since its
services run only while it does:

```sh
jadpo dev
jadpo services
```

The second, run in another terminal, lists the services `jadpo dev`
started.

**If the deployable runs in production**, ask on the machine it runs on,
with the `JADPO_SERVICES_SOCKETS` it was started with, if it was given one:

```sh
JADPO_SERVICES_SOCKETS=/run/print-desk jadpo services --deployable app
```

That reaches the running deployable's control socket. A deployable that
logged `services.control_failed` as it started says why it couldn't
listen.

## Related

- [`jadpo services`](/docs/commands-for-services-run-beside-the-app.md#jadpo-services)
- [How a native deployable runs its services](/docs/running-a-service-in-a-container.md#how-a-native-deployable-runs-its-services)
