Re: Debugging email notifications in version 19.1.0-1

"Hernandez, Paul" <[email protected]> Sat, 4 Aug 2018 00:15:36 +0000
Newsgroups gmane.network.opennms.general
Message-ID <[email protected]>
Sigh, and you are correct.

Apologies to all as decided to try email on a different, more cleanly installed (apparently) instance of 19.1.0-1 and the DEBUG worked fine on that instance. It said to set an email address for the admin account (I’d only set up my own account with email.) When I added my email to the admin account I began receiving emails. Many many emails.  Oddly emails where the “Event Notifications” page had no definition of the notifications I was receiving on many net-snmp services I’ve written, but never defined notifications for them yet so unclear why they are working.

Anyway this is great news and very red-faced at wasting your and Michael’s time. I believe I’ve an idea how the install of 19.1.0-1 got munged so will save the config and re-install from scratch next week. I may have more questions on email control as mentioned but I’ve a feeling with some DEBUGing enabled I may be able to find some on my own.

Big thanks again and have a good weekend,
Paul



From: Dino Yancey [mailto:[email protected]]
Sent: Friday, August 3, 2018 5:05 PM
To: General OpenNMS Discussion <[email protected]>
Subject: Re: [opennms-discuss] Debugging email notifications in version 19.1.0-1

Any chance you may have disabled Notifd at some point in the past, via service-configuration.xml ?  'service opennms -v status' shows it running?

Shot in the dark, because I'm out of ideas.  I ran several releases of 19.x and had notifications working on all of them.  Never had a problem there, unfortunately.

On Fri, Aug 3, 2018 at 5:50 PM Hernandez, Paul <[email protected]<mailto:[email protected]>> wrote:
I understood that value of “true” for 'org.opennms.core.utils.debug’ to be the default as it was commented out in javamail-configuration.properties
but I tried uncommenting to actually explicitly set it prior to posting.

I had a mail admin confirm that nothing is being sent to the mta at port 25 when I enter the wrong password into the gui.
And as you see from my telnet, if something had been sent, it would make it to my inbox.

-Paul



From: Dino Yancey [mailto:[email protected]<mailto:dino2gnt%[email protected]>]
Sent: Friday, August 3, 2018 3:40 PM
To: General OpenNMS Discussion <[email protected]<mailto:[email protected]>>
Subject: Re: [opennms-discuss] Debugging email notifications in version 19.1.0-1

Yeah, that's odd.

Try adding 'org.opennms.core.utils.debug=true' in javamail-configuration.properties and see if you can get better info out of notifd.log?  if you stop your local mta and listen on port 25 with netcat or similar do you see any attempt by OpenNMS to connect to port 127.0.0.1:25<http://127.0.0.1:25>?

On Fri, Aug 3, 2018 at 5:24 PM Hernandez, Paul <[email protected]<mailto:[email protected]>> wrote:
Hi Dino,

Using the “Search” feature under Status->Events, I used the “Exact Event UEI:”
field and entered:     uei.opennms.org/internal/authentication/failure<http://uei.opennms.org/internal/authentication/failure>

and get 10 events that do look like my attempts at using the wrong PW. Here is an example:


As for the javamail and mail transport agent, Michael and I went through those earlier in the thread, but happy to try anything further you can suggest. Sadly the DEBUG level of logging in notifd doesn’t create anything in the notifd.log file. If we could figure out why that doesn’t behave, I am fairly certain it would point us straight to the actual issue?

Thanks you for your time as well,
Pail

From original post:


This simple test verifies unauthenticated email sending on the VM on which the onms server runs:



[root@orw-onms-dvt-vm logs]# telnet 127.0.0.1 25

Trying 127.0.0.1...

Connected to 127.0.0.1.

Escape character is '^]'.

220 orw-onms-dvt-vm.localdomain ESMTP Postfix

mail from: [email protected]<mailto:[email protected]>

250 2.1.0 Ok

rcpt to: [email protected]<mailto:[email protected]>

250 2.1.5 Ok

data

354 End data with <CR><LF>.<CR><LF>



unauthenticated email test

.

250 2.0.0 Ok: queued as 6895A2A436A

quit

221 2.0.0 Bye

Connection closed by foreign host.




and I received the email in my inbox without issue.





From: Dino Yancey [mailto:[email protected]<mailto:dino2gnt%[email protected]>]
Sent: Friday, August 3, 2018 3:02 PM
To: General OpenNMS Discussion <[email protected]<mailto:[email protected]>>
Subject: Re: [opennms-discuss] Debugging email notifications in version 19.1.0-1

Hi,

I would start by verifying the event is actually fired (Can you find it in Status -> Events?), and that it matches the filter for the notification ( '(IPADDR IPLIKE *.*.*.*)' by default).  Does the notification show up in Status -> Notifications?  If those check out, i would suspect your javamail config and/or your local mail transport agent.

Dino

On Fri, Aug 3, 2018 at 3:57 PM Hernandez, Paul <[email protected]<mailto:[email protected]>> wrote:
Michael,

The addition is correctly reflected in the gui, but no email sent when I generate the event with the wrong PW.
What steps are available to debug this further?

Thanks again,
Paul





From: Hernandez, Paul
Sent: Friday, August 3, 2018 9:06 AM
To: General OpenNMS Discussion <[email protected]<mailto:[email protected]>>
Subject: RE: Debugging email notifications in version 19.1.0-1

Maybe we should focus on the Failed Authentication not working, since that one is a not one I created?

-Paul



From: Seibold, Michael [mailto:[email protected]]
Sent: Friday, August 3, 2018 8:34 AM
To: General OpenNMS Discussion <[email protected]<mailto:[email protected]>>
Subject: Re: [opennms-discuss] Debugging email notifications in version 19.1.0-1

Hi Paul,

about enabling debugging for notifications: I really can’t remember I was ever using this. I set up notifications about 10 years ago and since then always copied the working config ;-)

I didn’t find any obvious error in your config, but the filter rule might be the problem.

If you don’t see notifications in the list it probably won’t be the email part that is failing – I assume your rule doesn’t match. I would


-       Start without this rule

-       If notifications are generated look out it the mails are coming

-       Maybe the filter roule would be better using something like

      <rule>(catincstaleNFS)</rule>
assuming that staleNFS is a category


Michael
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss