系统相关
首页 > 系统相关> > linux – Ubuntu 16.4中的Elasticsearch连接错误

linux – Ubuntu 16.4中的Elasticsearch连接错误

作者:互联网

在我的ubuntu机器上,当我运行命令curl -X GET’http:// localhost:9200’来测试连接时,它显示以下消息.
 curl:(7)无法连接到localhost端口9200:连接被拒绝

当我用sudo systemctl start elasticsearch检查服务器状态时,它显示以下消息.

    ● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2016-11-20 16:32:30 BDT; 44s ago
     Docs: http://www.elastic.co
  Process: 8653 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefa
  Process: 8649 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
 Main PID: 8653 (code=exited, status=1/FAILURE)

Nov 20 16:32:29 bahar elasticsearch[8653]: 2016-11-20 16:32:25,579 main ERROR Null object returned for RollingFile in Appenders.
Nov 20 16:32:29 bahar elasticsearch[8653]: 2016-11-20 16:32:25,579 main ERROR Null object returned for RollingFile in Appenders.
Nov 20 16:32:29 bahar elasticsearch[8653]: 2016-11-20 16:32:25,580 main ERROR Unable to locate appender "rolling" for logger config "root"
Nov 20 16:32:29 bahar elasticsearch[8653]: 2016-11-20 16:32:25,580 main ERROR Unable to locate appender "index_indexing_slowlog_rolling" for logge
Nov 20 16:32:29 bahar elasticsearch[8653]: 2016-11-20 16:32:25,581 main ERROR Unable to locate appender "index_search_slowlog_rolling" for logger 
Nov 20 16:32:29 bahar elasticsearch[8653]: 2016-11-20 16:32:25,581 main ERROR Unable to locate appender "deprecation_rolling" for logger config "o
Nov 20 16:32:29 bahar elasticsearch[8653]: [2016-11-20T16:32:25,592][WARN ][o.e.c.l.LogConfigurator  ] ignoring unsupported logging configuration 
Nov 20 16:32:30 bahar systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Nov 20 16:32:30 bahar systemd[1]: elasticsearch.service: Unit entered failed state.
Nov 20 16:32:30 bahar systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

解决方法:

这是elasticsearch.yml(etc / elasticsearch / elasticsearch.yml)中PATH和LOgs的错误

取消选中这些路径,您的错误将被删除.

标签:linux,search,curl,elasticsearch,ubuntu-16-04
来源: https://codeday.me/bug/20190706/1393215.html