Common issues

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

Common issues

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

Resetting the CONTROL_API_CRYPTO_KEYencryption key

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

If you are using a connection to an external database:

#!/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:

./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:

#!/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)

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:

sudo systemctl stop firewalld
sudo systemctl disable firewalld

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

Example for firewalld:

# 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

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.

Deployment via 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:

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

You need to create or update the file located at:

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

File contents:

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:

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

HTTP-to-HTTPS redirects

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

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:

    ./bin/helm-amd64 -n datalens-enterprise history datalens-enterprise | grep 'Upgrade complete' | tail -n1
    
  2. Find out the release number; in our example this is 11:

    11          Jun 18 10:00:30 2025    deployed    datalens-enterprise-0.0.4    25.9.0    Upgrade complete
    
  3. Roll back to the latest good release:

    ./bin/helm-amd64 -n datalens-enterprise rollback datalens-enterprise 11
    
  4. Restart the required release using ./init.sh.

Results

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