Microsoft Virtualization Discussions

Getting HTTPS error when running Invoke-NaSnapmirrorResync command

bsti
3,885 Views

I'm using RPC, and the command appears to run the resync OK, but for some reason I see this error after running the resync command:

Invoke-NaSnapmirrorResync : Could not connect to myfiler on port 443 for protocol HTTPS.

At line:1 char:26

+ Invoke-NaSnapmirrorResync <<<<  -Destination myvolume_sm

    + CategoryInfo          : InvalidOperation: (myfiler:NaController) [Invoke-NaSnapmirrorResync], NaConnectionException

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Snapmirror.InvokeNaSnapmirrorResync

I'm not sure why it's trying to connect with HTTPS, I don't use it (and I don't think it's allowed to my backup site).  I am attempting this command over a WAN link to our backup site. 

I'm using the the Toolkit version 1.4.0.122

Thanks!

1 ACCEPTED SOLUTION

cknight
3,885 Views

There are only two API calls in Invoke-NaSnapmirrorResync, one to start the resync and one to re-read the snapmirror relationship status.  How long does it take to return the error?  The default timeout is 10 seconds, but you can change that anytime on the controller object.  It's also worth double-checking how you are connected; I don't see anything in the code that can return the HTTPS error string you reported if the connection is RPC.

PS C:\> $global:CurrentNaController | Format-List *

Ontapi             : 1.14

OntapiMajorVersion : 1

OntapiMinorVersion : 14

Version            : NetApp Release 7.3.5: Mon Nov 22 21:32:44 PST 2010

Vfiler             :

Protocol           : HTTPS

Proxy              :

TimeoutMsec        : 10000

Name               : dunn

Address            : 10.61.167.60

Port               : 443

Credentials        : System.Net.NetworkCredential

ValidateIncoming   : False

ValidateOutgoing   : False

Trace              : False

View solution in original post

6 REPLIES 6

cknight
3,885 Views

The Toolkit normally defaults to RPC, unless credentials are available (including from the creds cache).  Are you sure you're using RPC?  Does the same occur if you connect using the -RPC switch?  Is there a cmdlet timeout occurring?

bsti
3,885 Views

Clinton, thanks for the response:

I didn't use the -RPC switch.  I think it normally defaults to RPC when I run Connect-NaController with no special switches.  In my case, it's not dying on the Connect-NaController call, it's erroring on the Invoke-NaSnapmirrorResync call.

I don't see a timeout at all, and the command actually succeeeds (the resync occurs successfully).  THis error must be triggered by some other post process that runs after the resync.  I'm not sure what it could be, but thought it strange.

cknight
3,886 Views

There are only two API calls in Invoke-NaSnapmirrorResync, one to start the resync and one to re-read the snapmirror relationship status.  How long does it take to return the error?  The default timeout is 10 seconds, but you can change that anytime on the controller object.  It's also worth double-checking how you are connected; I don't see anything in the code that can return the HTTPS error string you reported if the connection is RPC.

PS C:\> $global:CurrentNaController | Format-List *

Ontapi             : 1.14

OntapiMajorVersion : 1

OntapiMinorVersion : 14

Version            : NetApp Release 7.3.5: Mon Nov 22 21:32:44 PST 2010

Vfiler             :

Protocol           : HTTPS

Proxy              :

TimeoutMsec        : 10000

Name               : dunn

Address            : 10.61.167.60

Port               : 443

Credentials        : System.Net.NetworkCredential

ValidateIncoming   : False

ValidateOutgoing   : False

Trace              : False

bsti
3,885 Views

Clinton, sorry for  the delayed repsonse.  Per your suggestion, I checked out the default Protocol Connect-NaController uses to connect.  It appears Connect-NaController [controller name] is defaulting to HTTPS on my machine.  I verified this by calling it and checking the Protocol property.  I assumed it would always default to RPC.  It always seemed to in previous versions of the toolkit. 

Fortunately, I make all my calls to Connect-NaController though a library function so I only need to make a change to one line of code to force it to RPC.  Thanks!

cknight
3,885 Views

Without any arguments to force a given protocol, the Toolkit does still default to RPC unless you have cached credentials.  Try Get-NaCredential to see what you may have saved.

bsti
3,885 Views

Aha.  Good to know.  I have credentials for ALL of my filers because I use invoke-nassh all of the time.  Thanks!

Public