关闭

elasticsearch-2.3.5安装search-guard-2.3.5.15遇到的问题

标签: ElasticSearchsearch-guard
471人阅读 评论(0) 收藏 举报
分类:

在没有启动elasticsearch时,执行如下操作会提示

elasticsearch-2.3.5# plugins/search-guard-2/tools/sgadmin.sh -cd plugins/search-guard-2/sgconfig/ -ks plugins/search-guard-2/sgconfig/node-0-keystore.jks -ts plugins/search-guard-2/sgconfig/truststore.jks  -nhnv
Will connect to localhost:9300
ERR: Seems there is no elasticsearch running on localhost:9300 - Will exit

此时启动elasticsearch的提示如下:

[2016-08-31 11:35:47,310][ERROR][com.floragunn.searchguard.auth.BackendRegistry] Not yet initialized
[2016-08-31 11:35:47,683][WARN ][com.floragunn.searchguard.action.configupdate.TransportConfigUpdateAction] [0] searchguard index not healthy yet, we try again ... (Reason: timeout)
[2016-08-31 11:35:49,315][ERROR][com.floragunn.searchguard.auth.BackendRegistry] Not yet initialized
[2016-08-31 11:35:51,320][ERROR][com.floragunn.searchguard.auth.BackendRegistry] Not yet initialized
[2016-08-31 11:35:53,324][ERROR][com.floragunn.searchguard.auth.BackendRegistry] Not yet initialized
[2016-08-31 11:35:55,329][ERROR][com.floragunn.searchguard.auth.BackendRegistry] Not yet initialized
[2016-08-31 11:35:57,334][ERROR][com.floragunn.searchguard.auth.BackendRegistry] Not yet initialized
[2016-08-31 11:35:59,004][INFO ][cluster.metadata         ] [0] [searchguard] creating index, cause [api], templates [], shards [1]/[0], mappings []
[2016-08-31 11:35:59,097][INFO ][cluster.routing.allocation] [0] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[searchguard][0]] ...]).
[2016-08-31 11:35:59,338][ERROR][com.floragunn.searchguard.auth.BackendRegistry] Not yet initialized
[2016-08-31 11:35:59,360][INFO ][cluster.metadata         ] [0] [searchguard] create_mapping [config]
[2016-08-31 11:35:59,598][INFO ][cluster.metadata         ] [0] [searchguard] create_mapping [roles]
[2016-08-31 11:35:59,695][INFO ][cluster.metadata         ] [0] [searchguard] create_mapping [rolesmapping]
[2016-08-31 11:35:59,762][INFO ][cluster.metadata         ] [0] [searchguard] create_mapping [internalusers]
[2016-08-31 11:35:59,827][INFO ][cluster.metadata         ] [0] [searchguard] create_mapping [actiongroups]
[2016-08-31 11:36:00,150][INFO ][com.floragunn.searchguard.action.configupdate.TransportConfigUpdateAction] [0] Node '0' initialized

然后再执行search-guard-2/tools/sgadmin.sh可以看到成功的提示如下:

elasticsearch-2.3.5# plugins/search-guard-2/tools/sgadmin.sh -cd plugins/search-guard-2/sgconfig/ -ks plugins/search-guard-2/sgconfig/node-0-keystore.jks -ts plugins/search-guard-2/sgconfig/truststore.jks  -nhnv

Will connect to localhost:9300 ... done
Contacting elasticsearch cluster 'elasticsearch' and wait for YELLOW clusterstate ...
Clustername: elasticsearch
Clusterstate: YELLOW
Number of nodes: 1
Number of data nodes: 1
searchguard index does not exists, attempt to create it ... done
Populate config from /work/elasticsearch-2.3.5/plugins/search-guard-2/sgconfig
Will update 'config' with plugins/search-guard-2/sgconfig/sg_config.yml
   SUCC: Configuration for 'config' created or updated
Will update 'roles' with plugins/search-guard-2/sgconfig/sg_roles.yml
   SUCC: Configuration for 'roles' created or updated
Will update 'rolesmapping' with plugins/search-guard-2/sgconfig/sg_roles_mapping.yml
   SUCC: Configuration for 'rolesmapping' created or updated
Will update 'internalusers' with plugins/search-guard-2/sgconfig/sg_internal_users.yml
   SUCC: Configuration for 'internalusers' created or updated
Will update 'actiongroups' with plugins/search-guard-2/sgconfig/sg_action_groups.yml
   SUCC: Configuration for 'actiongroups' created or updated

Done with success

之后修改kibana的配置文件

$ vi config/kibana.yml
server.port: 5601
server.host: 0.0.0.0
elasticsearch.url: "https://10.1.141.41:9200"
elasticsearch.preserveHost: true
elasticsearch.username: user  #用户名和密码来自elasticsearch-2.3.5/plugins/search-guard-2/sgconfig/sg_internal_users.yml
elasticsearch.password: password
elasticsearch.ssl.verify: false
启动kibana就成功了

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:503122次
    • 积分:7571
    • 等级:
    • 排名:第2924名
    • 原创:191篇
    • 转载:471篇
    • 译文:1篇
    • 评论:31条
    最新评论