Updated to NAV 4.9.2. Now i noticed the alerts are not sending anymore.
The last log i got was this:
[2019-02-08 19:18:39,774] [ERROR] [pid=24794 nav.alertengine.alertaddress.send] Unhandled error from Email (the handler has been blacklisted) Traceback (most recent call last):
File "/opt/venvs/nav/local/lib/python2.7/site-packages/nav/models/profiles.py", line 373, in send
self.type.send(self, alert, language=lang)
File "/opt/venvs/nav/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
return func(*args, **kwargs)
File "/opt/venvs/nav/local/lib/python2.7/site-packages/nav/models/profiles.py", line 439, in send
return dispatcher.send(*args, **kwargs)
File "/opt/venvs/nav/local/lib/python2.7/site-packages/nav/alertengine/dispatchers/email_dispatcher.py", line 52, in send
email.send(fail_silently=False)
File "/opt/venvs/nav/local/lib/python2.7/site-packages/django/core/mail/message.py", line 303, in send
return self.get_connection(fail_silently).send_messages([self])
File "/opt/venvs/nav/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 100, in send_messages
new_conn_created = self.open()
File "/opt/venvs/nav/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 58, in open
self.connection = connection_class(self.host, self.port, **connection_params)
File "/usr/lib/python2.7/smtplib.py", line 256, in __init__
(code, msg) = self.connect(host, port)
File "/usr/lib/python2.7/smtplib.py", line 316, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib/python2.7/smtplib.py", line 291, in _get_socket
return socket.create_connection((host, port), timeout)
File "/usr/lib/python2.7/socket.py", line 553, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
error: getaddrinfo() argument 2 must be integer or string
And if i look at my alterengine log, i see the handler is being blacklisted:
2019-02-11 11:35:09,993 [WARNING] [nav.alertengine.alertaddress.send] Not sending alert 16646 to ***** as handler Email is blacklisted: getaddrinfo() argument 2 must be integer or string
How to resolve this?
Kind regards,
René.
On Mon, 11 Feb 2019 10:39:18 +0000 René Romijn Rene.Romijn@tabsholland.nl wrote:
Updated to NAV 4.9.2. Now i noticed the alerts are not sending anymore.
It's NAV 4.9.1 (The 4.9.2-dev-blah moniker is a bug in the Debian package). I see you also posted this as an issue on GitHub:
https://github.com/Uninett/nav/issues/1834
In short: We have confirmed that there is a bug if you have set the `EMAIL_PORT` option in `nav.conf`. The default value is 25, so unless you actually need a different port than the default, you can workaround this by commenting out the EMAIL_PORT option for now.
A fix has been committed. Thanks for posting, René :-)
Yeah i posted it also on GitHub 😊 Hope you don't mind i posted it there aswell.
Thanks again for the quick response and this awesome software 😊
-----Oorspronkelijk bericht----- Van: Morten Brekkevold morten.brekkevold@uninett.no Verzonden: dinsdag 12 februari 2019 08:48 Aan: René Romijn Rene.Romijn@tabsholland.nl CC: 'nav-users@uninett.no' nav-users@uninett.no Onderwerp: Re: AlterEngine not sending mails anymore
On Mon, 11 Feb 2019 10:39:18 +0000 René Romijn Rene.Romijn@tabsholland.nl wrote:
Updated to NAV 4.9.2. Now i noticed the alerts are not sending anymore.
It's NAV 4.9.1 (The 4.9.2-dev-blah moniker is a bug in the Debian package). I see you also posted this as an issue on GitHub:
https://github.com/Uninett/nav/issues/1834
In short: We have confirmed that there is a bug if you have set the `EMAIL_PORT` option in `nav.conf`. The default value is 25, so unless you actually need a different port than the default, you can workaround this by commenting out the EMAIL_PORT option for now.
A fix has been committed. Thanks for posting, René :-)
-- mvh Morten Brekkevold Uninett