Elasticsearch IP与实际IP不同

时间:2016-04-12 16:41:03

标签: linux ubuntu elasticsearch

大家好我是ubuntu和elasticsearch的新手。如果我听起来很傻,请饶我。

我正在使用Windows 8.我在我的Oracle虚拟机软件上安装了ubuntu。当我在终端中执行ifconfig时,我得到了以下ip

> 172.16.49.21

我在我的ubuntu操作系统上安装了elasticsearch2.3。我运行命令./elasticsearch来启动elasticsearch服务。在开始时,我可以从终端看到以下消息:

anand@anand-VirtualBox:~/Downloads/elasticsearch-2.3.1/bin$ ./elasticsearch
[2016-04-12 21:14:25,567][INFO ][node                     ] [Fenris Wolf] version[2.3.1], pid[3168], build[bd98092/2016-04-04T12:25:05Z]
[2016-04-12 21:14:25,568][INFO ][node                     ] [Fenris Wolf] initializing ...
[2016-04-12 21:14:26,653][INFO ][plugins                  ] [Fenris Wolf] modules [lang-groovy, reindex, lang-expression], plugins [], sites []
[2016-04-12 21:14:26,691][INFO ][env                      ] [Fenris Wolf] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [86gb], net total_space [95gb], spins? [possibly], types [ext4]
[2016-04-12 21:14:26,692][INFO ][env                      ] [Fenris Wolf] heap size [1007.3mb], compressed ordinary object pointers [true]
[2016-04-12 21:14:26,692][WARN ][env                      ] [Fenris Wolf] max file descriptors [4096] for elasticsearch process likely too low, consider increasing to at least [65536]
[2016-04-12 21:14:29,439][INFO ][node                     ] [Fenris Wolf] initialized
[2016-04-12 21:14:29,439][INFO ][node                     ] [Fenris Wolf] starting ...
[2016-04-12 21:14:29,613][INFO ][transport                ] [Fenris Wolf] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}
[2016-04-12 21:14:29,617][INFO ][discovery                ] [Fenris Wolf] elasticsearch/ltT6fvOEQAWS9NDzZXsNig
[2016-04-12 21:14:32,696][INFO ][cluster.service          ] [Fenris Wolf] new_master {Fenris Wolf}{ltT6fvOEQAWS9NDzZXsNig}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2016-04-12 21:14:32,711][INFO ][http                     ] [Fenris Wolf] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}
[2016-04-12 21:14:32,712][INFO ][node                     ] [Fenris Wolf] started
[2016-04-12 21:14:32,769][INFO ][gateway                  ] [Fenris Wolf] recovered [0] indices into cluster_state

从上面的终端输出中,可以看到正在运行elasticsearch的IP和端口是

> 127.0.0.1:9200

我的问题是

  1. 为什么elasticsearch服务没有在实际的IP 172.16.49.21上运行?
  2. 我将对实际IP 172.16.49.21上运行的服务进行哪些更改?
  3. 如果更改成功完成,我是否可以从我的Windows机器上访问所述IP上的elasticsearch?

1 个答案:

答案 0 :(得分:0)

默认情况下,Elasticsearch绑定到localhost。如果你还需要其他任何东西,你需要按照Elasticsearch手册中的说明进行一些网络配置。你可以是Ubuntu和Elasticsearch的新手,但你应该在发布到这个网站之前做一些功课,问题是就像你的。这是第一次谷歌热播。

是否可以从Windows主机访问VM guest虚拟机与将VM设置为网络的方式有关。我假设你根据你的评论使用vb​​ox。如果您可以访问来宾而不是主机上的Elasticsearch,请确保您的Guest上的网络是Bridged而不是Nat。