No handlers could be found for logger “paramiko.transport”

淺唱寂寞╮ 提交于 2019-12-23 06:13:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!