But command /usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto getting me
Failed to determine the health of the cluster running at 172.29.39.111:9200
Unexpected response code [503] from calling GET 172.29.39.111:9200/_cluster/health?pretty
Cause: master_not_discovered_exception
/usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto.
xpack.security.enabled: true
и xpack.security.transport.ssl.enabled: true
у меня статус здоровья кластера зеленый.elk-cluster-node1:~ # curl GET http://172.29.39.111:9200/_cluster/health?pretty
curl: (6) Could not resolve host: GET
{
"cluster_name" : "ELK-CLUSTER",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 4,
"number_of_data_nodes" : 2,
"active_primary_shards" : 8,
"active_shards" : 16,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
elk-cluster-node1:~ # curl GET http://172.29.39.111:9200/_cluster/health?pretty
curl: (6) Could not resolve host: GET
{
"error" : {
"root_cause" : [
{
"type" : "security_exception",
"reason" : "missing authentication credentials for REST request [/_cluster/health?pretty]",
"header" : {
"WWW-Authenticate" : "Basic realm=\"security\" charset=\"UTF-8\""
}
}
],
"type" : "security_exception",
"reason" : "missing authentication credentials for REST request [/_cluster/health?pretty]",
"header" : {
"WWW-Authenticate" : "Basic realm=\"security\" charset=\"UTF-8\""
}
},
"status" : 401
}
/usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto.
не проходит, потому что не может считать состояние здоровья кластера.а включили xpack на всех серверах?
elk-cluster-node1:~ # tail -n 100 /var/log/elasticsearch/ELK-CLUSTER.log
[2021-07-09T15:48:01,893][WARN ][o.e.t.TcpTransport ] [$HOSTNAME] exception caught on transport layer [Netty4TcpChannel{localAddress=/172.29.39.111:9300, remoteAddress=/172.29.39.113:55522, profile=default}], closing connection
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: No available authentication scheme
...
Caused by: javax.net.ssl.SSLHandshakeException: No available authentication scheme
...
[2021-07-09T15:48:02,299][WARN ][o.e.t.TcpTransport ] [$HOSTNAME] exception caught on transport layer [Netty4TcpChannel{localAddress=/172.29.39.111:9300, remoteAddress=/172.29.39.114:54048, profile=default}], closing connection
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: No available authentication scheme
...
Caused by: javax.net.ssl.SSLHandshakeException: No available authentication scheme
...
elk-cluster-node4:~ # tail -n 100 /var/log/elasticsearch/ELK-CLUSTER.log
[2021-07-09T15:57:31,902][WARN ][o.e.t.TcpTransport ] [$HOSTNAME] exception caught on transport layer [Netty4TcpChannel{localAddress=/172.29.39.114:9300, remoteAddress=/172.29.39.111:57542, profile=default}], closing connection
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: No available authentication scheme
Caused by: javax.net.ssl.SSLHandshakeException: No available authentication scheme
[2021-07-09T15:57:32,589][WARN ][o.e.c.c.ClusterFormationFailureHelper] [$HOSTNAME] master not discovered yet: have discovered [{$HOSTNAME}{tjpWl7KYQmKHWBp3RkChUQ}{dgMAWhSYQLGoHJ0BOMMsMQ}{172.29.39.114}{172.29.39.114:9300}{cdfhlrstw}]; discovery will continue using [172.29.39.111:9300, 172.29.39.112:9300, 172.29.39.113:9300] from hosts providers and [] from last-known cluster state; node term 1, last-accepted version 90 in term 1
[2021-07-09T15:57:32,904][WARN ][o.e.t.TcpTransport ] [$HOSTNAME] exception caught on transport layer [Netty4TcpChannel{localAddress=/172.29.39.114:9300, remoteAddress=/172.29.39.111:57544, profile=default}], closing connection
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: No available authentication scheme
] [$HOSTNAME] exception caught on transport layer [Netty4TcpChannel{localAddress=/172.29.39.114:9300, remoteAddress=/172.29.39.111:57542, profile=default}], closing connection
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: No available authentication scheme
{"_nodes":{"total":4,"successful":4,"failed":0},"cluster_name":"ELK-CLUSTER","nodes":{"uC5GIM95TLew46pokXn2yQ":{"name":"elk-cluster-node3","transport_address":"172.29.39.113:9300","host":"172.29.39.113","ip":"172.29.39.113","version":"7.13.2","build_flavor":"default","build_type":"rpm","build_hash":"4d960a0733be83dd2543ca018aa4ddc42e956800","roles":["data","data_cold","data_content","data_frozen","data_hot","data_warm","ml","remote_cluster_client","transform"],"attributes":{"ml.machine_memory":"3635412992","ml.max_open_jobs":"512","xpack.installed":"true","ml.max_jvm_size":"1073741824","transform.node":"true"},"settings":{"cluster":{"initial_master_nodes":["172.29.39.111","172.29.39.112"],"name":"ELK-CLUSTER","election":{"strategy":"supports_voting_only"}},"node":{"name":"elk-cluster-node3","pidfile":"/var/run/elasticsearch/elasticsearch.pid","attr":{"transform":{"node":"true"},"xpack":{"installed":"true"},"ml":{"max_jvm_size":"1073741824","machine_memory":"3635412992","max_open_jobs":"512"}},"data":"true","ingest":"false","master":"false"},"path":{"data":["/var/lib/elasticsearch"],"logs":"/var/log/elasticsearch","home":"/usr/share/elasticsearch"},"discovery":{"seed_hosts":["172.29.39.111","172.29.39.112","172.29.39.113","172.29.39.114"]},"action":{"auto_create_index":".monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*"},"client":{"type":"node"},"http":{"type":"security4","port":"9200","type.default":"netty4"},"transport":{"type":"security4","features":{"x-pack":"true"},"type.default":"netty4"},"network":{"host":"0.0.0.0"}}},"uls9FyNCT4uUTWCYz6qRMQ":{"name":"elk-cluster-node1","transport_address":"172.29.39.111:9300","host":"172.29.39.111","ip":"172.29.39.111","version":"7.13.2","build_flavor":"default","build_type":"rpm","build_hash":"4d960a0733be83dd2543ca018aa4ddc42e956800","roles":["master","ml","remote_cluster_client"],"attributes":{"ml.machine_memory":"3635412992","xpack.installed":"true","transform.node":"false","ml.max_open_jobs":"512","ml.max_jvm_size":"1073741824"},"settings":{"cluster":{"initial_master_nodes":["172.29.39.111","172.29.39.112"],"name":"ELK-CLUSTER","election":{"strategy":"supports_voting_only"}},"node":{"name":"elk-cluster-node1","pidfile":"/var/run/elasticsearch/elasticsearch.pid","attr":{"transform":{"node":"false"},"xpack":{"installed":"true"},"ml":{"max_jvm_size":"1073741824","machine_memory":"3635412992","max_open_jobs":"512"}},"data":"false","ingest":"false","master":"true"},"path":{"data":["/var/lib/elasticsearch"],"logs":"/var/log/elasticsearch","home":"/usr/share/elasticsearch"},"discovery":{"seed_hosts":["172.29.39.111","172.29.39.112","172.29.39.113","172.29.39.114"]},"action":{"auto_create_index":".monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*"},"client":{"type":"node"},"http":{"type":"security4","port":"9200","type.default":"netty4"},"transport":{"type":"security4","features":{"x-pack":"true"},"type.default":"netty4"},"network":{"host":"0.0.0.0"}}},"tjpWl7KYQmKHWBp3RkChUQ":{"name":"elk-cluster-node4","transport_address":"172.29.39.114:9300","host":"172.29.39.114","ip":"172.29.39.114","version":"7.13.2","build_flavor":"default","build_type":"rpm","build_hash":"4d960a0733be83dd2543ca018aa4ddc42e956800","roles":["data","data_cold","data_content","data_frozen","data_hot","data_warm","ml","remote_cluster_client","transform"],"attributes":{"ml.machine_memory":"3635412992","ml.max_open_jobs":"512","xpack.installed":"true","ml.max_jvm_size":"1073741824","transform.node":"true"},"settings":{"cluster":{"initial_master_nodes":["172.29.39.111","172.29.39.112"],"name":"ELK-CLUSTER","election":{"strategy":"supports_voting_only"}},"node":{"name":"elk-cluster-node4","pidfile":"/var/run/elasticsearch/elasticsearch.pid","attr":{"transform":{"node":"true"},"xpack":{"installed":"true"},"ml":{"max_jvm_size":"1073741824","machine_memory":"3635412992","max_open_jobs":"512"}},"data":"true","ingest":"false","master":"false"},"path":{"data":["/var/lib/elasticsearch"],"logs":"/var/log/elasticsearch","home":"/usr/share/elasticsearch"},"discovery":{"seed_hosts":["172.29.39.111","172.29.39.112","172.29.39.113","172.29.39.114"]},"action":{"auto_create_index":".monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*"},"client":{"type":"node"},"http":{"type":"security4","port":"9200","type.default":"netty4"},"transport":{"type":"security4","features":{"x-pack":"true"},"type.default":"netty4"},"network":{"host":"0.0.0.0"}}},"O3GNkZk-RkSjzuZKVZbmEw":{"name":"elk-cluster-node2","transport_address":"172.29.39.112:9300","host":"172.29.39.112","ip":"172.29.39.112","version":"7.13.2","build_flavor":"default","build_type":"rpm","build_hash":"4d960a0733be83dd2543ca018aa4ddc42e956800","roles":["master","ml","remote_cluster_client"],"attributes":{"ml.machine_memory":"3635412992","ml.max_open_jobs":"512","xpack.installed":"true","ml.max_jvm_size":"1073741824","transform.node":"false"},"settings":{"cluster":{"initial_master_nodes":["172.29.39.111","172.29.39.112"],"name":"ELK-CLUSTER","election":{"strategy":"supports_voting_only"}},"node":{"name":"elk-cluster-node2","pidfile":"/var/run/elasticsearch/elasticsearch.pid","attr":{"transform":{"node":"false"},"xpack":{"installed":"true"},"ml":{"max_jvm_size":"1073741824","machine_memory":"3635412992","max_open_jobs":"512"}},"data":"false","ingest":"false","master":"true"},"path":{"data":["/var/lib/elasticsearch"],"logs":"/var/log/elasticsearch","home":"/usr/share/elasticsearch"},"discovery":{"seed_hosts":["172.29.39.111","172.29.39.112","172.29.39.113","172.29.39.114"]},"action":{"auto_create_index":".monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*"},"client":{"type":"node"},"http":{"type":"security4","port":"9200","type.default":"netty4"},"transport":{"type":"security4","features":{"x-pack":"true"},"type.default":"netty4"},"network":{"host":"0.0.0.0"}}}}}
с этим все в порядке.