i want to add new node to elastic cluster by enrollment token but i got the error below
E:\node-1\bin>elasticsearch-create-enrollment-token.bat -s node
18:44:40.729 [main] ERROR org.elasticsearch.xpack.security.enrollment.ExternalEnrollmentTokenGenerator - Error 400when calling GET http://192.168.99.135:9200/_security/api_key. ResponseBody: {error=no handler found for uri [/_security/api_key] and method [POST]} Unable to create enrollment token for scope [node]
ERROR: Unexpected response code [400] from calling POST http://192.168.99.135:9200/_security/api_key
any solution will be highly appreciated
This seems to be a late reply but could be helpful for others. I was having the same issue. when I tried to run multiple instance of elastic search instance by copying already executed folder. For this you need to
node.name: node-1
line and give unique value [alphanumric with hyphen]Now go to your terminal and try again with same command i.e.
elasticsearch-create-enrollment-token.bat -s node <enrollment_code>
It will create new node.
Note: You need to create enrollment_code before doing above steps.
Happy Learning!! 🫱🏽🫲🏾