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
Handle Paramiko-level "logger" issues #51
Comments
|
This is still an occasional problem in many ways, and I think it's because any time Paramiko/ssh try emitting a statement above the default visibility level, this comes up. It's not really a "bug" to be fixed at that level, I don't think. Instead we should integrate it with #57, though likely shunting all ssh-level log traffic to its own file or even to a null handler (i.e. so it doesn't go anywhere but still doesn't raise the warning.) |
|
This is definitely worth addressing. here's an example: """ Fatal error: No existing session Underlying exception: The problem here was that I'd never ssh'ed into h1 before, and I think the message being logged is something about verifying the host key. I manually ssh'ed into h1, that worked fine (give or take a yes, yes, yes) and could then run the fabric command just fine. |
|
Sorry, should have said: this is with Fabric 1.4.0 |
|
@cjw296 In that case I'd actually argue So maybe there's a few different ways we need to update either ourselves or |
|
Agreed about the ssh package, where should I submit that issue? For the fab script, a StreamHandler should be configured up front so |
|
I can make a ticket on the I'll try to replicate myself. Re: handlers: yea, we intend to implement logging for Fabric itself which would then be capable of catching other libs' log messages too. #57 IIRC. |
|
I can't replicate this on my end, unknown hosts don't cause any logging handler errors at all. Can you verify on your end & provide the fabfile + invocation + full output? |
|
I can't verify either. This was with a new user who hadn't properly had his account setup. Sadly, the user has now been correctly set up and I can no longer reproduce. To be clear: this issue here is the lack of a configured logger, any other issues can be raised separately if they re-occur... |
|
Well, configured logger would be #57 :) though I notice that's not mentioned in the description here, I'll add a note. |
#################################################### The above program stucks and give statement as: If i do CTRL C File "processparamiko.py", line 83, in If i call self.chan.exec_command(cmd) in sshconn function and comment the trans function then the program works. I am using Paramiko 1.11 on Python 2.7 on Ubuntu 13.04 |
|
I am getting the same error using Fabric-1.7.0. |
|
The error also happens using 1.8.0. |
|
The error happens using Fabric 1.10.1 & Paramiko 1.15.2: No handlers could be found for logger "paramiko.transport" Looks like this happens when is not possible to connect via SSH to the server :-P |
|
I also have the problem -- Fabric 1.10.1 & Paramiko 1.15.1~ |
|
Same problem here with the latest of everything, it seems to happen when the connection to the host hangs 😄 Here's how I worked around it: import logging
logging.basicConfig()
paramiko_logger = logging.getLogger("paramiko.transport")
paramiko_logger.disabled = TrueThis was added to the top of my fabfile.py file. |
|
@fgimian - I am still not able to do it and I get the same error. Can you help. #!/usr/bin/env python from fabric.api import env, run env.hosts = [ '10.0.2.2' ] def uptime(): |
|
I think it might be your order. Here's the start of my fabfile.py 😄 import logging
from fabric.api import env, task, abort
from fabric.exceptions import CommandTimeout, NetworkError
from fabric.state import output
# Workaround for: No handlers could be found for logger "paramiko.transport"
# (see https://github.com/fabric/fabric/issues/51#issuecomment-96341022)
logging.basicConfig()
paramiko_logger = logging.getLogger("paramiko.transport")
paramiko_logger.disabled = TrueCheers |
|
I got the same error because of the 'env.port' variable. The value of 'env.port' which I specified is different from the server which contained in the 'env.roles' |
Description
This has come up at least twice now: a user sets
env.userto a list instead of a string by mistake, and instead of an actual useful error, we get a funkyNo handlers could be found for logger "paramiko.transport"message.Quick research implies that this is a Paramiko level bug, as we don't use the logger module ourselves and that particular logger name is used in Paramiko itself. However, if it is, it's not caught in their test suite.
Attack plan:
useris set to a list value.Originally submitted by Jeff Forcier (bitprophet) on 2009-08-14 at 09:58am EDT
Relations
The text was updated successfully, but these errors were encountered: