VagrantのAmazon linux2で、elasticsearch-5.6.16をインストールし、curl localhost:9200/とすると、Connection refusedのエラーになります。
--
$ cat /etc/system-release
Amazon Linux release 2 (Karoo)
$ java -version
openjdk version “1.8.0_265”
$ sudo yum install elasticsearch-5.6.16
$ sudo vi /etc/elasticsearch/jvm.options
-Xms256m -Xmx256m
$ sudo vi /etc/elasticsearch/elasticsearch.yml
network.host: 0.0.0.0 http.port: 9200
$ sudo service elasticsearch start
Starting elasticsearch (via systemctl): [ OK ]
$ curl localhost:9200/
curl: (7) Failed to connect to localhost port 9200: Connection refused
$ sudo systemctl status elasticsearch -l
● elasticsearch.service - Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since 水 2020-12-16 09:23:52 JST; 59s ago Docs: http://www.elastic.co Process: 28744 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR} (code=exited, status=1/FAILURE) Process: 28742 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS) Main PID: 28744 (code=exited, status=1/FAILURE) 12月 16 09:23:50 localhost systemd[1]: Starting Elasticsearch... 12月 16 09:23:50 localhost systemd[1]: Started Elasticsearch. 12月 16 09:23:50 localhost elasticsearch[28744]: OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N 12月 16 09:23:52 localhost systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE 12月 16 09:23:52 localhost systemd[1]: Unit elasticsearch.service entered failed state. 12月 16 09:23:52 localhost systemd[1]: elasticsearch.service failed.
※Elastic Search7.10.1-1ではエラーはありませんでしたが、ELKの環境構築のため、Kibanaに合わせて5系をインストールし直したらエラーになりました。
解決方法を教えていただけないでしょうか?
あなたの回答
tips
プレビュー