question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

3.x appears broken for Linux systems: timeout with very simple usage.

See original GitHub issue

Here’s my test program with netmiko==3.1.0, paramiko==2.7.1:

import sys
import logging
from netmiko import ConnectHandler
logging.getLogger("netmiko").setLevel(logging.DEBUG)
netmiko = logging.getLogger("netmiko")
netmiko.setLevel(logging.DEBUG)
netmiko.handlers.clear()
stream = logging.StreamHandler(stream=sys.stderr)
message_format = "%(asctime)s %(name)s %(levelname)s: %(message)s"
stream.setFormatter(logging.Formatter(message_format))
netmiko.addHandler(stream)
logging.getLogger("paramiko").setLevel(logging.DEBUG)
paramiko = logging.getLogger("paramiko")
paramiko.setLevel(logging.DEBUG)
paramiko.handlers.clear()
stream = logging.StreamHandler(stream=sys.stderr)
message_format = "%(asctime)s %(name)s %(levelname)s: %(message)s"
stream.setFormatter(logging.Formatter(message_format))
paramiko.addHandler(stream)

connection = ConnectHandler(host="127.0.0.1", port=10001, username="operator", password="****", device_type="linux")

result = connection.send_command('echo "cable modem deny 0015.f2fe.ba11"; echo "cable modem deny 0015.f2fe.ba12"; echo "cable modem deny 0015.f2fe.ba13"')
print(result)

This program worked before (on 2.4.2 IIRC), but fails now with a timeout. Will attach log output. For what it’s worth, I’m using panubo/sshd:1.0.2 for my test Linux sshd box. It’s pretty handy. docker run -d -p 10001:22 panubo/sshd:1.0.2. You’ll have to set the password on operator with docker exec before you can ssh into the container.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Alan-Rcommented, Apr 16, 2020

OK. I have no idea why this helps, but it does. I’ll close this and leave the other one open.

0reactions
Alan-Rcommented, Apr 16, 2020

It’s been my experience that rows and columns only affect curses-based programs (which ask the driver, and changes the behavior of curses programs) . The normal Linux/UNIX tty driver ignores them. They’re there for the reference those programs who care. And the echo program certainly doesn’t care (which is all I was doing).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linux timeout command using actual time? Broken binary?
After trying some stuff I think I figured out that the issue is that my timeout binary doesn't use the actual system time,...
Read more >
[SOLVED] How to Fix the ERR_CONNECTION_TIMED_OUT ...
This tutorial is a step-by-step guide with screenshots that will explain the top 11 methods to fix the 'Err_Connection_Timed_Out' Error:.
Read more >
Timed out while waiting for the machine to boot when vagrant up
There was an error dialog and it keeps waiting. That was the reason for the connection timeout. To fix this i had to...
Read more >
A beginner's guide to network troubleshooting in Linux - Red Hat
A beginner's guide to network troubleshooting in Linux. Every system administrator needs to have at least a basic understanding of network ...
Read more >
Increasing the disk timeout values for a Linux 2.6 virtual ...
These issues occur when the guest operating system timeout values are exceeded for attached storage disks. This may be caused by an underlying ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found