Hi I am getting an illegal User Settings error while updating user settings.
I am using Elasticsearch 2.4.1 when i have updated user settings and click on Update getting an error saying Illegal User Settings. I am trying to update SMTP settings
Below is the configuration I am trying to update
xpack.notification.email.account:
gmail_account:
profile: gmail
smtp:
auth: true
starttls.enable: true
host: smtp.gmail.com
port: 587
user: username
password: password
Error message is as below:
{
"msg": "Illegal user settings",
"ok": false,
"detail": {
"errors": [
"'xpack.notification.email.account.gmail_account.smtp.starttls.enable': is not allowed",
"'xpack.notification.email.account.gmail_account.smtp.password': is not allowed",
"'xpack.notification.email.account.gmail_account.smtp.port': is not allowed",
"'xpack.notification.email.account.gmail_account.smtp.user': is not allowed",
"'xpack.notification.email.account.gmail_account.profile': is not allowed",
"'xpack.notification.email.account.gmail_account.smtp.host': is not allowed",
"'xpack.notification.email.account.gmail_account.smtp.auth': is not allowed"
]
},
"error": "BadRequest"
}
Can someone please provide me a sample for elasticsearch 2.4.1
x-pack configuration settings are supposed to work with Elasticsearch 5.0 and upwards. You need to configure those settings using the watcher prefix. See the docs for an example.
Thanks for responding. I have tried with watcher prefix as well. I got the similar Error Response.
watcher.actions.email.service.account:
gmail_account:
profile: gmail
smtp:
auth: true
starttls.enable: true
host: smtp.gmail.com
port: 587
user: username
password: password
{
"msg": "Illegal user settings",
"ok": false,
"detail": {
"errors": [
"'watcher.actions.email.service.account.gmail_account.smtp.host': is not allowed",
"'watcher.actions.email.service.account.gmail_account.profile': is not allowed",
"'watcher.actions.email.service.account.gmail_account.smtp.port': is not allowed",
"'watcher.actions.email.service.account.gmail_account.smtp.user': is not allowed",
"'watcher.actions.email.service.account.gmail_account.smtp.password': is not allowed",
"'watcher.actions.email.service.account.gmail_account.smtp.auth': is not allowed",
"'watcher.actions.email.service.account.gmail_account.smtp.starttls.enable': is not allowed"
]
},
"error": "BadRequest"
}
sorry I misread your initial post and was focused on x-pack. The email settings are not dynamic properties, but have to be configured statically in your config file and cannot be updated at run-time.
However I am still confused a bit by this JSON. Which call did you execute to get that response? Was it a cluster udpate settings call? Can you show the exact HTTP call you executed including URL, host and body?
that was the missing piece of information. When you use Elastic Cloud, you do not need to configure a dedicated email account, see the respective documentation.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.