Microsoft Virtualization Discussions

Virtual filer problem: Connect-NaController : API invoke failed.

NORSKHYDROSTORAGE
4,996 Views

Hello.

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:

=======================

Import-Module DataONTAP

$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

httpd.access                 legacy

httpd.autoindex.enable       off

httpd.bypass_traverse_checking off

httpd.enable                 on

httpd.ipv6.enable            off

httpd.log.format             common

httpd.method.trace.enable    off

httpd.rootdir                XXX

vfilerB@toaster2> options http

httpd.access                 legacy

httpd.autoindex.enable       off

httpd.bypass_traverse_checking off

httpd.enable                 on

httpd.ipv6.enable            off

httpd.log.format             common

httpd.method.trace.enable    off

httpd.rootdir                XXX

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?

3 REPLIES 3

NORSKHYDROSTORAGE
4,996 Views

Hi. Can anyone help or propose suggestions on this problem?

beam
4,996 Views

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)

$error[0].Exception.InnerException

-Steven

ARB
3,872 Views

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.

http://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/Having-problems-connecting-to-a-filer-using-network-credentials/m-p/3502...

 

 

Public