cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
103
Views
0
Helpful
3
Replies
Beginner

Nexus 5672 python

switch : Nexus 5672
OS version : 7.3.3

I am getting following error when i try to execute below python command 

1. SSH to Nexus 5672 using my admin credential

2. type python to access python shell

3. typed following in python shell :

  import smtplib

 smtplib.SMTP("1.1.1.1")

 

Error : No route to host

I am able to ping host from Nexus 5672. I don't think it's routing issue.  I am using default vrf.  Please let me know if you have any suggestion. Thanks

 

3 REPLIES 3
omz Enthusiast
Enthusiast

Re: Nexus 5672 python

Hi 

Does smtp server have a fqdn? 

try fqdn (mail.example.com) instead of IP address. 

Hopefully it will work

Highlighted
Beginner

Re: Nexus 5672 python

Hi, 

I tried your suggestion by using fqdn and now i got  following error

socket.gaierror: [Errno -2 ] host nor service provided, or not known

Beginner

Re: Nexus 5672 python

Hi, 

I tried your suggestion by using fqdn and now i got  following error:

 

socket.gaierror: [Errno -2 ] host nor service provided, or not known

CreatePlease to create content
Content for Community-Ad