---
title: dhconfig resolver
sidebar_label: Resolver
---

The `resolver` configuration data type of the [`dhconfig`](./overview.md) tool shows the network endpoints that Deephaven services have registered in etcd. Deephaven clients and services use these registrations to find each other; for example, clients find the active Persistent Query Controller this way. Use `dhconfig resolver` to check which address a client would connect to, or to watch the registration change during a controller failover.

```text
dhconfig resolver [get|watch|help] [arguments]
```

`dhconfig resolver` reads the registrations directly from etcd, using the `dh-resolver` etcd client credentials in `/etc/sysconfig/deephaven/etcd/client` (or the directory named by the `DH_ETCD_BOOTSTRAP_DIR` environment variable). Run it on a Deephaven server where those credentials are installed, as a user that can read them, such as `irisadmin`. It does not require Deephaven authentication.

As with other `dhconfig` configuration data types, the `--help` argument provides detailed information on the available actions and arguments, as well as usage examples. For example:

```bash
dhconfig resolver get --help
```

## Arguments

Both actions take exactly one of the following arguments. Trailing arguments are not allowed.

| Argument             | Description                                                                                                                                                                                                                                                        |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `-s,--service <arg>` | The name of the Deephaven service to resolve. The only supported service is the Persistent Query Controller, which can be given as `PersistentQueryController`, `controller`, or `querycontroller` (case-insensitive). To resolve any other service, use `--path`. |
| `-p,--path <arg>`    | The resolver service path to resolve, such as `/controller`. A missing leading `/` is added automatically.                                                                                                                                                         |

## `get`

Print the endpoints currently registered for a service, one per line, as Java prints an address: `host/ip:port` when the service registered a host name, or `ip:port` for an IP address. If nothing is registered, the command waits up to 60 seconds for an endpoint to register. If none does, or if the lookup fails for another reason, it prints `no endpoints registered` and exits with status 0.

Show the current address of the Persistent Query Controller:

```bash
sudo -u irisadmin /usr/illumon/latest/bin/dhconfig resolver get --service PersistentQueryController
```

```bash
sudo -u irisadmin /usr/illumon/latest/bin/dhconfig resolver get --path /controller
```

## `watch`

Print the endpoints currently registered for a service, then print them again each time the registration changes. A line containing `--` follows each set of endpoints. The command runs until you interrupt it with **Ctrl-C**.

Watch the Persistent Query Controller registration, for example while testing controller failover:

```bash
sudo -u irisadmin /usr/illumon/latest/bin/dhconfig resolver watch --service PersistentQueryController
```

## Related documentation

- [dhconfig overview](./overview.md)
- [`dhconfig pq`](./pq.md)
