Elaticsearch failed to start after installing x-pack


(Yoav) #1

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
    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


(Yoav) #2

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


(David Pilato) #3

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


(Yoav) #4

Hi,

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

curl 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


(Yoav) #5

Hi ,

Followed:
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


(David Pilato) #6

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

What is the password you entered at this step?

Enter host password for user 'elastic':

If you enter elasticdevpass it will fail as it's not the default password.


(Yoav) #7

Hi,
Yes i have entered elasticdevpass as a password.

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

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

The error message is:

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,


(David Pilato) #8
  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.

(Yoav) #9

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 .... ?


(David Pilato) #10

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


Importing data with cURL error. Newb here
(Aditya Jain) #11

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


(Aditya Jain) #12

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


(David Pilato) #13

Please open your own thread in #x-pack


(system) closed #14

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