# Elaticsearch failed to start after installing x-pack

**URL:** https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807
**Category:** Elasticsearch
**Created:** [February 12, 2017, 1:51pm UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807 "2017-02-12T13:51:14Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![yoavb](https://avatars.discourse-cdn.com/v4/letter/y/839c29/32.png) [@yoavb](https://discuss.elastic.co/u/yoavb)
#### Post date: [February 12, 2017, 1:51pm UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/1 "2017-02-12T13:51:14Z")

</div>

I have manually installed x-pack version 5.1.1  
After installation Elasticsearch failed to start .

Status before installation -  
curl -XGET 'localhost:9200/?pretty'  
{  
"name" : "5gvYWYb",  
"cluster\_name" : "elasticsearch",  
"cluster\_uuid" : "54tznb7hTfCWCfVP00SREA",  
"version" : {  
"number" : "5.1.1", \<\<\<\<--------!!!!------  
"build\_hash" : "5395e21",  
"build\_date" : "2016-12-06T12:36:15.409Z",  
"build\_snapshot" : false,  
"lucene\_version" : "6.3.0"  
},  
"tagline" : "You Know, for Search"  
}

Installined x-pack as follow:  
[root@ptktl-elk elasticsearch]# bin/elasticsearch-plugin install file:///oracle/PATCHES/x-pack-5.1.1.zip  
-\> Downloading file:///oracle/PATCHES/x-pack-5.1.1.zip  
[=================================================] 100%? ?  
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  
@ WARNING: plugin requires additional permissions @  
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

- java.lang.RuntimePermission accessClassInPackage.com.sun.activation.registries
- java.lang.RuntimePermission getClassLoader
- java.lang.RuntimePermission setContextClassLoader
- java.lang.RuntimePermission setFactory
- java.security.SecurityPermission createPolicy.JavaPolicy
- java.security.SecurityPermission getPolicy
- java.security.SecurityPermission putProviderProperty.BC
- java.security.SecurityPermission setPolicy
- java.util.PropertyPermission \* read,write
- java.util.PropertyPermission sun.nio.ch.bugLevel write
- javax.net.ssl.SSLPermission setHostnameVerifier  
See [http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html](http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html)  
for descriptions of what these permissions allow and the associated risks.

Continue with installation? [y/N]y  
-\> Installed x-pack

The i have resrted the elastic  
[root@ptktl-elk elasticsearch]# service elasticsearch stop  
Stopping elasticsearch: [OK]  
[root@ptktl-elk elasticsearch]# service elasticsearch start  
Starting elasticsearch: [OK]  
[root@ptktl-elk elasticsearch]# curl -XGET 'localhost:9200/?pretty'  
curl: (7) couldn't connect to host  
[root@ptktl-elk elasticsearch]#

The elastic failed to start.  
Please advise

Regards

---

<div class="post-metadata">

### Author: ![yoavb](https://avatars.discourse-cdn.com/v4/letter/y/839c29/32.png) [@yoavb](https://discuss.elastic.co/u/yoavb)
#### Post date: [February 12, 2017, 1:57pm UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/2 "2017-02-12T13:57:22Z")

</div>

OK , i have saw in the documentation that i need to run it with --batch option.

Now it failed to start elastic beacuse of the following error message

[root@ptktl-elk elasticsearch]# curl -XGET 'localhost:9200/?pretty'  
{  
"error" : {  
"root\_cause" : [  
{  
"type" : "security\_exception",  
"reason" : "missing authentication token for REST request [/?pretty]",  
"header" : {  
"WWW-Authenticate" : "Basic realm="security" charset="UTF-8""  
}  
}  
],  
"type" : "security\_exception",  
"reason" : "missing authentication token for REST request [/?pretty]",  
"header" : {  
"WWW-Authenticate" : "Basic realm="security" charset="UTF-8""  
}  
},  
"status" : 401  
}

Please advise  
Regards

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [February 12, 2017, 4:30pm UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/3 "2017-02-12T16:30:17Z")

</div>

So everything looks fine.  
You installed xpack and your server is secured with default credentials.

---

<div class="post-metadata">

### Author: ![yoavb](https://avatars.discourse-cdn.com/v4/letter/y/839c29/32.png) [@yoavb](https://discuss.elastic.co/u/yoavb)
#### Post date: [February 13, 2017, 8:42am UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/4 "2017-02-13T08:42:57Z")

</div>

Hi,

I am getting the security execption error for each statment i am running:

curl [http://localhost:9200/\_aliases?pretty=1](http://localhost:9200/_aliases?pretty=1)  
{  
"error" : {  
"root\_cause" : [  
{  
"type" : "security\_exception",  
"reason" : "missing authentication token for REST request [/\_aliases?pretty=1]",  
"header" : {  
"WWW-Authenticate" : "Basic realm="security" charset="UTF-8""  
}  
}  
],  
"type" : "security\_exception",  
"reason" : "missing authentication token for REST request [/\_aliases?pretty=1]",  
"header" : {  
"WWW-Authenticate" : "Basic realm="security" charset="UTF-8""  
}  
},  
"status" : 401  
}

How come that : "So everything looks fine"  
What should i do return document back to the client ?

Thanks

---

<div class="post-metadata">

### Author: ![yoavb](https://avatars.discourse-cdn.com/v4/letter/y/839c29/32.png) [@yoavb](https://discuss.elastic.co/u/yoavb)
#### Post date: [February 13, 2017, 8:56am UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/5 "2017-02-13T08:56:48Z")

</div>

Hi ,

Followed:

> **[Getting Started with Security | X-Pack for the Elastic Stack \[6.2\] | Elastic](https://www.elastic.co/guide/en/x-pack/current/security-getting-started.html)**

Trying to change elastic user password:  
[root@ptktl-elk]# curl -XPUT -u elastic 'localhost:9200/\_xpack/security/user/elastic/\_password' -d '{

> "password" : "elasticdevpass"  
> }'  
> Enter host password for user 'elastic':

{"error":{"root\_cause":[{"type":"security\_exception","reason":"failed to authenticate user [elastic]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}}],"type":"security\_exception","reason":"failed to authenticate user [elastic]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}},"status":401}

I am getting the same error as above.

Please advise  
Regards

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [February 13, 2017, 9:17am UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/6 "2017-02-13T09:17:15Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

What is the password you entered at this step?

```auto
Enter host password for user 'elastic':

```

If you enter `elasticdevpass` it will fail as [it's not the default password](https://www.elastic.co/guide/en/x-pack/current/security-getting-started.html).

---

<div class="post-metadata">

### Author: ![yoavb](https://avatars.discourse-cdn.com/v4/letter/y/839c29/32.png) [@yoavb](https://discuss.elastic.co/u/yoavb)
#### Post date: [February 13, 2017, 11:33am UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/7 "2017-02-13T11:33:13Z")

</div>

Hi,  
Yes i have entered `elasticdevpass` as a password.

Then i have tried the example in the documentation and it failed as well:

```auto
curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/elastic/_password' -d '{
  "password" : "elasticpassword"
}'

```

The error message is:

```auto
Enter host password for user 'elastic':
{"error":{"root_cause":[{"type":"security_exception","reason":"failed to authenticate user [elastic]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"failed to authenticate user [elastic]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}

```

Questions:

1. Why i am still getting the security exception ?
2. Say , i want to set a NEW password , can i use the curl above or this another method to set new password for elastic user ?

Thanks,

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [February 13, 2017, 11:49am UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/8 "2017-02-13T11:49:20Z")

</div>

1. because you did not enter the actual password
2. The curl command is the right way to do it. Just give the right initial password.

---

<div class="post-metadata">

### Author: ![yoavb](https://avatars.discourse-cdn.com/v4/letter/y/839c29/32.png) [@yoavb](https://discuss.elastic.co/u/yoavb)
#### Post date: [February 13, 2017, 2:24pm UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/9 "2017-02-13T14:24:48Z")

</div>

Hi David,  
I am running:  
`curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/elastic/_password' -d '{ "password" : "elasticpassword" }'`

Enter host password for user 'elastic': ---\> elasticpassword

Why i am still getting security exception .... ?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [February 13, 2017, 2:45pm UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/10 "2017-02-13T14:45:22Z")

</div>

`elasticpassword` is not the right password.

I told you already. Please read [https://www.elastic.co/guide/en/x-pack/current/security-getting-started.html](https://www.elastic.co/guide/en/x-pack/current/security-getting-started.html)

---

<div class="post-metadata">

### Author: ![adityajain19](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adityajain19/32/23171_2.png) [@adityajain19](https://discuss.elastic.co/u/adityajain19)
#### Post date: [February 26, 2017, 6:49am UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/11 "2017-02-26T06:49:35Z")

</div>

Hi team,

I have installed Xpack on Elasticsearch and Kibana. on testing elastic search on 9200 i see response. but when i am trying to access Kibana 5601, i get system red and

ui settings Elasticsearch plugin is red  
plugin:kibana@5.1.1 Ready  
plugin:elasticsearch@5.1.1 Authentication Exception  
plugin:console@5.1.1 Ready  
plugin:timelion@5.1.1 Ready

---

<div class="post-metadata">

### Author: ![adityajain19](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adityajain19/32/23171_2.png) [@adityajain19](https://discuss.elastic.co/u/adityajain19)
#### Post date: [February 26, 2017, 6:50am UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/12 "2017-02-26T06:50:14Z")

</div>

Can anyone help me please. we need to do a POC with 30 days test version and then apply for paid version.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [February 26, 2017, 8:21am UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/13 "2017-02-26T08:21:40Z")

</div>

Please open your own thread in #x-pack

---

<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: [March 26, 2017, 8:21am UTC](https://discuss.elastic.co/t/elaticsearch-failed-to-start-after-installing-x-pack/74807/14 "2017-03-26T08:21:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
