你好我的配置是:
弹性搜索.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-01-18 18:45:53,221 警告:org.elasticsearch.discovery.zen - [graylog2-server] 无法连接到主服务器 [[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-01-18 18:45:53,221 警告:org.elasticsearch.discovery.zen - [graylog2-server] 无法连接到主服务器 [[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 是否正常运行。