Active IQ Unified Manager Discussions

WFA cannot connect to array on perl command

THORSTEN_KRAUSE
12,285 Views

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
9,879 Views

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

abhit
10,730 Views

To which version of ONTAP you are trying to connect?

 

Regards

Abhi

THORSTEN_KRAUSE
10,726 Views

Hello,

 

it's 8.3.1P1 (cDot)

 

Thanks for your help,

Thorsten

sinhaa
10,676 Views

Thorsten,

 

Kindly post the exact error that you are getting.

 

That could help in debugging.

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

THORSTEN_KRAUSE
10,278 Views

Sure, that's the command log output:

 

16:26:38.985 INFO  [SnapMirror initialize or update set] ### Command 'SnapMirror initialize or update set' in 'PERL' ###
16:26:44.564 INFO  [SnapMirror initialize or update set] Connecting to cluster: netapp1
16:26:44.595 INFO  [SnapMirror initialize or update set] Credentials successfully provided for 'netapp1'
16:26:45.798 INFO  [SnapMirror initialize or update set] Trying to connect to netapp1 using HTTPS
16:26:49.658 INFO  [SnapMirror initialize or update set] Trying to connect to netapp1 using HTTP
16:26:53.611 ERROR  [SnapMirror initialize or update set] Command failed for Workflow '_Create and configure SVM' with error :
Unable to connect to array
16:26:53.611 INFO  [SnapMirror initialize or update set] ***** Workflow Execution Failed *****

 

Can I provide any more logs that trigger down the cause besides that?

rkiran
10,666 Views

'netapp1' might not be reachable from wfa server.  Can you try to do test connectivity of 'netapp1' from GUI-->Execution-->Credentials dialog. Also, can you try to provide IP address or FQDN of the cluster to the command ?

 

THORSTEN_KRAUSE
10,662 Views

Hello,

 

connectivity and credentials are definetely working,

the command "Create Storage Virtual Machine" in said workflow to the same cluster using the same credentials does work:

 

16:25:27.325 INFO  [Create and configure Storage Virtual Machine] ### Command 'Create and configure Storage Virtual Machine' in 'POWER_SHELL' ###
16:25:36.091 INFO  [Create and configure Storage Virtual Machine] Get-WfaCredentials -Host netapp1
16:25:36.122 INFO  [Create and configure Storage Virtual Machine] Credentials successfully provided for 'netapp1'
16:25:36.185 INFO  [Create and configure Storage Virtual Machine] Connect-Controller -Type CLUSTER -Name netapp1 -Credential System.Management.Automation.PSCredential -Vserver  -Timeout 60000
16:25:36.263 INFO  [Create and configure Storage Virtual Machine] Connect-NcController (with credentials) -Name netapp1 -Timeout 60000 -ErrorAction Stop
16:25:43.435 INFO  [Create and configure Storage Virtual Machine] Connected to cluster node
16:25:44.342 INFO  [Create and configure Storage Virtual Machine] Creating a new Storage Virtual Machine - Name 'testsvm' , Aggregate 'aggr_sas900_01_netapp11' on Root Volume 'netapp1_root'
16:25:49.233 INFO  [Create and configure Storage Virtual Machine] Configuring Storage Virtual Machine with Allowed protocols 'nfs cifs
16:25:50.655 INFO  [Create and configure Storage Virtual Machine] Command completed, took 23330 milliseconds

 

--> only difference in that workflow is that the command that is not working is written in perl. All others (written in powershell) do work absolutely fine.

sinhaa
10,659 Views

Test-Connectivity uses powershell to verify connectivity. So this result was expected. To debug perl, can you do the following. 

  1.  Add a new command in language = perl and have this code. Just test it, it needs no inputs etc.

====

#Begin Code

 

use Getopt::Long;
use NaServer;
use WFAUtil;

 

my $Cluster="netapp1";

my $wfa_util = WFAUtil->new();


$wfa_util->sendLog('INFO', 'Connecting to cluster: ' . $Cluster);

my $server = $wfa_util->connect($Cluster);

 

#End Code

 

How does this work for you?

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

THORSTEN_KRAUSE
10,524 Views

Hey,

 

sry for long delay.

 

Tried it, exactly the same problem:

 

11:12:03.032 INFO  [test_connectivity] Connecting to cluster: netapp1
11:12:03.079 INFO  [test_connectivity] Credentials successfully provided for 'netapp1'
11:12:04.188 INFO  [test_connectivity] Trying to connect to netapp1 using HTTPS
11:12:12.220 INFO  [test_connectivity] Trying to connect to netapp1 using HTTP
11:12:15.111 ERROR  [test_connectivity] Failed executing command. Exception:
Unable to connect to array

 

--> Also installed a fresh WFA on a Win2012R2 Server, same result

 

--> Maybe some problem on securing the connection?

sinhaa
10,519 Views

There is a known problem with Perl NMSDK. If host names are unable to be resolved by the DNS, this problem is seen.

 

I suggest you add the hostname netapp1 in your WFA's windows's hosts file.

 

Got to: C:\Windows\System32\drivers\etc and open the file hosts for editing using some text editor like Notepad++

 

Add a line like

 

<IP_Address_of_netapp1>  <FQDN_of_netapp1>    netapp1

 

Save it

 

 

Now back to WFA and try the same test command.

 

sinhaa

 

 

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

THORSTEN_KRAUSE
9,712 Views

Hey,

 

tried that.

 

This doesn't help either, still the same error.

 

Some other suggestion?

 

Thanks

sinhaa
9,698 Views

@THORSTEN_KRAUSE

Have you tried giving the IP Address instead of the hostname to test the command?

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

THORSTEN_KRAUSE
9,694 Views

Hey,

yes, also tried that, same result

sinhaa
9,682 Views

@THORSTEN_KRAUSE

 

Okay lets keep WFA aside and try to see if any perl code is able to connect from your WFA server to your Array. This would help us to zero down the problem

 

below is a perl code, save it as  myfile.pl. Modify your array credentials as per your setting.

 

####

 

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";
}

 

########

 

On your WFA windows server, open a command prompt and execute this perl code. 

It will give result as Connected Successfully or Connection failed.

 

Awaiting your results.

 

sinhaa

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

THORSTEN_KRAUSE
9,203 Views

Hello, 

 

that seems to be working:

 

C:\Program Files\NetApp\WFA\Perl64\bin>perl D:\myfile.pl
Connected successfully
C:\Program Files\NetApp\WFA\Perl64\bin>

 

But why not from WFA? Some missing environment?

 

Thanks very much for your help!

THORSTEN_KRAUSE
9,211 Views

Hey,

 

sry, I thought I answered this last week, seems the comment got lost.

 

Whatever, that seems to work:

 

C:\Program Files\NetApp\WFA\Perl64\bin>perl D:\myfile.pl
Connected successfully
C:\Program Files\NetApp\WFA\Perl64\bin>

 

--> so basically the perl-connection seems to be working fine

--> where to look next?

 

 

Thanks very much for your help

THORSTEN_KRAUSE
8,686 Views

Hello,

 

yes that was successful, so it seems to be somewhere in WFA?

 

THanks

sinhaa
8,287 Views

@THORSTEN_KRAUSE

 

You can raise a case with NetApp. A NetApp TSE can look at this now. We can look at the cause and its correction.

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

THORSTEN_KRAUSE
8,278 Views

Alright,

did that, thanks for your help.

Will post the results here once analyzed

sheelnidhig
8,623 Views

Hello,

 

I am also facing the same issue.

The DNS resolution is also working well.

 

We could have a custom command on Powershell, but OnCommand Unified Manager does uses the default workflow's, not sure how can I attach a custom workflow with OnCommand Unified managers jobs.

 

Thanks,

Sheel

sinhaa
8,620 Views

@sheelnidhig

 

It needs to be looked at the environment your WFA is in. You raise a case and ask the TSE to contact me.

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public