我正在关注this文章在我的系统上安装和配置elasticsearch,安装和配置工作正常,但是当我尝试运行elasticsearch时:
curl -X GET 'http://localhost:9200'
我收到此错误:
curl: (7) Failed to connect to localhost port 9200: Connection refused
编辑:1
@val建议之后:
sudo systemctl status elasticsearch
它返回为:
elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendo
Active: failed (Result: exit-code) since Wed 2017-05-24 09:11:16 IST; 2h 17mi
Docs: http://www.elastic.co
Process: 5043 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DI
Process: 5039 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-
Main PID: 5043 (code=exited, status=1/FAILURE)
May 24 09:11:16 ahmed-pc systemd[1]: Starting Elasticsearch...
May 24 09:11:16 ahmed-pc systemd[1]: Started Elasticsearch.
May 24 09:11:16 ahmed-pc systemd[1]: elasticsearch.service: Main process exited,
May 24 09:11:16 ahmed-pc systemd[1]: elasticsearch.service: Unit entered failed
May 24 09:11:16 ahmed-pc systemd[1]: elasticsearch.service: Failed with result '
lines 1-13/13 (END)
编辑2:
journalctrl -f results
May 25 08:35:31 ahmed-pc systemd[1]: Starting Elasticsearch...
May 25 08:35:31 ahmed-pc systemd[1]: Started Elasticsearch.
May 25 08:35:31 ahmed-pc sudo[6256]: pam_unix(sudo:session): session closed for user root
May 25 08:35:42 ahmed-pc dhclient[3644]: DHCPREQUEST of 192.168.43.121 on wlp3s0 to 192.168.43.1 port 67 (xid=0x4be71b5a)
May 25 08:35:42 ahmed-pc dhclient[3644]: DHCPACK of 192.168.43.121 from 192.168.43.1
May 25 08:35:42 ahmed-pc dhclient[3644]: bound to 192.168.43.121 -- renewal in 1339 seconds.
May 25 08:35:43 ahmed-pc systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
May 25 08:35:43 ahmed-pc systemd[1]: elasticsearch.service: Unit entered failed state.
May 25 08:35:43 ahmed-pc systemd[1]: elasticsearch.service: Failed with result 'exit-code'.