> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/cdf/latest/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/cdf/latest/troubleshooting/archive-unreachable.md).

# Archive service is unreachable

The [archive service](https://docs.cennso.com/components/cdf/latest/operation-guides/archive.md) is an optional feature that stores copies of CDRs after they are successfully delivered to CGF. Archiving is asynchronous and non-blocking — if the archive service is unavailable, CDR delivery to CGF continues normally.

If an archive service is configured but not present, no CDRs are archived, and you receive an error message indicating that the service cannot be reached. There is no performance loss, but the variation increases in the CDRs rate to the Charging Gateway Function (CGF). The average number of CDRs sent to CGF stays the same, but instead of being around 1,000 ±100 (under normal conditions), it can fluctuate by ±300.

The increased variation occurs because CDF Sender waits for the configured **requestTimeout** (default: `1000`ms) when attempting to archive each CDR. These timeouts add irregular delays to processing, causing throughput fluctuations.

```mermaid
sequenceDiagram
CDF ->> NATS : CDR
CDF ->> NATS : key-value data
CDF -x Archive : CDR
Note right of Archive : Connection down
```

When the archive service is brought back, the CDF resumes archiving CDRs starting from that point in time. CDRs processed during the outage are not retroactively archived.

## Possible solutions

To resolve archive service connectivity issues:

1. Check NATS server status:

   ```bash
   kubectl get pods -n cdf -l app=nats
   ```

2. Verify network connectivity from CDF Sender to the archive NATS service:

   ```bash
   kubectl exec -n cdf deployment/cdf-sender -- nc -zv <archive-nats-host> <port>
   ```

3. Check credentials (if authentication is configured) and ensure the **credentialsSecretName** secret exists and contains valid credentials.

4. Review CDF Sender logs for specific error messages:

   ```bash
   kubectl logs -n cdf deployment/cdf-sender | grep -i archive
   ```

For more information on troubleshooting NATS, read the official [NATS documentation](https://docs.nats.io/running-a-nats-service/configuration/clustering/jetstream_clustering/troubleshooting).
