TKGm shows error "Cannot get Connection from Datasource: java.sql.SQLRecoverableException: IO Error: Unknown host specified" while deploying application pods
search cancel

TKGm shows error "Cannot get Connection from Datasource: java.sql.SQLRecoverableException: IO Error: Unknown host specified" while deploying application pods

book

Article ID: 445330

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Management

Issue/Introduction

This is caused by a failure in name resolution within the cluster, preventing connectivity to critical application components or databases.

Environment

TKGm 2.5.4

Cause

The TKGm cluster nodes are configured with an incorrect or unreachable DNS server. This results in the cluster being unable to perform name resolution for required hostnames, causing application deployments to fail during site switchover activities.

Resolution

To restore application functionality, you must update the DNS server configuration to point to a valid nameserver.

  1. Identify the Correct DNS: Obtain the valid DNS server IP addresses for the target environment (DC site).
  2. Update Node Configuration: SSH into the affected TKGm nodes and update the /etc/resolv.conf file to include the correct nameserver entries.
  3. Verify Name Resolution: Confirm that the cluster can now resolve hostnames correctly by running:
    resolvectl status
    # OR
    nslookup ####
  4. Restart Services: If issues persist within specific Pods, restart the CoreDNS pods to ensure they pick up the updated host configuration.