Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
<img src="//i.stack.imgur.com/RUiNP.png" height="16" width="18" alt="" class="sponsor tag img">elasticsearch localhost不解析端口9200上的elasticsearch,但解析端口8888上的MAMP_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch_Localhost_Mamp - Fatal编程技术网 elasticsearch localhost不解析端口9200上的elasticsearch,但解析端口8888上的MAMP,elasticsearch,localhost,mamp,elasticsearch,Localhost,Mamp" /> elasticsearch localhost不解析端口9200上的elasticsearch,但解析端口8888上的MAMP,elasticsearch,localhost,mamp,elasticsearch,Localhost,Mamp" />

elasticsearch localhost不解析端口9200上的elasticsearch,但解析端口8888上的MAMP

elasticsearch localhost不解析端口9200上的elasticsearch,但解析端口8888上的MAMP,elasticsearch,localhost,mamp,elasticsearch,Localhost,Mamp,我已经在我的OSX Yosemite上安装了MAMP作为本地主机,它工作得很好——浏览器/命令行可以完美地解析8888端口上的本地主机 昨天,我使用homebrew以及ES-PHP客户端、composer和Marvel安装了elasticsearch,但当我开始在本地主机上测试ES时,遇到了一个奇怪的问题: 我在ES:curl-xget上发出了命令http://localhost:9200在终端上,它卡住了——没有输出,我必须控制-C才能出来 但是如果我做了curl-X得到http://127.

我已经在我的OSX Yosemite上安装了MAMP作为本地主机,它工作得很好——浏览器/命令行可以完美地解析8888端口上的本地主机

昨天,我使用
homebrew
以及ES-PHP客户端、composer和Marvel安装了
elasticsearch
,但当我开始在本地主机上测试ES时,遇到了一个奇怪的问题:

我在ES:
curl-xget上发出了命令http://localhost:9200
在终端上,它卡住了——没有输出,我必须控制-C才能出来

但是如果我做了
curl-X得到http://127.0.0.1:9200
,我从ES获得了完美的输出:

(我省略了输出的其余部分。)

似乎无法解析localhost。但奇怪的是,当我
$host localhost
,我得到了
localhost.xxxx.xxx.com的地址是127.0.0.1

localhost:8888运行得非常好,正如我在开始时提到的,它是由MAMP管理的

那么,为什么localhost:8888可以解析,而localhost:9200不能解析

谢谢大家的帮助

{
  "status" : 200,
  "name" : "Human Cannonball",
  "cluster_name" : "elasticsearch_jay",
  "version" : {