> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/troubleshoot.md).

# Troubleshoot

A connection test fails and you need to know why. Find the error text below, read the cause and apply the fix. Work from the top of each table: the first rows are the most common.

**Applies to:** OctoXLabs 6.x · all adapters. Rows that depend on a version say so.

### How to read a connection test error

Select **Test** on a connection and OctoXLabs shows either **Connection successful** or an error. Most errors have this shape:

```
{"status": 400, "data": {"detail": "..."}, "adapter": "Adapter name", "connection": "Connection name"}
```

The `400` is added by OctoXLabs. The real reason is the text in `detail`. When the product itself answered, `detail` shows its answer in this form:

```
Status Code: 401
URL: https://product-host:443/api/path
Method: POST
```

The status code in that block comes from the product, not from OctoXLabs, and the lines after it are the product's own message. If notifications are on for failed tests, a failed test also creates a notification. See [Notifications](https://docs.octoxlabs.com/documentation/use-octoxlabs/notifications).

### Find your error

#### Address and network

| Error text                                                                           | Cause                                                                                                                                                                                                      | Fix                                                                                                                                                                                                             |
| ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Failed to resolve 'https;'` or `NameResolutionError` or `Name or service not known` | The host field holds something that is not a plain address, for example `https://` typed in front of an IP, a stray character, or a hostname the connector cannot resolve.                                 | Enter only the IP address or hostname, with no scheme and no extra characters. Check name resolution from the connector, not from your own computer.                                                            |
| `Max retries exceeded` with `ConnectTimeoutError`                                    | Nothing answered on that address and port: a firewall blocks the path, the port is wrong or the product is down.                                                                                           | Open the port from the connector to the product. A very high **Timeout** value makes a blocked connection wait that long before it fails, so keep it realistic while you troubleshoot.                          |
| `Read timed out` or `ReadTimeoutError`                                               | The product accepted the connection but did not answer in time.                                                                                                                                            | Raise the **Timeout** in the connection options in steps and check the load on the product. See [Timeouts and missing data from a slow source system](broken://pages/1285ae671553f4825b1edfd46aea37bc907dfd21). |
| `Connector timed out. Connection test exceed 120 seconds.`                           | The whole test did not finish within 120 seconds. A connection that lists many hosts tests them one after another, so many hosts multiplied by a long timeout adds up.                                     | Remove hosts that no longer exist, lower the **Timeout**, or split the hosts across several connections.                                                                                                        |
| `Connection reset by peer` or `ConnectionResetError(104`                             | Something closed the connection before the product answered, for example a firewall or inspection device, or a product that refuses the TLS settings the connector offers. A longer timeout does not help. | Check the firewall and proxy logs for the connector address. For Microsoft Exchange Online, see the version table below.                                                                                        |
| `Connector is unreachable`                                                           | The main server cannot reach the connector.                                                                                                                                                                | Check that the connector runs and that the ports between the servers are open. See [Remote connector installation and port requirements](broken://pages/60c29d865425a50c40f1b01c9000ec38c5204ecd).              |
| `Invalid connector token.`                                                           | The connector selected on the connection has no valid token.                                                                                                                                               | Set the token in the connector settings, select **Send Test** there, then test the connection again.                                                                                                            |

#### Credentials

| Error text                                                                                                 | Cause                                                                                                                                                      | Fix                                                                                                                                                                                                                                                                                  |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `LDAPInvalidCredentialsResult - invalidCredentials` (Microsoft Active Directory)                           | The directory rejected the username or password. It often starts after a password change, or when the username is not in the format the directory expects. | Check that the account is active, not locked and not expired. Enter the username as a UPN (`user@domain.com`) and enable **Use UPN**, or try **Use domain for auth** instead. You cannot enable both at once. You can also switch **Use simple authentication (no NTLM)** on or off. |
| `Status Code: 401`                                                                                         | The product received the request but rejected the credentials or the token.                                                                                | Sign in to the product with the same account. Check for an expired or changed password, a locked account, or an API token that expired. Then call the product's login API from the connector host (see below).                                                                       |
| `EPM030001E` with `Authentication is required and has failed or has not yet been provided.` (CyberArk EPM) | The product refused the logon. In one observed case the account password had expired.                                                                      | Sign in to the product console with the account and renew or unlock it, then test again.                                                                                                                                                                                             |
| `Kerberos authentication failed: wrong password or pre-authentication rejected.`                           | The password is wrong.                                                                                                                                     | Correct the password. See the Kerberos table below for related messages.                                                                                                                                                                                                             |

#### Permissions

| Error text                                                    | Cause                                                                                                               | Fix                                                                                                                                                                                                   |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Status Code: 403` or `Access denied`                         | The account signed in, but it has no right to use the API.                                                          | Give the account the role or API permission that the adapter page lists under its connection requirements. For example, the Delinea Secret Server account needs a role with permission to view users. |
| `No permission for the resource` (FortiManager, status `-11`) | The account has no permission for the FortiManager API resource.                                                    | Give the account permission to use the FortiManager API, then test again.                                                                                                                             |
| The test passes but the discovery returns no data or errors   | The test sends one small request. It does not prove that the account can read every data source the discovery uses. | Compare the account's permissions with the adapter's connection requirements and grant what is missing.                                                                                               |

#### Certificates and TLS

| Error text                                                     | Cause                                                                  | Fix                                                                                                                                             |
| -------------------------------------------------------------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `CERTIFICATE_VERIFY_FAILED` with `EE certificate key too weak` | The server certificate uses an RSA key shorter than 2048 bits.         | Issue a new certificate with a stronger key. See [LDAPS: EE certificate key too weak](broken://pages/5a5d780da41b1a2f244a681a7666ae4f53245028). |
| `CERTIFICATE_VERIFY_FAILED` (other reasons)                    | OctoXLabs does not trust the CA that issued the product's certificate. | Add the CA certificate. See [Add an SSL Certificate](https://docs.octoxlabs.com/documentation/guides/add-an-ssl-certificate).                   |

#### Wrong path or endpoint

| Error text                                           | Cause                                                                                                                                                                            | Fix                                                                                                                                                                                                             |
| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `404 Not Found`                                      | The connector reached the product, but not an API at that path.                                                                                                                  | Check the **Custom Path** in the advanced options. The default is `/`, and a value that adds a second slash before the API path breaks every request. Also check the API version option if the adapter has one. |
| The response is a login page in HTML instead of JSON | The request reached the product's web interface, not its API. The address, the port or the API base path is wrong, or the product redirects the request to a home or login page. | Open the product's API guide and confirm the base URL, the port and the login endpoint. Call that endpoint from the connector host and check that it returns JSON.                                              |

#### Kerberos

Adapters that use Kerberos, for example SCCM, translate Kerberos failures into these messages.

| Error text                                                               | Cause                                                                                                                                           | Fix                                                                                                                                                  |
| ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Cannot reach KDC. Check the kdc_ip value and network/firewall.`         | The KDC address is wrong or blocked, or the realm in the username does not match the configured realm. Kerberos realm names are case sensitive. | Check **kdc\_ip** and the firewall. Write the realm in upper case, for example `DOMAIN.LOCAL`, and make the part after `@` in the username match it. |
| `Clock skew between client and KDC is too large. Sync the system clock.` | The connector's clock differs too much from the domain controller's clock.                                                                      | Synchronize the time of the connector host with the domain.                                                                                          |
| `Principal not found in Active Directory. Check the realm and username.` | The account does not exist in that realm.                                                                                                       | Check the realm and the username.                                                                                                                    |
| `Keytab does not contain a matching key for the principal.`              | The keytab file does not belong to this account.                                                                                                | Create the keytab again for the same principal.                                                                                                      |
| `Encryption type mismatch between client/keytab and KDC.`                | The client and the KDC have no encryption type in common.                                                                                       | Align the allowed encryption types on the account and the keytab.                                                                                    |
| `Kerberos error:` followed by other text                                 | A Kerberos error without a specific translation.                                                                                                | Search the text that follows, or send it to support.                                                                                                 |

#### Generic or misleading results

| Error text                                                                      | Cause                                                                                                                                                                                    | Fix                                                                                                                                                                                         |
| ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Connection test failed.` (Microsoft DHCP Server and other PowerShell adapters) | The test runs `whoami` over WinRM. Any failure ends in this one message, so it does not say whether credentials, WinRM access, name resolution, a certificate or a timeout is the cause. | Check that WinRM is enabled on the target and reachable from the connector, that the credentials are valid, and that the name resolves. Run the same logon from a Windows host and compare. |

#### Test errors that later versions fixed

If you see one of these and run an older version, upgrade first.

| Adapter                   | Error text                                                          | Fixed in |
| ------------------------- | ------------------------------------------------------------------- | -------- |
| DeepInfo                  | `Ensure this value is greater than or equal to 25.` for `page_size` | 6.5.4    |
| SolarWinds IPAM           | `no viable alternative at input 'WITH'`                             | 6.6.1    |
| Microsoft Exchange Online | `ConnectionResetError(104, 'Connection reset by peer')`             | 6.6.2    |
| FortiManager On-Prem      | Test shows success although the login is rejected                   | 6.9.0    |

### Test the connection yourself

When the message does not explain the failure, repeat the request from outside OctoXLabs. Run it on the connector host, because that is the network the product sees. A test from your own computer proves nothing about the connector's path.

```bash
curl -v https://PRODUCT_HOST:PORT/
```

Replace `PRODUCT_HOST` and `PORT` with the address in your connection. A certificate error from this command tells you the same as the error in OctoXLabs. For an LDAP or Active Directory failure, use `ldp.exe` on a Windows computer to connect and bind with the same account. If it fails there too, the problem is in the directory or the account, not in OctoXLabs.

{% hint style="warning" %}
Add `-k` to `curl` only to find out whether a certificate is the problem. Do not leave certificate checks off in any setting.
{% endhint %}

### Verify

1. Select **Test** on the connection and confirm it shows **Connection successful**.
2. Start a discovery and open its log. The error for the connection is gone.
3. Compare the asset count for the connection (`Connections = YOUR_CONNECTION_NAME` in the inventory) with the count in the product.

### Still not working?

[Contact support](https://docs.octoxlabs.com/help-center/contact-support) and attach:

* The platform and connector versions (`sudo octox-ctl -v`).
* The adapter name, the connection name and the connector it uses.
* The complete error text, with the `Status Code`, `URL` and `Method` lines. Remove passwords and tokens.
* The result of the `curl` request from the connector host.
* The discovery log archive: `sudo octox-ctl -x logs -i DISCOVERY_ID`. It writes a `.tar.gz` archive to `/tmp`.

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Timeouts from a slow source</strong></td><td>Timeout, thread and batch settings.</td><td><a href="broken://pages/1285ae671553f4825b1edfd46aea37bc907dfd21">Broken link</a></td></tr><tr><td><strong>Connect an adapter</strong></td><td>Create, test and fetch a connection.</td><td><a href="https://docs.octoxlabs.com/documentation/adapters/connect-an-adapter">https://docs.octoxlabs.com/documentation/adapters/connect-an-adapter</a></td></tr><tr><td><strong>Adapters and discovery</strong></td><td>All articles in this category.</td><td><a href="broken://pages/947932ec3b7162b161dc0b16dcb376efcb119520">Broken link</a></td></tr></tbody></table>
