Title issue with mirrorprobe mail handler
Priority bug Status resolved
Superseder Nosy List dfarning, poeml
Assigned To poeml Keywords
Peter here is a issues report on the mail handler.
Traceback (most recent call last):
File "/usr/bin/mirrorprobe", line 334, in
File "/usr/bin/mirrorprobe", line 216, in main
'root@' + socket.gethostbyaddr(socket.gethostname()),
socket.gaierror: [Errno -2] Name or service not known
I just commented out lines 214-222 in /usr/bin/mirrorprobe .
Hi David, I remember the email where you already mentioned this. I didn't read closely enough though.
I thought the error came from some mirror hostname. In fact, it is the machine name itself (of the
MirrorBrain host) that the script tries to resolve.
The lookup is done to have a hostname/domain to append to mailed logs; the feature of mailing logs
isn't actually used anymore, but the code is still there.
On my test host, the hostname "ubuntu" resolves to 127.0.0.1:
('ubuntu', , ['127.0.1.1'])
The code is obviously naively running on assumptions that can't be met everywhere.
Development plans for the mirrorprobe are:
Therefore, I'd think the code should be removed, and make place for a better notification mechanism. A
future notification system should be integrated with a web frontend, and allow for mail notification
at the same time, for important things.
I'll commit a fix in SVN, but as it will take a while until that ends up in the Ubuntu packages, I'd
recommend a workaround for now. Maybe you can adjust /etc/hostname and /etc/hosts in a way that it
avoids the crash - or comment out the code as you did.
This works here:
root@ubuntu:# cat /etc/hostname
root@ubuntu:# grep ubuntu /etc/hosts
root@ubuntu:# python -c "import socket; socket.gethostbyaddr(socket.gethostname())"
(Returns empty value, but doesn't crash at least)
Fix committed with r7838. Will be included in the next release (post-2.10.1).
Date User Action Args
2009-10-08 11:46:56 poeml set status: chatting -> resolved
messages: + msg30
status: unread -> chatting
2009-10-08 11:33:53 poeml set messages: + msg29
title: issue with mail handler on ubuntu
9.04 -> issue with mirrorprobe mail handler
2009-10-08 07:08:24 poeml set nosy: + poeml
2009-10-07 23:17:12 dfarning create