我的配置是:
elasticsearch.yml:
cluster.name: graylog2
node.master: true
node.data: true
bootstrap.mlockall: true
ES_HEAP_SIZE: 8192 (@ 16GB memory)
network.bind_host: 127.0.0.1
script.disable_dynamic: true
graylog2.conf:
is_master = true
node_id_file = /etc/graylog2-server-node-id
password_secret=something
root_password_sha2=something
plugin_dir = plugin
rest_listen_uri = http://127.0.0.1:12900/
rest_transport_uri = http://127.0.0.1:12900/
elasticsearch_shards = 1
elasticsearch_index_prefix = graylog2
elasticsearch_cluster_name = graylog2
elasticsearch_discovery_zen_ping_multicast_enabled = false
elasticsearch_discovery_zen_ping_unicast_hosts = 127.0.0.1:9300
我正在尝试在我的apache localhost中安装。
当我使用curl -XGET' http://localhost:9200/_cluster/health?pretty=true'
进行检查时我得到的输出是:
{
"cluster_name" : "graylog2",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 0,
"active_shards" : 0,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0
}
进行操作
输出: 2016年1月18日18:45:53221 WARN:org.elasticsearch.discovery.zen - [graylog2服务器]未能连接到掌握[[Sunpyre] [l1hOltklR-OIeBq7dcPR9g] [INET [/172.16.1.169:9300]] {master = true}],正在重试...... org.elasticsearch.transport.ConnectTransportException:[Sunpyre] [inet [/172.16.1.169:9300]] connect_timeout [30s]
2016年1月18日18:45:53221 WARN:org.elasticsearch.discovery.zen - [graylog2服务器]未能连接到掌握[[Sunpyre] [l1hOltklR-OIeBq7dcPR9g] [INET [/172.16.1.169: 9300]] {master = true}],正在重试...... org.elasticsearch.transport.ConnectTransportException:[Sunpyre] [inet [/172.16.1.169:9300]] connect_timeout [30s]
错误:无法成功连接到ElasticSearch。检查您的群集状态是否为RED且ElasticSearch是否正常运行。
答案 0 :(得分:0)
使用官方文档我没有问题
请查看Elasticsearch版本