Hello.
I’m trying to send an email alert, but it fails.
I’ve MS Exchange with authentication and without ssl/tls. Test sending via telnet works fine.
I’ve added username and password to keystore:
/usr/share/opensearch/bin/opensearch-keystore list
keystore.seed
plugins.alerting.destination.email.Opensearch.password
plugins.alerting.destination.email.Opensearch.username
(My sender name in dashboards calls “Opensearch”)
When I’m sending test email from dashboards, receiving exception:
[2022-04-20T04:55:24,274][ERROR][o.o.a.d.f.EmailDestinationFactory] [vdc01-petefk] Exception publishing Message: DestinationType: EMAIL, DestinationName: На почту, Host: cdc01-peexhub, Port: 25, Message: Monitor TEST Monitor just entered alert status. Please investigate the issue.
- Trigger: TEST TRIGGER
- Severity: 1
- Period start: 2022-04-20T01:54:19.244Z
- Period end: 2022-04-20T01:55:19.244Z
javax.mail.MessagingException: Can't send command to SMTP host
at org.opensearch.alerting.destination.client.DestinationEmailClient.execute(DestinationEmailClient.java:100) ~[alerting-notification-1.2.4.0.jar:?]
at org.opensearch.alerting.destination.factory.EmailDestinationFactory.publish(EmailDestinationFactory.java:52) [alerting-notification-1.2.4.0.jar:?]
at org.opensearch.alerting.destination.factory.EmailDestinationFactory.publish(EmailDestinationFactory.java:39) [alerting-notification-1.2.4.0.jar:?]
at org.opensearch.alerting.destination.Notification.lambda$publish$0(Notification.java:56) [alerting-notification-1.2.4.0.jar:?]
at java.security.AccessController.doPrivileged(AccessController.java:312) [?:?]
at org.opensearch.alerting.destination.Notification.publish(Notification.java:54) [alerting-notification-1.2.4.0.jar:?]
at org.opensearch.alerting.model.destination.Destination.publish(Destination.kt:319) [opensearch-alerting-1.2.4.0.jar:1.2.4.0]
at org.opensearch.alerting.MonitorRunner$runAction$2.invokeSuspend(MonitorRunner.kt:680) [opensearch-alerting-1.2.4.0.jar:1.2.4.0]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [kotlin-stdlib-1.3.72.jar:1.3.72-release-468 (1.3.72)]
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742) [kotlinx-coroutines-core-1.1.1.jar:?]
[2022-04-20T04:55:24,275][INFO ][o.o.a.m.MonitorRunResult ] [vdc01-petefk002] Internal error: javax.mail.MessagingException: Can't send command to SMTP host. See the opensearch.log for details
java.lang.IllegalStateException: javax.mail.MessagingException: Can't send command to SMTP host
at org.opensearch.alerting.destination.factory.EmailDestinationFactory.publish(EmailDestinationFactory.java:57) ~[alerting-notification-1.2.4.0.jar:?]
at org.opensearch.alerting.destination.factory.EmailDestinationFactory.publish(EmailDestinationFactory.java:39) ~[alerting-notification-1.2.4.0.jar:?]
at org.opensearch.alerting.destination.Notification.lambda$publish$0(Notification.java:56) ~[alerting-notification-1.2.4.0.jar:?]
at java.security.AccessController.doPrivileged(AccessController.java:312) ~[?:?]
at org.opensearch.alerting.destination.Notification.publish(Notification.java:54) ~[alerting-notification-1.2.4.0.jar:?]
at org.opensearch.alerting.model.destination.Destination.publish(Destination.kt:319) ~[opensearch-alerting-1.2.4.0.jar:1.2.4.0]
at org.opensearch.alerting.MonitorRunner$runAction$2.invokeSuspend(MonitorRunner.kt:680) ~[opensearch-alerting-1.2.4.0.jar:1.2.4.0]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [kotlin-stdlib-1.3.72.jar:1.3.72-release-468 (1.3.72)]
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742) [kotlinx-coroutines-core-1.1.1.jar:?]
Caused by: javax.mail.MessagingException: Can't send command to SMTP host
at org.opensearch.alerting.destination.client.DestinationEmailClient.execute(DestinationEmailClient.java:100) ~[alerting-notification-1.2.4.0.jar:?]
at org.opensearch.alerting.destination.factory.EmailDestinationFactory.publish(EmailDestinationFactory.java:52) ~[alerting-notification-1.2.4.0.jar:?]
... 11 more
What did I do wron?