Active IQ Unified Manager Discussions

WFA cannot connect to array on perl command

THORSTEN_KRAUSE

Hello,

 

got a problem in a WFA-Workflow.

I'm using several WFA commands in a workflow to work on a single cDot-cluster.

I use a couple of Powershell-commands that work flawless (connect & execute)

and one perl-command (from Netapp - "SnapMirror initialize or update set")

which fails on connecting to the array.

I did not change anything on the Perl-configuration that comes with WFA.

WFA is latest version 3.1.0.0.1P1 Build 3511759

Server is Win2012 R2 freshly installed.

 

Hope somebody can help me here?

 

Regards,

Thorsten

1 ACCEPTED SOLUTION

THORSTEN_KRAUSE

Hey,

 

sinhaa found the error:

in my case, it was a misinterpretation in wfautil.pm

Problem was that if you got a password that contains quotes or ampersands,

wfautil.pm will wrongly interpret it.

 

sinhaa filed a bug for that, hopefully it'll be fixed in WFA 4.0 GA

 

Regards and thanks for the help

View solution in original post

25 REPLIES 25

Rutul

I am also facing the same issue. Please update if anybody has found the solution

Rutul

Hi All,

 

@sinhaa gave me the solution of this problem when he tried to debug this issue in my WFA environment. 

 

What we tried - 

 

1. Tried the Perl code posted by Abhishek Sinha, by running into command prompt

 

 

####

 

use NaServer;

 

#Set Array credentials below
$array="10.20.30.40";
$username = "admin";
$pass = "mypass";

 

$server = NaServer->new($array, 1, 14);
$server->set_style('LOGIN');
$server->set_admin_user($username, $pass);
$server->set_transport_type('HTTPS');
$server->set_server_cert_verification(0);
$output = $server->invoke( "system-get-version" );
if (ref ($output) eq "NaElement" && $output->results_errno != 0) {
# failed to establish connection
print "Connection failed";

print $output->results_reason;
}
else {
# successfully connected
print "Connected successfully";
}

 

########

 

2. It gave us the error as "Can't locate NaServer.pl @INC .."

 

Therefore we added the new Environment Variable as shown below. 

 

Go to MyComputer Properties > Click on "Advanced System Settings" > Press "Environment Variables" button > Add the New variable in System Variables section:

 

Variable Name:  PERL5LIB

Variable Value:  C:\Program Files\NetApp\WFA\perl\nmsdk; C:\Program Files\NetApp\WFA\Perl64\lib; C:\Program Files\NetApp\WFA\Perl64\site

 

After this I was able to connect to Array in WFA workflow using perl scripting. Thanks @sinhaa for the help.

 

All those who are facing this issue can try the same solution. 

 

@sinhaa and @abhit Let me know if I have missed something here.

THORSTEN_KRAUSE

Hey,

 

sinhaa found the error:

in my case, it was a misinterpretation in wfautil.pm

Problem was that if you got a password that contains quotes or ampersands,

wfautil.pm will wrongly interpret it.

 

sinhaa filed a bug for that, hopefully it'll be fixed in WFA 4.0 GA

 

Regards and thanks for the help

View solution in original post

MATTHEWKOOSWN

Sinhaa,

 

I have this same issue.  Perl commands (in my cast transfer snapmirror) that were working previously when I was running WFA 3.1P1 seem to have been broken when I upgraded to WFA 3.1P2.  I am getting the same unable to connect to array error.  I tried adding in the cluster management name and IP into the hosts file and that changed the behavior of the problem.  It doesn't error out immediately instead it sits for a very long time and comes back with the following error:

 

C:\Program Files\NetApp\WFA\Perl64\bin>perl myfile.pl
Connection failedServer returned HTTP Error:

 

I tried adding in the environment variable as well as another poster suggested but it did not help.  Do you have any suggestions for me to try?

 

Thanks,

Matt.

 

sinhaa

@MATTHEWKOOSWN

 

Matt,

 

Unable to connect using perl commands is a very generic error and comes due to many reasons, they all have to be dealt case by case basis. I suggest you raise a netapp support case, so that I can have a look at your WFA env. Else its very difficult to pin-point the error and it will take long time as well.

 

 

I assure you, it will be resolved.

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public