-
Notifications
You must be signed in to change notification settings - Fork 32
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
No handlers could be found for logger "paramiko.transport" #35
Comments
That is just a Paramiko warning (which doesn't matter); there is likely a separate error. Can you post the entire output of what you received? Kirk |
it stays there with that output, and I don't get any type of information. I have to manually cancel the task. |
Can you post your code and the output you see on the screen? How long are you waiting before break out of the task? Kirk |
I never get a any timeout , but I found that the issue starts when I have to add the static route to access that devices. If I remove the route I only get a timeout, but if I add the route to access , i get the error. |
Okay, please post your code and the output you see when you execute your code. The paramiko logging message is an unimportant logging warning so that is a side-effect of some other issue. Kirk |
My bad, I thought this was a straight Netmiko issue, not netmiko_tools. |
@opnine How long are you waiting for the timeout. You probably have to wait at least two minutes (in certain contexts). |
I neve get the time out . |
What operating system are you on? What is the path to Did files get created in ~/.netmiko/tmp? Kirk |
I get this same error. I've tried both installs (git and download tar), doesn't seem to make a difference. I've tried it on Ubuntu 16.04, Ubuntu 18.04 and CentOS 7.4. The files do get created, however all they have in them is %%%failed%%%. I have let it run for ~45 minutes and the only way out is to CTRL-C. Command: ./netmiko-grep 'zone' all I have verified that Paramiko, Netmiko, grep and netmiko-grep are all in my PATH. On the hosts I've installed the full netmiko toolset, I've tried netmiko-show and netmiko-cfg with the same results. My inventory file [.netmiko.yml] is in the same directory as netmiko-grep and it is below. I also tried it in my home dir and get the same results. test: |
@collin-clark What does the output of this show:
|
|
@collin-clark FYI, you can wrap it in triple backtick:
|
@collin-clark Does this user:
Have privilege level 15 (i.e. it needs to be able to do 'show run')? |
Yes, he does. |
The router (10.0.0.63) never shows a login attempt. |
Okay, I would take it out of netmiko-tools and try it directly in Netmiko: from netmiko import ConnectHandler
my_device = {
"device_type" : "cisco_ios",
"ip": "10.0.0.63",
"username": "mmessier",
"password": "password",
"port": 22,
}
net_connect = ConnectHandler(**my_device)
output = net_connect.send_command("show run")
print(output) And see what happens (note, I changed the password, but everything else should be identical). |
Try to execute that with the correct password and see what occurs. |
That works. I see the 'show run'. |
Okay, it would be interesting if in the netmiko-grep executable, you commented these two lines out: def ssh_conn(device_name, a_device, cli_command, output_q):
# try:
net_connect = ConnectHandler(**a_device)
net_connect.enable()
output = net_connect.send_command_expect(cli_command)
net_connect.disconnect()
# except Exception:
# output = ERROR_PATTERN
output_q.put({device_name: output}) In other words, comment out the try/except so that the exception just happens. You might have to fix the indentation also. |
This way, hopefully, we can see the actual exception. |
It just hangs there, no more output. |
What do you see if you add a print statement here? def ssh_conn(device_name, a_device, cli_command, output_q):
# try:
print(a_device)
net_connect = ConnectHandler(**a_device)
net_connect.enable()
output = net_connect.send_command_expect(cli_command)
net_connect.disconnect()
# except Exception:
# output = ERROR_PATTERN
output_q.put({device_name: output}) |
That seems to look good. |
I assume you tested the netmiko script and netmiko-tools from the same exact machine using the same exact virtual environment? I am not really seeing any difference between those two from a code perspective, but in the netmiko_tools case it doesn't look like the traffic is exiting your machine. You don't have any firewall or or SE-linux that would be blocking it in this case? |
I jumped over to my Ubuntu box and made the same changes as we did on the CentOS box (verified no firewall/SE). It however has a larger inventory. I ran it and I get the same results, however there is a a couple of new additional traceback that may be helpful.
|
Okay, that would lead me to believe that it can't reach that IP address on port 22 (from that machine). |
Ahhh, old device, sorry about that. In digging a little deeper I noticed that the info from the print statement we added, that the username is not in single-quotes. Does that matter?
|
Yes, the username should be quoted in the print output. I would quote it in your source YAML file and re-test:
|
I quoted it in my YAML file, but in the print statement, its still showing without any quotes. |
I'm sorry, I am incorrect. When quoting in the YAML it IS working. Verified on Ubuntu 18.04 and CentOS 7.4. |
Ugly...weird. I wonder if there is a hidden character in your YAML file. You could try to print(repr(a_device['username'])) But it looks like you have it working. But anyways looks like it is fixed. |
Paramiko version = paramiko (2.4.1)
./netmiko-show --cmd "show ip int brief" cisco
I get the error in the subject.
The text was updated successfully, but these errors were encountered: