You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Peter here is a issues report on the mail handler.
mirrorbrain@Y650:/home/dfarning$ mirrorprobe
Traceback (most recent call last):
File "/usr/bin/mirrorprobe", line 334, in
main()
File "/usr/bin/mirrorprobe", line 216, in main
'root@' + socket.gethostbyaddr(socket.gethostname())[0],
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:
The code is obviously naively running on assumptions that can't be met everywhere.
Development plans for the mirrorprobe are:
integrate it into the "mb" tool, so there isn't the need to have a second script, and it can use
shared functionality from the "mb" Python module
clean up its error reporting in general - it is a big neglected because it relied on the mail
functionality in the past, and was run with &>/dev/null, which didn't turn out to be a good idea (rare
errors could easily get lost)
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.
Fix committed with r7838. Will be included in the next release (post-2.10.1).
History
Date User Action Args
2009-10-08 11:46:56 poeml set status: chatting -> resolved
messages: + msg30
status: unread -> chatting
assignedto: poeml
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
(end of migrated issue)
The text was updated successfully, but these errors were encountered:
Issue migrated (2015-06-05) from old issue tracker http://mirrorbrain.org/issues/issue9
msg21 (view) Author: dfarning Date: 2009-10-07.23:17:12
Peter here is a issues report on the mail handler.
mirrorbrain@Y650:/home/dfarning$ mirrorprobe
Traceback (most recent call last):
File "/usr/bin/mirrorprobe", line 334, in
main()
File "/usr/bin/mirrorprobe", line 216, in main
'root@' + socket.gethostbyaddr(socket.gethostname())[0],
socket.gaierror: [Errno -2] Name or service not known
I just commented out lines 214-222 in /usr/bin/mirrorprobe .
david
msg29 (view) Author: poeml Date: 2009-10-08.11:33:52
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:
python -c "import socket; h = socket.gethostname(); print h; print socket.gethostbyaddr(h)"
ubuntu
('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:
shared functionality from the "mb" Python module
functionality in the past, and was run with &>/dev/null, which didn't turn out to be a good idea (rare
errors could easily get lost)
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# grep ubuntu /etc/hostsubuntu
root@ubuntu:
127.0.1.1 ubuntu
root@ubuntu:
# python -c "import socket; socket.gethostbyaddr(socket.gethostname())[0]"#root@ubuntu:
(Returns empty value, but doesn't crash at least)
msg30 (view) Author: poeml Date: 2009-10-08.11:46:56
Fix committed with r7838. Will be included in the next release (post-2.10.1).
(end of migrated issue)
The text was updated successfully, but these errors were encountered: