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

Nexus 5672 python

altaf007
Level 1
Level 1

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
VIP Alumni
VIP Alumni

Hi 

Does smtp server have a fqdn? 

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

Hopefully it will work

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

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