Cannot send email

Hi,

I encountered this error

{
"id": "email_admin",
"type": "email",
"status": "failure",
"reason": "MessagingException[failed to send email with subject [testing] via account [work]]; nested: MessagingException[Could not convert socket to TLS]; nested: SSLException[java.security.ProviderException: java.security.KeyException]; nested: ProviderException[java.security.KeyException]; nested: KeyException; "
}

here is my configuration

curl -XPUT 'http://localhost:9200/_watcher/watch/log_error_watch' -d '{
"trigger" : {
"schedule" : { "interval" : "60s" }
},
"input" : {
"http" : {
"request" : {
"host" : "localhost",
"port" : 9200,
"path" : "/filebeat-2016.10.16/_search?pretty",
"body" : "{"query" : { "match" : { "response" : "404"}}}"
}
}
},
"condition" : {
"always" : {}
},
"actions" : {
"email_admin" : {
"email": {
"to": "xxx@gmail.com",
"subject": "testing",
"body": "testing"
}
}
}
}'

watcher.actions.email.service.account:
work:
profile: gmail
smtp:
auth: true
starttls.enable: true
host: smtp.gmail.com
port: 587
user: xxx@gmail.com
password: xxx

does anyone know what is going wrong?

Hey,

on which system are you running? Which JDK are you using?

--Alex

thanks for your reply, after i changed the auth: true to auth: false, it works.

I am running Centos 6 and openjdk 8

Hi, Alex

I am also curious about is it possible to query 2 fields at the same time? If it is possible, how?

I tried something like

"input" : {
"http" : {
"request" : {
"host" : "localhost",
"port" : 9200,
"path" : "'/filebeat-2016.10.20/_search?pretty'",
"body" : "{
"query" : {
"and" : [
{
"range": {
"@timestamp" : {
"from": "2016-10-20T23:58:00.000Z",
"to": "2016-10-20T23:59:00.000Z"
}
}
},
{
"match" : { "response" : "500"}
}
]
}
}"
}
}
},

but failed

Hey,

please open a new topic for a new question. You might want to take a look at the search input, then you dont have to quote that JSON.

--Alex