UnsupportedDataTypeException when trying to send email

alerting

(Graham) #1

On 2.0.0-beta1

[ERROR][org.elasticsearch.watcher.actions.email] [Morbius] failed to execute action [log_error_watch/send_email]
javax.mail.MessagingException: failed to send email with subject [Airphrame Error] via account [airphrame];
nested exception is:
javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
boundary="----=_Part_64_1471161497.1441304800575"
at org.elasticsearch.watcher.actions.email.service.InternalEmailService.send(InternalEmailService.java:85)
at org.elasticsearch.watcher.actions.email.service.InternalEmailService.send(InternalEmailService.java:77)
at org.elasticsearch.watcher.actions.email.ExecutableEmailAction.execute(ExecutableEmailAction.java:67)
at org.elasticsearch.watcher.actions.ActionWrapper.execute(ActionWrapper.java:106)
at org.elasticsearch.watcher.execution.ExecutionService.executeInner(ExecutionService.java:381)
at org.elasticsearch.watcher.execution.ExecutionService.execute(ExecutionService.java:273)
at org.elasticsearch.watcher.execution.ExecutionService$WatchExecutionTask.run(ExecutionService.java:419)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
boundary="----=_Part_64_1471161497.1441304800575"
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1245)
at org.elasticsearch.watcher.actions.email.service.Account.send(Account.java:109)
at org.elasticsearch.watcher.actions.email.service.InternalEmailService.send(InternalEmailService.java:83)
... 9 more
Caused by: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
boundary="----=_Part_64_1471161497.1441304800575"
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:896)
at javax.activation.DataHandler.writeTo(DataHandler.java:317)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1627)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1849)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1196)
... 11 more


(Mark Walkom) #2

Is that the Watcher 2.0.0-beta1, or the ES one?


(Graham) #3

Elasticsearch 2.0.0-beta1
Watcher 2.0.0-beta1


(Sudheer) #4

Hi Graham-

I too got the similar error when my elasticsearch was 1.5 and trying to install the latest watcher plugin.
I was able to get rid of that on another machine (Ubuntu) after installing the latest elasticsearch 1.7 and the latest watcher plugin.

https://download.elastic.co/elasticsearch/license/license-latest.zip
https://download.elastic.co/elasticsearch/watcher/watcher-latest.zip

I followed the steps outlined in the below tutorial and was able to get the emails. The below link helped me a lot.

Hope this helps.

Thanks
sudheer


(Graham) #5

I've tried this several times on a clean Ubuntu 14 with openjdk 8. 100% repro.
My workaround is to move activation.jar and javax.mail.jar from plugins/watcher/lib to lib
There is some sort of classloader issue going on here.


#6

I have reproduced this on 2.x and filed an issue internally for tracking.


Send mail failed with "UnsupportedDataTypeException"
(system) #7