---
title: "Common issues"
description: "Troubleshooting guide for Aerospike Developer SDK connection, query, and performance issues."
---

# Common issues

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

## Applies to

-   Aerospike Developer SDK (Java 21+ and Python 3.11+)
-   Aerospike Database 8.2.0 or later, unless a section states otherwise

::: code examples
Examples assume a connected `session` from [Connect to Aerospike](https://aerospike.com/docs/develop/client/sdk/connect). Each usage guide lists shared imports in a tabbed block near the top of the page; snippet blocks add imports only for types not already shown. The first code block in each section includes dataset setup; later blocks in that section reuse those values. When a page includes a **Complete example** section, that block is fully self-contained.
:::

This page provides solutions to frequently encountered problems when using the Developer SDK.

## Connection issues

### ”Connection refused” on localhost

**Symptoms**: `connect()` fails with `AerospikeException.Connection` (Java) or `ConnectionError` from `aerospike_sdk.exceptions` (Python). The message reads `Failed to connect to [1] host(s)` and names the seed host, for example `localhost:3000`.

**Cause**: Aerospike server is not running or is listening on a different port.

**Solution**:

-   [Java](#tab-panel-5342)
-   [Python](#tab-panel-5343)

```java
import com.aerospike.client.sdk.Cluster;

import com.aerospike.client.sdk.ClusterDefinition;

// Verify the server is running

// Check that port 3000 is accessible

Cluster cluster = new ClusterDefinition("127.0.0.1", 3000)  // Try explicit IP

    .connect();
```

> 📖 **API reference**: [`ClusterDefinition(String,int)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/ClusterDefinition.html#%3Cinit%3E%28java.lang.String%2Cint%29) | [`ClusterDefinition.connect()`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/ClusterDefinition.html#connect%28%29)

```python
from aerospike_sdk import ClusterDefinition

# Verify the server is running

# Check that port 3000 is accessible

cluster = await ClusterDefinition("127.0.0.1", 3000).connect()
```

> 📖 **API reference**: [`ClusterDefinition`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/cluster-definition.html)

### ”Cluster not found” with multiple hosts

**Symptoms**: Client cannot discover the cluster despite providing seed hosts.

**Cause**: Network partition, DNS issues, or firewall blocking cluster discovery.

**Solution**: Ensure every cluster node’s service port (3000 by default) is reachable from the client. Ports 3001 and 3002 carry fabric and heartbeat traffic between nodes and don’t need to be open to clients.

---

## Query issues

### AEL query returns empty results

**Symptoms**: Query executes without error but returns no records.

**Cause**: Wrong bin name, a type mismatch in the comparison, or no matching data.

**Solution**:

1.  Check that bin names match exactly (case-sensitive)
2.  Check that compared values have the stored type, for example `$.age > 25` doesn’t match an `age` bin stored as a string
3.  Confirm records exist that match your filter

---

## Performance issues

### High latency on reads

**Symptoms**: Read operations taking longer than expected (>10ms).

**Cause**: Network latency, server load, or suboptimal Behavior configuration.

**Solution**:

1.  Check network latency to the cluster
2.  Review server metrics for load issues
3.  Consider a faster-read `Behavior` for read-heavy flows: Python provides the built-in `Behavior.READ_FAST` preset, and Java can derive an equivalent with `Behavior.DEFAULT.deriveWithChanges(...)`

---

## Next steps

-   [Error Codes Reference](https://aerospike.com/docs/develop/client/sdk/reference/error-codes)
-   [Known Issues](https://aerospike.com/docs/develop/client/sdk/reference/known-issues)
-   [Troubleshooting Connection Issues](https://aerospike.com/docs/develop/client/sdk/connect#troubleshooting)