Authentication with SHIELD is not working on MAC

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

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

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

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.

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

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