# Elasticsearch 1.4.4-1 with Shield 1.0.1 on CentOS 6.6 - Authentication issue when running as service vs bin/elasticsearch

**URL:** <https://discuss.elastic.co/t/elasticsearch-1-4-4-1-with-shield-1-0-1-on-centos-6-6-authentication-issue-when-running-as-service-vs-bin-elasticsearch/22333>\
**Category:** Elasticsearch\
**Created:** [February 23, 2015, 3:28pm UTC](https://discuss.elastic.co/t/elasticsearch-1-4-4-1-with-shield-1-0-1-on-centos-6-6-authentication-issue-when-running-as-service-vs-bin-elasticsearch/22333 "2015-02-23T15:28:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_8](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@Jason\_8](https://discuss.elastic.co/u/Jason_8)\
**Post date:** [February 23, 2015, 3:28pm UTC](https://discuss.elastic.co/t/elasticsearch-1-4-4-1-with-shield-1-0-1-on-centos-6-6-authentication-issue-when-running-as-service-vs-bin-elasticsearch/22333/1 "2015-02-23T15:28:32Z")

</div>

I am able to run bin/elasticsearch and authenticate just fine but whenever  
I run elasticsearch as a service, I consistently receive the following  
error:

{  
"error" : "AuthenticationException[unable to authenticate user [rdeniro]  
for REST request [/idx1?pretty]]",  
"status" : 401  
}

I made sure that the $ES\_HOME/config/shield/ dir and files were all owned  
by ES user and tried to dig down to see how the two startup methods differ.  
Ultimately, it came down to something in  
/etc/elasticsearch/elasticsearch.yml by comparing the two runtime  
environments, but haven't been able to make much headway from there.

Anyone have any thoughts on this? Thanks in advance for any help.

Cheers,  
Jason

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/037a76f2-0a77-4466-8794-512bdb72343d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/037a76f2-0a77-4466-8794-512bdb72343d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)\
**Post date:** [February 23, 2015, 8:26pm UTC](https://discuss.elastic.co/t/elasticsearch-1-4-4-1-with-shield-1-0-1-on-centos-6-6-authentication-issue-when-running-as-service-vs-bin-elasticsearch/22333/2 "2015-02-23T20:26:36Z")

</div>

It sounds like you may be running into an issue where when running as a  
service the configuration directory is different that  
$ES\_HOME/config/shield. Please see  
"Configuring your  
environment" [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/shield/current/getting-started.html)

On Monday, February 23, 2015 at 10:28:32 AM UTC-5, Jason wrote:

> I am able to run bin/elasticsearch and authenticate just fine but whenever  
> I run elasticsearch as a service, I consistently receive the following  
> error:
> 
> {  
> "error" : "AuthenticationException[unable to authenticate user  
> [rdeniro] for REST request [/idx1?pretty]]",  
> "status" : 401  
> }
> 
> I made sure that the $ES\_HOME/config/shield/ dir and files were all owned  
> by ES user and tried to dig down to see how the two startup methods differ.  
> Ultimately, it came down to something in  
> /etc/elasticsearch/elasticsearch.yml by comparing the two runtime  
> environments, but haven't been able to make much headway from there.
> 
> Anyone have any thoughts on this? Thanks in advance for any help.
> 
> Cheers,  
> Jason

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/bf54a9b1-50ee-4423-82e5-1b0806117c54%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bf54a9b1-50ee-4423-82e5-1b0806117c54%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![fmarchand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fmarchand/32/852_2.png) [@fmarchand](https://discuss.elastic.co/u/fmarchand)\
**Post date:** [March 11, 2015, 1:25pm UTC](https://discuss.elastic.co/t/elasticsearch-1-4-4-1-with-shield-1-0-1-on-centos-6-6-authentication-issue-when-running-as-service-vs-bin-elasticsearch/22333/3 "2015-03-11T13:25:05Z")

</div>

Hi,

I got the same problem. Did you figure out what was your configuration pb  
Jason ?

On Monday, February 23, 2015 at 4:28:32 PM UTC+1, Jason wrote:

> I am able to run bin/elasticsearch and authenticate just fine but whenever  
> I run elasticsearch as a service, I consistently receive the following  
> error:
> 
> {  
> "error" : "AuthenticationException[unable to authenticate user  
> [rdeniro] for REST request [/idx1?pretty]]",  
> "status" : 401  
> }
> 
> I made sure that the $ES\_HOME/config/shield/ dir and files were all owned  
> by ES user and tried to dig down to see how the two startup methods differ.  
> Ultimately, it came down to something in  
> /etc/elasticsearch/elasticsearch.yml by comparing the two runtime  
> environments, but haven't been able to make much headway from there.
> 
> Anyone have any thoughts on this? Thanks in advance for any help.
> 
> Cheers,  
> Jason

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a1ade7fb-78bf-46cf-906c-ed6c9c827872%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a1ade7fb-78bf-46cf-906c-ed6c9c827872%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jason\_8](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@Jason\_8](https://discuss.elastic.co/u/Jason_8)\
**Post date:** [March 11, 2015, 2:07pm UTC](https://discuss.elastic.co/t/elasticsearch-1-4-4-1-with-shield-1-0-1-on-centos-6-6-authentication-issue-when-running-as-service-vs-bin-elasticsearch/22333/4 "2015-03-11T14:07:12Z")

</div>

Hi fmarchand,

I ended up not pursuing Shield any further after finding out how much the  
licensing would cost, but this might solve your issue:

> <https://stackoverflow.com/questions/28571868/elk-shield-auth-problems>

Hope that helps!

Cheers,  
Jason

On Wed, Mar 11, 2015 at 9:25 AM, fmarchand [fmarchand@agaetis.fr](mailto:fmarchand@agaetis.fr) wrote:

> Hi,
> 
> I got the same problem. Did you figure out what was your configuration pb  
> Jason ?
> 
> On Monday, February 23, 2015 at 4:28:32 PM UTC+1, Jason wrote:
> 
> > I am able to run bin/elasticsearch and authenticate just fine but  
> > whenever I run elasticsearch as a service, I consistently receive the  
> > following error:
> > 
> > {  
> > "error" : "AuthenticationException[unable to authenticate user  
> > [rdeniro] for REST request [/idx1?pretty]]",  
> > "status" : 401  
> > }
> > 
> > I made sure that the $ES\_HOME/config/shield/ dir and files were all owned  
> > by ES user and tried to dig down to see how the two startup methods differ.  
> > Ultimately, it came down to something in /etc/elasticsearch/elasticsearch.yml  
> > by comparing the two runtime environments, but haven't been able to make  
> > much headway from there.
> > 
> > Anyone have any thoughts on this? Thanks in advance for any help.
> > 
> > Cheers,  
> > Jason
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/IWSPszJDgn8/unsubscribe](https://groups.google.com/d/topic/elasticsearch/IWSPszJDgn8/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/a1ade7fb-78bf-46cf-906c-ed6c9c827872%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a1ade7fb-78bf-46cf-906c-ed6c9c827872%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/a1ade7fb-78bf-46cf-906c-ed6c9c827872%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/a1ade7fb-78bf-46cf-906c-ed6c9c827872%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAPkOeLynJ82xZUCOOKzU%3DBm%2B7OHvCX0em232RnT471iw04xswA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPkOeLynJ82xZUCOOKzU%3DBm%2B7OHvCX0em232RnT471iw04xswA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![fmarchand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fmarchand/32/852_2.png) [@fmarchand](https://discuss.elastic.co/u/fmarchand)\
**Post date:** [March 11, 2015, 2:56pm UTC](https://discuss.elastic.co/t/elasticsearch-1-4-4-1-with-shield-1-0-1-on-centos-6-6-authentication-issue-when-running-as-service-vs-bin-elasticsearch/22333/5 "2015-03-11T14:56:49Z")

</div>

oh ! I hope that it will fit in the budget .... I saw it's included in gold  
and platinium subscription

Thx for your help Jason

On Wednesday, March 11, 2015 at 3:07:30 PM UTC+1, Jason wrote:

> Hi fmarchand,
> 
> I ended up not pursuing Shield any further after finding out how much the  
> licensing would cost, but this might solve your issue:  
> [elasticsearch - ELK - Shield auth problems - Stack Overflow](http://stackoverflow.com/questions/28571868/elk-shield-auth-problems)
> 
> Hope that helps!
> 
> Cheers,  
> Jason
> 
> On Wed, Mar 11, 2015 at 9:25 AM, fmarchand \<[fmar...@agaetis.fr](mailto:fmar...@agaetis.fr)  
> \<javascript:\>\> wrote:
> 
> > Hi,
> > 
> > I got the same problem. Did you figure out what was your configuration pb  
> > Jason ?
> > 
> > On Monday, February 23, 2015 at 4:28:32 PM UTC+1, Jason wrote:
> > 
> > > I am able to run bin/elasticsearch and authenticate just fine but  
> > > whenever I run elasticsearch as a service, I consistently receive the  
> > > following error:
> > > 
> > > {  
> > > "error" : "AuthenticationException[unable to authenticate user  
> > > [rdeniro] for REST request [/idx1?pretty]]",  
> > > "status" : 401  
> > > }
> > > 
> > > I made sure that the $ES\_HOME/config/shield/ dir and files were all  
> > > owned by ES user and tried to dig down to see how the two startup methods  
> > > differ. Ultimately, it came down to something in /etc/elasticsearch/elasticsearch.yml  
> > > by comparing the two runtime environments, but haven't been able to make  
> > > much headway from there.
> > > 
> > > Anyone have any thoughts on this? Thanks in advance for any help.
> > > 
> > > Cheers,  
> > > Jason
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/IWSPszJDgn8/unsubscribe](https://groups.google.com/d/topic/elasticsearch/IWSPszJDgn8/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/a1ade7fb-78bf-46cf-906c-ed6c9c827872%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a1ade7fb-78bf-46cf-906c-ed6c9c827872%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/a1ade7fb-78bf-46cf-906c-ed6c9c827872%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/a1ade7fb-78bf-46cf-906c-ed6c9c827872%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2d81ac58-913a-4416-88d7-ed0de669a4d0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2d81ac58-913a-4416-88d7-ed0de669a4d0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Lobna\_Tonn](https://avatars.discourse-cdn.com/v4/letter/l/eada6e/32.png) [@Lobna\_Tonn](https://discuss.elastic.co/u/Lobna_Tonn)\
**Post date:** [April 1, 2015, 4:09pm UTC](https://discuss.elastic.co/t/elasticsearch-1-4-4-1-with-shield-1-0-1-on-centos-6-6-authentication-issue-when-running-as-service-vs-bin-elasticsearch/22333/6 "2015-04-01T16:09:54Z")

</div>

How to delete this shield plugin pleaase? I'm facing the same error since I  
have my ES running as a service !  
On Monday, February 23, 2015 at 4:28:32 PM UTC+1, Jason wrote:

> I am able to run bin/elasticsearch and authenticate just fine but whenever  
> I run elasticsearch as a service, I consistently receive the following  
> error:
> 
> {  
> "error" : "AuthenticationException[unable to authenticate user  
> [rdeniro] for REST request [/idx1?pretty]]",  
> "status" : 401  
> }
> 
> I made sure that the $ES\_HOME/config/shield/ dir and files were all owned  
> by ES user and tried to dig down to see how the two startup methods differ.  
> Ultimately, it came down to something in  
> /etc/elasticsearch/elasticsearch.yml by comparing the two runtime  
> environments, but haven't been able to make much headway from there.
> 
> Anyone have any thoughts on this? Thanks in advance for any help.
> 
> Cheers,  
> Jason

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6a4699c1-fb70-4d1c-afe8-db6daa3d3406%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6a4699c1-fb70-4d1c-afe8-db6daa3d3406%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)\
**Post date:** [April 1, 2015, 6:03pm UTC](https://discuss.elastic.co/t/elasticsearch-1-4-4-1-with-shield-1-0-1-on-centos-6-6-authentication-issue-when-running-as-service-vs-bin-elasticsearch/22333/7 "2015-04-01T18:03:46Z")

</div>

If you set the proper configuration directory in the environment variable  
and run the esusers commands again, then your elasticsearch instance should  
be accessible.

If you must remove Shield: bin/plugin --remove shield

> **[Plugins | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-plugins.html#_removing_plugins)**

On Wednesday, April 1, 2015 at 12:09:54 PM UTC-4, Lobna Tonn wrote:

> How to delete this shield plugin pleaase? I'm facing the same error since  
> I have my ES running as a service !  
> On Monday, February 23, 2015 at 4:28:32 PM UTC+1, Jason wrote:
> 
> > I am able to run bin/elasticsearch and authenticate just fine but  
> > whenever I run elasticsearch as a service, I consistently receive the  
> > following error:
> > 
> > {  
> > "error" : "AuthenticationException[unable to authenticate user  
> > [rdeniro] for REST request [/idx1?pretty]]",  
> > "status" : 401  
> > }
> > 
> > I made sure that the $ES\_HOME/config/shield/ dir and files were all owned  
> > by ES user and tried to dig down to see how the two startup methods differ.  
> > Ultimately, it came down to something in  
> > /etc/elasticsearch/elasticsearch.yml by comparing the two runtime  
> > environments, but haven't been able to make much headway from there.
> > 
> > Anyone have any thoughts on this? Thanks in advance for any help.
> > 
> > Cheers,  
> > Jason

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f37e4ae8-99c8-4b42-bb0a-6dd4faa4d2a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f37e4ae8-99c8-4b42-bb0a-6dd4faa4d2a9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:22am UTC](https://discuss.elastic.co/t/elasticsearch-1-4-4-1-with-shield-1-0-1-on-centos-6-6-authentication-issue-when-running-as-service-vs-bin-elasticsearch/22333/8 "2017-07-06T00:22:20Z")

</div>


