Overblog
Editer l'article Suivre ce blog Administration + Créer mon blog
19 septembre 2009 6 19 /09 /septembre /2009 01:20
Noticing the fact that APT upgrades were becoming slower for a while, I started to investigate further.

After checking all the configuration files of APT and its logs, it became clear that the problem was not on the hosts that used the APT-proxy running on the server.

It looked like a Dos, or time out, or an APT resource. But it was not.

Unfortunately, the APT-proxy logs are not so verbose, but... considering the fact that a service has a special procedure to be stoped and started, the old reflex to reload the service and its configuration was helpful.


In fact, APT-proxy was just yelling during its start.
Here is what I got:

Starting apt-proxy:/usr/lib/python2.5/site-packages/twisted/manhole/telnet.py:8: DeprecationWarning: As of Twisted 2.1, twisted.protocols.telnet is deprecated.  See twisted.conch.telnet for the current, supported API.
  from twisted.protocols import telnet
None
/usr/lib/python2.5/site-packages/twisted/manhole/telnet.py:8: DeprecationWarning: As of Twisted 2.1, twisted.protocols.telnet is deprecated.  See twisted.conch.telnet for the current, supported API.
  from twisted.protocols import telnet
None

.

Thus, it appears that the real problem comes from Python, and more especially from one of its library: twisted.protocols.telnet

Obvisously, it was not possible to uninstall and reinstall Python, because of its numerus dependances.

I tried Google...
http://www.google.fr/search?rlz=1C1CHNU_enFR333FR333&sourceid=chrome&ie=UTF-8&q=/usr/lib/python2.5/site-packages/twisted/manhole/telnet.py:8:+DeprecationWarning:+As+of+Twisted+2.1,+twisted.protocols.telnet+is+deprecated.

The bug was confirmed, but no real solution provided:
https://bugs.launchpad.net/ubuntu/+source/apt-proxy/+bug/308376

The guys over there should also say that Debian stable Lenny is affected to.

Anyway, I dared to look deep into Apt-proxy source code. Guess what, it's written down in python ;)

Here is the solution I found : comment the line
from twisted.manhole.telnet import ShellFactory
at the top of the binary file of APT-proxy (something like /usr/sbin/apt-proxy).

And viola, it works!

I love /etc/init.d/apt-proxy start
Starting apt-proxy:None
None
.
I'll keep an eye on it to see what happens during the next upgrade of apt-proxy through... apt :)

Hope this helps.

Partager cet article

Repost0

commentaires

koks 11/02/2015 11:44

Really structured and useful information. And everything is clear, thanks. I looked through some posts and must say, they are very interesting. Best regards, essay writer**!!@@

Dissertation Writing 11/06/2010 06:57


Excellent articles i enjoyed while reading this particular post.