On master node
클러스터 마스터 노드 설정(elasticsearch.yml).
# Enable encryption and mutual authentication between cluster nodes xpack.security.transport.ssl: enabled: true verification_mode: certificate keystore.path: certs/transport.p12 truststore.path: certs/transport.p12 # Create a new cluster with the current node only # Additional nodes can still join the cluster later cluster.initial_master_nodes: ["192.168.31.177"] # Connections are encrypted and require user authentication http.host: 192.168.31.177 # Allow other nodes to join the cluster from anywhere # Connections are encrypted and mutually authenticated transport.host: 192.168.31.177 | cs |
피어 노드용 토큰 생성.
PS D:\ELK\elasticsearch-9.0.1\bin> .\elasticsearch-create-enrollment-token -s node eyJ2ZXIiOiI4LjE0LjAiLCJhZHIiOlsiMTkyLjE2OC4zMS4xNzc6OTIwMCJdLCJmZ3IiOiI0MTZlZTU1ZjU3MDhjZTE2MjU4NzRhNzliNzZmN2QwNDEyNjFkY2JjMmYyZDBiODBkYmE1MmE2ZGY5OGM5ZDY5Iiwia2V5IjoiZ05SdjNaWUJnYmZyWW51RzJhcnk6b1dwRXk5S1p6a19IYlVvemdXcHJnUSJ | cs |
On peer node
마스터 노드에서 생성한 토큰으로 노드 간 연동 실행.
[root@Centos7 ~]# /usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token eyJ2ZXIiOiI4LjE0LjAiLCJhZHIiOlsiMTkyLjE2OC4zMS4xNzc6OTIwMCJdLCJmZ3IiOiI0MTZlZTU1ZjU3MDhjZTE2MjU4NzRhNzliNzZmN2QwNDEyNjFkY2JjMmYyZDBiODBkYmE1MmE2ZGY5OGM5ZDY5Iiwia2V5IjoiZ05SdjNaWUJnYmZyWW51RzJhcnk6b1dwRXk5S1p6a19IYlVvemdXcHJnUSJ9 This node will be reconfigured to join an existing cluster, using the enrollment token that you provided. This operation will overwrite the existing configuration. Specifically: - Security auto configuration will be removed from elasticsearch.yml - The [certs] config directory will be removed - Security auto configuration related secure settings will be removed from the elasticsearch.keystore Do you want to continue with the reconfiguration process [y/N]y | cs |
연동 후 피어 노드 설정(elasticsearch.yml).
# Enable encryption and mutual authentication between cluster nodes xpack.security.transport.ssl: enabled: true verification_mode: certificate keystore.path: certs/transport.p12 truststore.path: certs/transport.p12 # Discover existing nodes in the cluster discovery.seed_hosts: ["192.168.31.177:9300"] # Allow HTTP API connections from anywhere # Connections are encrypted and require user authentication http.host: 0.0.0.0 # Allow other nodes to join the cluster from anywhere # Connections are encrypted and mutually authenticated transport.host: 0.0.0.0 | cs |
피어 노드 서비스 시작. 그런데 안 된다.
[root@Centos7 ~]# service elasticsearch start Redirecting to /bin/systemctl start elasticsearch.service Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details. | cs |
에러 로그(elasticsearch.log)를 보니 머신러닝 기능과 운영체제 간 호환성 문제가 발생한 모양. 공식 문서에서는 SSE4.2를 지원하는 프로세서가 필요하다고 하는데 뭔소린지 모르겠다. 윈도우는 문제 없는 거 보니 가상머신이라 그런 듯. 버전 9는 안 되는 게 많네(..)
[2025-05-22T22:25:41,459][ERROR][o.e.b.Elasticsearch ] [Centos7] fatal exception while booting Elasticsearch org.elasticsearch.ElasticsearchException: Failure running machine learning native code. This could be due to running on an unsupported OS or distribution, missing OS libraries, or a problem with the temp directory. To bypass this problem by running Elasticsearch without machine learning functionality set [xpack.ml.enabled: false]. | cs |
ML disable 설정 추가하면 실행된다.
관련 글
댓글 없음:
댓글 쓰기