ONTAP Rest API Discussions
ONTAP Rest API Discussions
The following error i got when i'm running the commands when i'm using ONTAP Select, where we can't configure the service-policy on the lif
i have 20 HA ONTAP Select systems, and i'm getting the error below for 2 HA ONTAP Select systems.
when running the following command for svm1 on the cluster "connect-nccontroller svm1 -credential $credential -verbose -debug - https"
and providing the right local username/password, we can see the name of the svm and the ontap version, but
when running the same command for svm2, we are getting the following error:
verbose: trying http/ https
connect-nccontroller" cloud not command to svm2 on port 443 for protocol https
connect-nccontroller -name svm2 - https -credential $credential -V...
category info: invalidresult :(svm1:nccontroller) [connect-nccontroller], naconnectionSSLexception
fullyqualifederrorid: httpconnection failed,dataontap.c.powershell.sdk.connnectnccontroller
verbose: failed to connect to svm2
verbose: setting value of
global:currentnccontroller
verbose: starting ems logging
verbose: failed to complete emc logging object reference not set to an
instance of an object
i have create new ssl certificate for svm1 and svm2, but still not working.
ontap powershell version 9.9.1.2106 , ontap version 9.5P5
tried running the command for svm2 with the ip of one of the interfaces , svm name, full dns name
of the svm.
svm1 and svm2 are using "dns load balancing", each svm has 4 lifs.
If the service policy on the target LIF isn't configured correctly, then using the powershell commands will not work.
Are you able to connect to the console to configure the LIF service policy from there?
Hi,
Sorry for the late respond, I didn't saw any service policy on the ONTAP Select cifs vserver, i only saw that i have service-policy on the cluster (intercluster-core 0.0.0.0/0 and management-bgp 0.0.0.0/0), the same configuration is configured at all the other ONTAP Select that are working.
Hello @YehudaLevi1999 ,
From the errors you shared, the initial connection handshake is failing, thus any other powershell calls will fail. Below are a few observations:
Your command includes a blank space between the dash - and HTTPS argument, resulting in the connection to first attempt HTTP method and failing:
"connect-nccontroller svm1 -credential $credential -verbose -debug - https"
Here we see the HTTPS being ignored:
verbose: trying http/ https
Here we see the blank space between the dash and HTTPS again with the additional argument to call upon variable $credential to authenticate:
"connect-nccontroller -name svm2 - https -credential $credential -V.."
Then we see the error header failing to connect via HTTP not HTTPS:
"category info: invalidresult :(svm1:nccontroller) [connect-nccontroller], naconnectionSSLexception
fullyqualifederrorid: httpconnection failed,dataontap.c.powershell.sdk.connnectnccontroller"
Please check the command for any syntax errors, along with the configuration for $credential; to eliminate HTTPS or SSL certificate as the issue, simplify the $credential variable configuration and test using HTTP.
Sharing a connection test I used in a lab:
PS LAB> $creds_nc1 = Get-Credential -message 'Please provide password for nc1'
PS LAB> $creds_nc2 = Get-Credential -message 'Please provide password for nc2'
PS LAB> $nc1 = Connect-NcController lab-cluster1 -Credential $creds_nc1
PS LAB> $nc2 = Connect-NcController lab-cluster2 -Credential $creds_nc2
Regards,
Team NetApp