The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to register at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Software Development Kit (SDK) and API Discussions

Errno 61 - connection refused - NMSDK 5.6 Python

AJ
NetApp

Not a full time programmer, but trying my hand at NetApp APIs. I'm getting connection refused when connecting to CDOT filer using SDK 5.6. 

 

 

filer = sys.argv[1]
user = sys.argv[2]
password = sys.argv[3]

s = NaServer(filer, 5, 6)
s.set_server_type("Filer")
s.set_admin_user(user, password)
s.set_transport_type("HTTP")
output = s.invoke("system-get-version")

if(output.results_errno() != 0):
r = output.results_reason()
print("Failed: " + str(r))

else :
r = output.child_get_string("version")
print(r + "\n")

 

User@~/PycharmProjects/Training$ python template.py my.ip admin my.password
Failed: [Errno 61] Connection refused

 

I am using the admin user and password and connecting to the cluster mgmt IP address. Looking for some advice. Thanks!

 

 

 

1 ACCEPTED SOLUTION

asulliva

Hello @AJ,

 

A few things to test/check.

 

  1. The ZAPI version should be 1.X, with the X being dependent on the version of ONTAP you're using.  For example, ONTAP 9 = 1.100, 9.1 = 1.110.  You'll want to change the NaServer object to look something like this:  
    s = NaServer(filer, 1, 100)

     

  2. Try and echo/print out the filer, user, and password variables.  Make sure they are equal to what you expect them to be.
  3. Ensure that HTTP access is enabled on your cluster for the interface you're connecting to.
  4. Ensure the user you're using has ONTAPI access granted (though I don't think this is the issue, you would get a different error).

Hope that helps!

 

Andrew

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

View solution in original post

1 REPLY 1

asulliva

Hello @AJ,

 

A few things to test/check.

 

  1. The ZAPI version should be 1.X, with the X being dependent on the version of ONTAP you're using.  For example, ONTAP 9 = 1.100, 9.1 = 1.110.  You'll want to change the NaServer object to look something like this:  
    s = NaServer(filer, 1, 100)

     

  2. Try and echo/print out the filer, user, and password variables.  Make sure they are equal to what you expect them to be.
  3. Ensure that HTTP access is enabled on your cluster for the interface you're connecting to.
  4. Ensure the user you're using has ONTAPI access granted (though I don't think this is the issue, you would get a different error).

Hope that helps!

 

Andrew

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

View solution in original post

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