Executing an NPS CLI command fails

Symptom
Users receive the following error message while running an NPS CLI command:
[root@localhost ~]# nps show -p switch_profiles
Starting new HTTPS connection (1): 10.XX.XX.XX
Starting new HTTPS connection (1): 10.XX.XX.XX
Failed to do None due to Error in Generating token, No JSON object could be decoded

Also, the nps_error.log file shows Error -3 connecting to redis:6379. Temporary failure in name resolution.

Cause
  • The IP address of the NPS server provided in the input.yaml file while installing the NPS toolkit Web API server is either not reachable or reachable but not resolvable.

  • The Redis container is not reachable.

Action
  1. Verify if the IP address provided in /etc/resolv.conf is reachable. If not, provide any reachable IP address.
  2. Run following commands:
    systemctl stop kubelet
    systemctl stop docker
    systemctl start docker
    systemctl start kubelet