[Yandex Cloud documentation](../../../index.md) > [All solutions](../../index.md) > [DataLens](../index.md) > Resolving the `SSL is required` error

# Fixing the `SSL is required` error


## Issue description {#issue-description}

When trying to connect to a Managed Service for PostgreSQL database from DataLens, you get the following error:

```
ERR.CHARTS.DATA_FETCHING_ERROR
ERR.DS_API.DB
db_message": "odyssey: ***********: SSL is required"
```

## Solution {#issue-resolution}

This error means that the connection requires SSL. Using SSL is [optional](../../../managed-postgresql/operations/connect/index.md) when connecting to a database in the same cloud or folder; however, connecting to an external database requires a trusted SSL certificate on the server.

If this issue occurs with a new Managed Service for PostgreSQL connection, [enable **DataLens access**](../../../managed-postgresql/operations/datalens-connect.md#allow-access) in the cluster settings, and then [set up a connection in DataLens](../../../datalens/operations/connection/create-postgresql.md).

If ca n reproduce this issue on an existing Managed Service for PostgreSQL connection, disable and then enable [DataLens access](../../../managed-postgresql/operations/datalens-connect.md#allow-access) in the cluster [settings](../../../managed-postgresql/operations/update.md#change-additional-settings). If it does not help, create a new connection to the Managed Service for PostgreSQL cluster database in DataLens. Then, [replace the connection in the dataset](../../../datalens/dataset/create-dataset.md#replace-connection) with a working one.