---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - en/cookbook/common-issues
  - en/datalens/cookbook/common-issues.md
  - ru/cookbook/common-issues
  - href: en/cookbook/common-issues.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: en/cookbook/common-issues.html
title: DataLens On-premises common issues
description: >-
  This article covers common issues you may encounter as a user of DataLens
  On-premises and how to fix them.
vcsPath: en/cookbook/common-issues.md
---

# Common issues

Find solutions to common issues you may encounter when using DataLens On-premises.

## Common issues {#issues}

1. Resetting the `CONTROL_API_CRYPTO_KEY` encryption key.
1. Running on Oracle Linux 8/9 (RHEL).
1. Deployment via Argo CD.
1. Changing the default ports for the Traefik ingress controller.
1. HTTP-to-HTTPS redirects.

## Resetting the `CONTROL_API_CRYPTO_KEY` encryption key {#reset-crypto-key}

The control-api logs display an `InvalidSignature: Signature did not match digest` error.

If you are using a connection to an external database:

```shell
#!/bin/bash
set -eo pipefail

# fill this values
CONTROL_API_CRYPTO_KEY="..."
POSTGRES_HOST="..."
POSTGRES_PORT="..."
POSTGRES_USER_US="..."
POSTGRES_DB_US="..."
POSTGRES_PASSWORD_US="..."
# fill this values

cat >./crypto.py <<EOL
import sys
from cryptography.fernet import Fernet
def main():
  fernet = Fernet(sys.argv[1])
  encrypted = fernet.encrypt(sys.argv[2].encode('utf-8')).decode()
  print(encrypted)
main()
EOL

export PGPASSWORD="${POSTGRES_PASSWORD_US}"
NULL_PASSWORD=$(python3 ./crypto.py "${CONTROL_API_CRYPTO_KEY}" null)

psql \
  --host "${POSTGRES_HOST}" \
  --port "${POSTGRES_PORT}" \
  --username "${POSTGRES_USER_US}" \
  --dbname "${POSTGRES_DB_US}" <<-EOSQL
  UPDATE entries SET unversioned_data = jsonb_set(unversioned_data, '{password,cypher_text}', '"${NULL_PASSWORD}"', true) WHERE unversioned_data #> '{password,cypher_text}' IS NOT NULL;
  UPDATE entries SET unversioned_data = jsonb_set(unversioned_data, '{token,cypher_text}', '"${NULL_PASSWORD}"', true) WHERE unversioned_data #> '{token,cypher_text}' IS NOT NULL;
EOSQL
```

If using an integrated database:

```shell
./init.sh --pg /init/us-restore.sh --reset-crypto-key
```

### Solution

This issue is caused by a mismatch in the connection encryption key stored in a secret within the `CONTROL_API_CRYPTO_KEY` variable. You must either restore the previous key or reset the key manually by running the following script: `./init.sh --pg /init/us-restore.sh --reset-crypto-key`.

When the encryption key changes, all connections remain encrypted with the old key.

If you cannot run the script via `./init.sh`, build the script manually:

```shell
#!/bin/bash
set -eo pipefail

# fill this values
CONTROL_API_CRYPTO_KEY="..."
POSTGRES_HOST="..."
POSTGRES_PORT="..."
POSTGRES_USER_US="..."
POSTGRES_DB_US="..."
POSTGRES_PASSWORD_US="..."
# fill this values

cat >./crypto.py <<EOL
import sys
from cryptography.fernet import Fernet
def main():
  fernet = Fernet(sys.argv[1])
  encrypted = fernet.encrypt(sys.argv[2].encode('utf-8')).decode()
  print(encrypted)
main()
EOL

export PGPASSWORD="${POSTGRES_PASSWORD_US}"
NULL_PASSWORD=$(python3 ./crypto.py "${CONTROL_API_CRYPTO_KEY}" null)

psql \
  --host "${POSTGRES_HOST}" \
  --port "${POSTGRES_PORT}" \
  --username "${POSTGRES_USER_US}" \
  --dbname "${POSTGRES_DB_US}" <<-EOSQL
  UPDATE entries SET unversioned_data = jsonb_set(unversioned_data, '{password,cypher_text}', '"${NULL_PASSWORD}"', true) WHERE unversioned_data #> '{password,cypher_text}' IS NOT NULL;
  UPDATE entries SET unversioned_data = jsonb_set(unversioned_data, '{token,cypher_text}', '"${NULL_PASSWORD}"', true) WHERE unversioned_data #> '{token,cypher_text}' IS NOT NULL;
EOSQL
```

After resetting the key, you must manually re-enter passwords for connection sources.

## Running on Oracle Linux 8/9 (RHEL) {#oracle-linux-8}

To run K3s on Oracle Linux 8, you must either completely disable firewalld or configure firewall rules to ensure proper Kubernetes networking.

Required ports for K3s:

* 6443/tcp: Kubernetes main API server (master).
* 2379–2380/tcp: etcd (for multi-master installation).
* 10250/tcp: kubelet API.
* 8472/udp: VXLAN (Flunnel network, if used).
* 30000–32767/tcp: Port range for NodePort services.

### Solution

**Option 1**. Disable firewalld:

```shell
sudo systemctl stop firewalld
sudo systemctl disable firewalld
```

**Option 2**. Add rules for the relevant ports or network interfaces.

Example for firewalld:

```shell
# traffic between k8s pod network subnets
sudo firewall-cmd --permanent --zone=trusted --add-source=10.42.0.0/16
sudo firewall-cmd --permanent --zone=trusted --add-source=10.43.0.0/16
# or
sudo firewall-cmd --permanent --zone=trusted --add-interface=cni0
sudo firewall-cmd --permanent --zone=trusted --add-interface=flannel.1


# k8s api server access for all nodes (optional)
sudo firewall-cmd --permanent --add-port=6443/tcp
# client requests to etcd and peer communication between etcd members (optional)
sudo firewall-cmd --permanent --add-port=2379-2380/tcp
# kubelet api port on each node (optional)
sudo firewall-cmd --permanent --add-port=10250/tcp
# flannel vxlan pod network communication (optional)
sudo firewall-cmd --permanent --add-port=8472/udp
# node port external traffic (optional)
sudo firewall-cmd --permanent --add-port=30000-32767/tcp

sudo firewall-cmd --reload
```

{% note tip %}

If the firewall does not interfere with cluster operation, you may only want to configure the required ports rather than disable it entirely. This will help ensure basic system security with settings acceptable for Kubernetes.

{% endnote %}

## Deployment via Argo CD {#argo-cd}

Argo CD does not support the `lookup` function correctly: it cannot check whether a secret already exists.

Learn more about the `lookup` function:

* [https://github.com/argoproj/argo-cd/issues/5202](https://github.com/argoproj/argo-cd/issues/5202)
* [https://github.com/argoproj/argo-cd/issues/21745](https://github.com/argoproj/argo-cd/issues/21745)

### Solution

To avoid issues during upgrades, you need to manually specify the secret resource reference via values in `secrets.ref`.


You will need to populate the secrets manually or copy them from an existing resource during the initial deployment.

## Changing the default ports for the Traefik ingress controller {#ports-config}

You need to create or update the file located at:

`/var/lib/rancher/k3s/server/manifests/traefik-config.yaml`

File contents:

```yaml
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
  name: traefik
  namespace: kube-system
spec:
  valuesContent: |-
    ports:
      web:
        exposedPort: 80
      websecure:
        exposedPort: 443
```

Ports 80 and 443 are external ports of the ingress controller.

After saving the file, the changes will apply automatically. K3s dynamically monitors this manifest directory and will update the Traefik ingress controller automatically.

Port 443 will still be available until you restart Traefik. To force an update, run this command:

```shell
sudo k3s kubectl rollout restart deployment traefik -n kube-system
```

## HTTP-to-HTTPS redirects {#https-redirect}

When using the NGINX controller, you can apply the following Kubernetes annotation to automatically redirect all HTTP requests to HTTPS:

```shell
nginx.ingress.kubernetes.io/ssl-redirect: "true"
```

### Error: File uploads fail

Files fail to upload at a top-level domain (TLD), e.g., `datalensnb`.


### Solution

Always use a second-level domain, e.g., `datalens.nb`.

### Error: Problematic release

There is an issue with a release or a release is stuck in the following state: `Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress`.

### Solution

1. Get the last good release:

    ```shell
    ./bin/helm-amd64 -n datalens-enterprise history datalens-enterprise | grep 'Upgrade complete' | tail -n1
    ```

1. Find out the release number; in our example this is 11:

    ```shell
    11          Jun 18 10:00:30 2025    deployed    datalens-enterprise-0.0.4    25.9.0    Upgrade complete
    ```

1. Roll back to the latest good release:

    ```shell
    ./bin/helm-amd64 -n datalens-enterprise rollback datalens-enterprise 11
    ```

1. Restart the required release using `./init.sh`.

## Results {#results}

You have reviewed the common DataLens issues and troubleshooting tips. Below we list essential commands for maintaining your DataLens instance.
