Elasticsearch安装localhost:9200无法连接,并且没有要查看的日志文件

时间:2019-05-22 00:03:38

标签: elasticsearch elastic-stack

不要紧记 L K E

那有什么用呢?可以正常运行的Elasticsearch安装需要什么?

=============安装硬件:

Raspberry Pi 3+
Raspbian GNU/Linux 9 (stretch)

=============通过apt安装:

sudo apt-get install elasticsearch

Setting up libelasticsearch1.7-java (1.7.5-1) ...
Setting up elasticsearch (1.7.5-1) ...

按照安装说明的说明,我去更改/etc/elasticsearch/elasticsearch.yml

所有行均已注释,因此我取消注释3行,并按照说明添加了配置信息:

network.host: 0.0.0.0
http.port: 9200
path.logs: /var/log/elasticsearch
path.data: /var/lib/elasticsearch

=============根据安装,Elasticsearch正在作为服务运行:

$ sudo service elasticsearch status
● elasticsearch.service - LSB: Starts elasticsearch
Loaded: loaded (/etc/init.d/elasticsearch; generated; vendor preset: enabled)
Active: active (exited) since Tue 2019-05-21 02:53:17 PDT; 2min 52s ago
Docs: man:systemd-sysv-generator(8)
Process: 21421 ExecStop=/etc/init.d/elasticsearch stop (code=exited, status=0/SUCCESS)
Process: 21455 ExecStart=/etc/init.d/elasticsearch start (code=exited, status=0/SUCCESS)

May 21 02:53:17 xxxx systemd[1]: Starting LSB: Starts elasticsearch...
May 21 02:53:17 xxxx systemd[1]: Started LSB: Starts elasticsearch.

=============但未在活动连接中列出: $ sudo netstat -natp

[PRIVATE DATA]

=============测试安装:

$ curl http://localhost:9200
curl: (7) Failed to connect to localhost port 9200: Connection refused

没有日志文件:

$ sudo ls -l /var/{log,lib}/elasticsearch
/var/lib/elasticsearch:
total 0

/var/log/elasticsearch:
total 0

没有任何日志,就无法追踪任何内容。并设置log.path不会创建任何日志文件。

0 个答案:

没有答案