问题
I am running some fabric tasks inside of flask. Flask is running inside of wsgi in apache. Once in a while I get this error in the apache logs:
No handlers could be found for logger "paramiko.transport"
I then have to restart apache for the fabric tasks that are called via flask to work again.
Any ideas here... I'm running Ubuntu 12.04
Fabric==1.5.3
paramiko==1.9.0
pycrypto==2.6
Flask==0.9
回答1:
Seems like the answer was to add disconnect_all() to all of my fabric functions. Now the problem seems to have gone away.
回答2:
I found the solution for paramiko from this website: https://translate.google.com/translate?hl=en&sl=zh-CN&tl=en&u=http%3A%2F%2Fwww.ouvps.com%2F%3Fp%3D869
Basically, you just need to add a line
paramiko.util.log_to_file("filename.log")
Then all connection will be logged to the file
Not sure where to put that line in fabric
来源:https://stackoverflow.com/questions/15437700/no-handlers-could-be-found-for-logger-paramiko-transport