PKS login fails with "Error: Unable to send a request to API: Head https://pks-api_FQDN:9021/v1/clusters: dial tcp 10.1.250.226:9021: connect: connection refused"
book
Article ID: 314953
calendar_today
Updated On:
Products
VMware PKS 1.x
Issue/Introduction
Symptoms:
You are unable to access the PKS environment.
Log in to PKS-API fails with an error similar to:
PKS login fails with "Error: Unable to send a request to API: Head https://pks-api_FQDN:9021/v1/clusters: dial tcp 10.1.250.226:9021: connect: connection refused"
When you check the port 9021 usage on the pks-api vm, it returns nothing suggesting that service is not running.
`netstat -a | grep 9021`
Environment
VMware PKS 1.x
Cause
This issue occurs when the pks-api service is not running on the pks vm.
Resolution
To resolve this issue, restart the pks-api service on PKS vm:
Search for the deployment name for pks vm by running the command: bosh vms Sample output to identify pks deployment:
Deployment 'pivotal-container-service-e73381c6add2d0349f78' Instance Process State AZ IPs VM CID VM Type Active pivotal-container-service/########-####-####-####-##########25 running PKS-Resources 192.168.2.61 vm-########-####-####-####-##########eb large true
Connect to pks vm by using bosh ssh: bosh ssh -d <deployment name for PKS VM>
Switch to sudo mode: sudo -i
Check the service status by running the command: monit summary
Restart the pks-api service by running the command and wait until the service shows running again: monit restart pks-api