Elasticsearch:Curl -X GET“ localhost:9200”给出“网络错误(dns_unresolved_hostname)”

时间:2019-06-10 07:35:02

标签: elasticsearch curl elastic-stack

我已经使用.tar.gz作为wget的用户进行安装,并chown来作为xyz用户和xyzgrp组的用户来编辑elasticsearch文件夹。

我确实使用./bin/elasticsearch运行es,并与no errors正常运行。

然后我卷曲curl -X GET "localhost:9200",它产生以下错误。但是,如果我以root curl的身份运行,则会吐出预期的输出。

作为xyz用户:

<HTML><HEAD>
<TITLE>Network Error</TITLE>
</HEAD>
<BODY>
<FONT face="Helvetica">
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border=0 cellPadding=1 width="80%">
<TR><TD>
<FONT face="Helvetica">
<big>Network Error (dns_unresolved_hostname)</big>
<BR>
<BR>
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
Your requested host "localhost" could not be resolved by DNS.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">

</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica" SIZE=2>
<BR>
For assistance, contact your network support team.
</FONT>
</TD></TR>
</TABLE>
</blockquote>
</FONT>
</BODY></HTML>

以root用户身份

{
  "name" : "wE3SaRO",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "YobA_1NiT_aHGlgQhAWdZA",
  "version" : {
    "number" : "6.4.2",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "04711c2",
    "build_date" : "2018-09-26T13:34:09.098244Z",
    "build_snapshot" : false,
    "lucene_version" : "7.4.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

还有一件事,我以xyz用户而不是以root用户的身份运行Elasticsearch

0 个答案:

没有答案