Authentication with SHIELD is not working on MAC

security

(divya) #1

Hi,
I downloaded and extracted elasticsearch-1.5.2 on mac and installed the shield plugin, and followed the steps given at https://www.elastic.co/guide/en/shield/current/quick-getting-started.html. But when i try curl -XGET 'http://localhost:9200/' without giving uname/pwd it does not give me an error.

But i followed the same steps on Linux system, it works, it gave me the following error: {"error":"AuthenticationException[missing authentication token for REST request [/]]","status":401}

Are there additional steps to be followed on mac ?

Thanks,
Divya


(Mark Walkom) #2

Try following the longer version, chances are you have missed this bit.


(divya) #3

Followed all the steps in the longer version and added the following to the .bash_profile:
export ES_HOME="/Users/Downloads/elasticsearch-1.5.2"
export PATH=$PATH:$ES_HOME/bin/shield
export ES_JAVA_OPTS="-Des.path.conf=$ES_HOME/config"
And restarted ES service.

Still does not work.

Thanks,
Divya


(Steve Kearns) #4

Hi Divya,

Can you confirm that there is not another instance of Elasticsearch already running on the machine? To do this, stop your Elasticsearch instance, and run the same request

curl -XGET 'http://localhost:9200/'

and if you get any response at all, there is another instance of ES already running.


(divya) #5

Hi Steve,

My bad, yes, I got a response, but there was no ElasticSearch process listed when i list jps or when i grep for all java processes. Or i do not know if there was another way to check it, i restarted my system, It works now.

Thanks,
Divya


(Steve Kearns) #6

I'm glad that solved the issue :smile: Thanks for letting us know!


(system) #7