Skip to content
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

Add timeout to tty_netconf.open #29

Open
shermdog opened this issue Mar 4, 2015 · 4 comments
Open

Add timeout to tty_netconf.open #29

shermdog opened this issue Mar 4, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@shermdog
Copy link
Contributor

shermdog commented Mar 4, 2015

There are situations where trying to open netconf via telnet hangs (such as if the session is in config mode).

Add timeout here to bail out if the netconf session doesn't start.

@shermdog shermdog added the bug label Mar 4, 2015
@shermdog shermdog self-assigned this Mar 4, 2015
@shermdog shermdog added this to the 1.1.0 milestone Mar 4, 2015
@dgjnpr
Copy link

dgjnpr commented Jan 12, 2016

+1 FYI @vnitinv

I recently hit this bug but for a different reason. It seems that sometimes the tty session does not "see" the first two XML comment lines when the netconf session is initiated. As such it hangs forever.

Given these comment lines are not strictly necessary I recommend a search for the "" tag that is part of the protocol.

I'm happy to run a debug release to triage what is really being returned by the device. I did look at doing this myself but it is beyond my current python skills.

@r2600r
Copy link
Contributor

r2600r commented Mar 17, 2016

The hang is result of while True: loop located in many places. I had included timeout interval in my branch which now successfully break the infinite loop.

@dharpatel
Copy link

I had the same issue which @dgjnpr has. So as @r2600r respond on this issue I have change the code and try to use that updated code. But then I am getting error like "Netconify Error: netconf not responding". So @r2600r do you have any idea about this error?

@r2600r
Copy link
Contributor

r2600r commented Apr 2, 2016

Dharpatel,that error means that netconify receive expected output from the device in specified time, 15 seconds. Enable flag for the detail output mode "--verbose 2". Netconify waits for "<!--" string, which is the beginning of the xml command output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants