2014-01-17 12:15 AM
We are using Powershell Toolkit to automate various routine tasks across a large number of filers, including only 1 virtual filer (vfilerA). All is working fine. However, another virtual filer was recently added for support, and for some reason we are completely unable to get our script to work with this one. This virtual filer (vfilerB) is hosted within the same HA pair as vfilerA, but it's on the different node.
Whenever we are trying to connect to vfilerB by using Connect-NaController cmdlet, we are getting the following error which prevents the script from further execution:
Connect-NaController : API invoke failed.
+ $filer = Connect-NaController <<<< $filerip -Credential $FilerCred
+ CategoryInfo : InvalidResult: (IPADDRESS:NaController) [Connect-NaController], NaException
+ FullyQualifiedErrorId : HttpConnectionFailed,DataONTAP.PowerShell.SDK.ConnectNaController
Sample script looks like below:
$secpasswd = ConvertTo-SecureString "PASSWORD" -AsPlainText -Force
$FilerCred = New-Object System.Management.Automation.PSCredential ("USER", $secpasswd)
$filer = Connect-NaController $filerip -Credential $FilerCred
After this command we are getting the error for vfilerB, but script connects successfully when it is vfilerA. Credentials are valid and accepted by other toasters. Almost all options (including HTTPD) are identical on both virtual filers and HTTPD.ENABLE is on:
vfilerA@toaster1> options http
vfilerB@toaster2> options http
Data ONTAP 8.1.3P2 7-MODE
Windows Server 2008 R2
Powershell version is 2.0
Powershell Toolkit is the latest one
Where the problem for this issue might be and how can we resolve it?
2014-01-21 07:00 AM
The "API invoke failed" error generally means something went wrong while attempting to send a request to the controller that wasn't explicitly handled by the Toolkit. The InnerException may provide a hint as to what exactly is going wrong:
(after the API invoke failed error)
2016-08-20 11:21 AM
I am also facing similar issue while connecting to 7M and Cdot filers.
It works fine sometime and it fails with the error posted in this issue. I am also looking for a solution eagerly if any.
As per the article mentioned it seems to be a bug if we try to use network credentials for logging. Not sure though if that is the case here.