安装elasticsearch http用户验证插件后,无需凭证即可在生产环境中访问elasticsearch
我可以在生产环境中访问弹性搜索,而无需凭证,我在Dev/stage实例上尝试的方法也很好 关于开发的安装elasticsearch http用户验证插件后,无需凭证即可在生产环境中访问elasticsearch,
Warning: implode(): Invalid arguments passed in /data/phpspider/zhask/webroot/tpl/detail.html on line 45
,,我可以在生产环境中访问弹性搜索,而无需凭证,我在Dev/stage实例上尝试的方法也很好 关于开发的 Elasticsearch v 5.1.2 Elasticsearch-http-user-auth v5.1.2 java version "1.8.0_45" elasticsearch.yml cluster.name: APP node.name: node1 network.host: [server_1_ip, local] discovery.zen.ping.unicast.
Elasticsearch v 5.1.2
Elasticsearch-http-user-auth v5.1.2
java version "1.8.0_45"
elasticsearch.yml
cluster.name: APP
node.name: node1
network.host: [server_1_ip, local]
discovery.zen.ping.unicast.hosts: [server_1_ip, server_2_ip]
elasticfence.disabled: false
elasticfence.root.password: root
cluster.name: APP
node.name: node1
network.host: [server_1_ip, local]
discovery.zen.ping.unicast.hosts: [server_1_ip, server_2_ip]
elasticfence.disabled: false
elasticfence.root.password: root
ES API调用
curl http://localhost:9200/_cluster/health?pretty
Response: Needs Basic Auth
curl -u root:root http://localhost:9200/_cluster/health?pretty
Response: json data
curl http://localhost:9200/_cluster/health?pretty
Response: JSON data
Actual I should get 'Needs Basic Auth'
curl -u root:root http://localhost:9200/_cluster/health?pretty
Response: JSON data
在生产上
Elasticsearch v 5.1.2
Elasticsearch-http-user-auth v5.1.2
java version "1.8.0_111"
elasticsearch.yml
cluster.name: APP
node.name: node1
network.host: [server_1_ip, local]
discovery.zen.ping.unicast.hosts: [server_1_ip, server_2_ip]
elasticfence.disabled: false
elasticfence.root.password: root
cluster.name: APP
node.name: node1
network.host: [server_1_ip, local]
discovery.zen.ping.unicast.hosts: [server_1_ip, server_2_ip]
elasticfence.disabled: false
elasticfence.root.password: root
ES API调用
curl http://localhost:9200/_cluster/health?pretty
Response: Needs Basic Auth
curl -u root:root http://localhost:9200/_cluster/health?pretty
Response: json data
curl http://localhost:9200/_cluster/health?pretty
Response: JSON data
Actual I should get 'Needs Basic Auth'
curl -u root:root http://localhost:9200/_cluster/health?pretty
Response: JSON data
在中创建了一个问题
问题?
我错过了任何配置吗
请帮我解决这个问题