-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'socket.timeout: timed out' error is seen when running a 'show' method call #21
Comments
Did you enable NXAPI on the switch? You can do this with the "feature nxapi" command.
|
thanks for the reply - I actually added that on the switch, and it still didnt work: Then, repeating the above procedure also showed me the same error: Python 2.7.10 (default, Sep 8 2015, 12:40:37)
thanks |
Can you provide the out of "show nxapi" and also verify you can access the NXAPI sandbox environment by going to http://switchip you may need to do "nxapi sandbox" command for this.
|
And please make sure you are using the management interface on the switch. That said, ensure at least port 80 is allowed on this interface.
|
sure jason, Here is the show nxapi output: show nxapi also, when I open a browser to the IP of this switch to see the API sandbox - this works, I can see the sandbox and run commands on it via the UI. Any idea what that might be? Thanks, |
Can you verify you're using the management IP address?
|
the management interface is the one that I use in order to connect to the switch's sandbox: interface mgmt0 thanks, Tomer |
Another thing which might be interesting, is that when I call:
Shouldn't we see an authentication error here? just wondering... |
and lastly - some info about the Linux machine that I try running this from: Not sure if this might be the root cause, but I thought of sharing this with you as well. Thanks again for the help on that, Tomer |
Okay, try this...guaranteed to work...if it doesn't.... :)
On Fri, Dec 18, 2015 at 2:19 PM, tdichter [email protected] wrote:
|
looks like I cannot connect to that IP address with ping from the Linux machine I work with... |
It's on the public Internet. Maybe your corp IT is blocking. |
could be - but this is the same Linux that I ran Python automation on other vendors and all seems to work - only with the Cisco gear we have issues... |
Want to do a "pip install pycsco --upgrade" to be safe ? On Fri, Dec 18, 2015 at 2:53 PM, tdichter [email protected] wrote:
|
sure - I just ran it now: pip install pycsco --upgrade --proxy=64.102.255.40 now repeating the same sequence - still the same 'socket.timeout: timed out' error. |
The only other differences are my testing is on Ubuntu running Python 2.6. |
hmmm - you might be up to something, cos another colleague who works with the same Linux OS on the same Python distro is able to run this... thanks for the info on that :-) |
Okay, I'll keep this open for a few days. Would be good to find out if the problem is the OS, version of Python, or something else :) |
sure - if there is a section of "known issues" or "release" notes, this piece of information can be mentioned there to let users know ... Thanks, |
Or we narrow down the issue to OS or Python version, and implement the fix :)
|
True - until that can be done, we can publish something about that possible incompatibility that was found. |
I think that this issue can be closed and until proven differently, we can say that there is a compatibility problem when running this API on Python 2.7 running on a RHEL 6.5 OS. I used the web based sandbox tool to generate Python API's from the generated code and make it open enough to be used on any switch needed, and also to scale up to as many switches the users will wish to automate. Thanks for the help, |
Hi,
I have a switch that I can manually ssh to and run all the cli's.
I installed pysco on my Linux and all seems to work fine with respect to that.
However, when I run the 'show' method, I get a socket.timeout error
here is the screen shot:
Python 2.7.10 (default, Sep 8 2015, 12:40:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Can you please advise what is needed to be done to make it work?
Do I need to activate anything on the remote switch to have this working?
Thanks,
Tomer
The text was updated successfully, but these errors were encountered: