> For the complete documentation index, see [llms.txt](https://platform9.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform9.com/kb/pcd/storage/volume-services-flapping-due-to-eaddrinuse-in-pf9-comms-service.md).

# Volume Services Flapping Due to EADDRINUSE in pf9-comms Service

## Problem

The volume provisioning failed intermittently as the Storage services on one or more hosts were observed to be repeatedly transitioning between `up` and `down` states, leading to a degraded Persistent Storage Service status.

## Environment

* Private Cloud Director Virtualization - v2025.4 and Higher
* Self-Hosted Private Cloud Director Virtualization - v2025.4 and Higher
* Component: Persistent Storage

## Cause

The issue was caused by communication socket exhaustion on the affected node, leading to port binding failures. Specifically, the `pf9-comms` service was repeatedly logging the following error in `/var/log/pf9/comms/comms.log`:

```bash
EADDRINUSE encountered during SNI client creation ... retrying in 20000 milliseconds
```

This indicates that the required port was already in use or in TIME\_WAIT state, preventing successful socket binding and disrupting communication between services (including volume driver interactions with the backend).

## Diagnostics

1. The following symptoms were observed:
   * The`openstack volume service list` showed cinder-volume in down state intermittently.
   * The `/var/log/pf9/comms/comms.log` contained repeated `EADDRINUSE` errors.
2. The `/var/log/pf9/cindervolume-base` logs on the cinder host showed API communication failures to the Tintri backend, including:

```bash
reached maximum retry attempts: 2, reason: Volume driver reported an error:  (source: CinderDriver, typeId: com.tintri.api.rest.v310.dto.domain.beans.TintriError, code: ERR-API-8001)
```

Network and Tintri API endpoints were reachable, and credentials were valid, ruling out direct storage backend issues.

## Resolution

1. Restarted the pf9-comms service on the affected Cinder volume host:

```bash
$ sudo systemctl restart pf9-comms
```

2. Post-restart, the EADDRINUSE messages no longer appeared in comms.log.
3. The `cinder-volume` services returned to `up` state:

```bash
$ openstack volume service list -c Binary -c Host -c Status -c State

+-----------------+----------------------------------+---------+------+
| Binary          | Host                             | Status  | State|
+-----------------+----------------------------------+---------+------+
| cinder-scheduler| cinder-scheduler-[ID]            | enabled | up   |
| cinder-volume   | [CINDER_HOST_ID]@[CINDER_BACKEND]| enabled | up   |
+-----------------+----------------------------------+---------+------+
```

4. Verified volume provisioning functionality and ensured that backend API communication was stable.

## Validation

* Monitored the `cinder-volume` service status using the `openstack volume service list`for **30 minutes** and confirmed that the services remained in the `up` state.
* No further `EADDRINUSE` errors were observed in `comms.log`.
* Volume creation and attachment operations succeeded.

## Additional Information

* `EADDRINUSE` indicates that a socket binding operation failed due to the port already being in use.
* This is often caused by:
  * A large number of short-lived TCP connections
  * Delays in socket cleanup
  * Insufficient ephemeral port ranges or low timeout settings
* Restarting the communication layer (`pf9-comms`) forces the cleanup of stale sockets and refreshes the SNI client sessions.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://platform9.com/kb/pcd/storage/volume-services-flapping-due-to-eaddrinuse-in-pf9-comms-service.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
