我已经使用.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