Hello. I want to set monitoring exporter on my prod ES cluster to send monitoring data to my monitoring cluster. I enable PKI authentication on my monitoring cluster and I am able to authenticate with my client certificate to auth api via curl:
It looks like a X-Pack bug. I found a way to workaround it. First of all I set full cluster privileges for x-pack exporter user. I did it via role mapping API. But in fact it still did not work until I touched the authenticated API via curl on all cluster nodes:
curl -k --cert-type pem --cert /root/clientcert -X GET https://emon1.my.domain:9210/_xpack/security/_authenticate
curl -k --cert-type pem --cert /root/clientcert -X GET https://emon2.my.domain:9210/_xpack/security/_authenticate
curl -k --cert-type pem --cert /root/clientcert -X GET https://emon2.my.domain:9210/_xpack/security/_authenticate
After that no error message in elasticsearch log anymore. I can confirm it using curl itself. If I try this one first:
curl -k --cert-type pem --cert /root/clientcert -X GET https://emon2.my.domain:9210_template/.monitoring-es?filter_path=*.version
I get "missing authentication token for REST request" but
curl -k --cert-type pem --cert /root/clientcert -X GET https://emon1.my.domain:9210/_xpack/security/_authenticate
curl -k --cert-type pem --cert /root/clientcert -X GET https://emon2.my.domain:9210_template/.monitoring-es?filter_path=*.version
worked. You can see first I had to touch the authenticate API.
That seems unlikely. The authenticate API doesn't do anything special. If this is indeed what happened, then it is more likely that it was some sort of caching issue, and the cache expired at just the right time.
This is a broken URL. If that actually what you sent, then I'm surprised it worked at all. If it's not what you sent, can you please post your commands and logs exactly as they happened. It's impossible for me to try and reproduce the problem if I don't have the correct information.
Somewhere along the way it has been modified from the URL in the error message.
The error has:
But you said you were using:
Note the missing / between the port number and the path.
You've also changed the hostname, which might be fine, but is potentially a distraction from the issue we're trying to solve. It will be simpler to resolve the problem if we keep everything on a single node.
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.