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
undefined method `chomp' for nil:NilClass #424
Comments
Can you detail the usecase? Do you use password auth? Or do you have key auth? I assume you have public key auth which fails in every 100th cases and falls back to password auth that tries to ask for password which fails because the stdin is redirected. The error suggest that the app is non interactive and your stdin is redirected. You should be using the non_interactive option, so that no prompt will be asked. |
@mfazekas I haven't found the other issues while my research, I think can close this afterwards. Thank you. |
If you use non_interactive that means it will not ask for password, so might not be suitable for you $stdin.gets only returns nil for end of file. Is this an interactive prompt? Is the user pressing ctrl+D? |
I can't say to be honest. But I exepect it to be, see here: http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/sec_usr_ssh/configuration/15-e/sec-usr-ssh-15-e-book/sec-secure-shell-v2.html#GUID-5A1D0EE5-15BE-4F84-973F-E73FF4628C1A We just ran into that case every few days but the script is running every 10 minutes. So I will be able to say if it fixed it probably in a few days. |
Hello everyone
We have an issue every 200th time when we login into a cisco ios machine.
We get the following error:
undefined method `chomp' for nil:NilClass
We are using net-ssh 3.0.2 and ruby 2.3.1.
It looks like the machine sends EOF and gets returns nil. Is it possible to implement a rescue in the prompt method?
Kind Regards
tfluehmann
The text was updated successfully, but these errors were encountered: