如何从Linux Guest(Virtualbox)到OSX主机访问弹性搜索? [英] How to access elasticsearch from Linux Guest (Virtualbox) to OSX Host?

查看:126
本文介绍了如何从Linux Guest(Virtualbox)到OSX主机访问弹性搜索?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如问题所在,如果我在虚拟机中有一个linux / centos虚拟机,我该如何去:



10.0.0.1:9200来访问elasticsearch?



在客人端,我收到一个连接超时错误。
从我的OSX主机,我可以看到弹性搜索正在运行localhost:9200。我可以告诉Apache可以从Linux客户端访问,因为10.0.0.1显示apache网页罚款。在我的OSX配置中,我启用了Web共享,这就是为什么我认为访客能够访问端口80,但是如何使用弹性搜索?




  1. sudo ipfw add 7000允许tcp从任何到任何dat-port 9200

注销,登录。在客人CentOS VM中仍然收到连接已超时。


  1. 将/ usr / local / Cellar / elasticsearch / bin / elasticsearch拖动到
    系统偏好设置 - >安全 - >防火墙

在CentOS VM中仍然得到一个连接超时。



这感觉就像这样很简单请注意,弹性搜索与自制软件一起安装。

解决方案

您可能没有端口9200在某处线。如果您的OSX主机与您的Linux客户机在同一个网络上,那么它可能是防火墙。您可以通过转到系统偏好设置>来更改OSX主机上的防火墙设置。安全>防火墙



如果计算机之间有网络设备(根据我不相信的IP地址),您还需要打开那里的端口。 >

如果您需要打开的端口不使用它.app应用程序,您将需要使用控制台手动添加它。执行此操作的命令是 sudo ipfw add 7000允许tcp从任何到任何dat-port 9200 7000 是规则号,而 9200 是端口。



此外,这不是这样的问题的正确网站,最好的地方是问问不同堆栈交换站点的mac问题。


As the question states, if I have a linux/centos VM in virtualbox, how do I go to:

10.0.0.1:9200 to access elasticsearch?

On the guest, I am getting a "Connection timed out error". From my OSX host, I can see elasticsearch is running with "localhost:9200". I can tell Apache is accessible from the Linux guest because 10.0.0.1 shows the apache webpage fine. In my OSX configuration, I have "Web Sharing" enabled, which is why I assume that the guest is able to access port 80, but what about elasticsearch?

I tried:

  1. sudo ipfw add 7000 allow tcp from any to any dat-port 9200

Logged out, the logged back in. Still getting a "The connection has timed out" in guest CentOS VM.

  1. Drag the /usr/local/Cellar/elasticsearch/bin/elasticsearch into the "System Preferences" -> "Security" -> "Firewall"

Still getting a "The connection has timed out" in CentOS VM.

This feel like it should be something very simple.... note that elasticsearch was installed with homebrew.

解决方案

You probably don't have the port 9200 open somewhere along the line. If your OSX Host is on the same network as your linux guest, then it is probably the firewall. You can change firewall settings on the OSX host by going to System Preferences > Security > Firewall.

If there is networking equipment between the computers (Based on the IP address I do not believe there is) you also need to open the port there as well.

If the port you need to open is not used it a .app application you will need to add it manually using the console. The command to do this is sudo ipfw add 7000 allow tcp from any to any dat-port 9200. 7000 is the rule number, and 9200 is the port.

Additionally this is not the correct site for questions like this, the best place would be Ask Different the stack exchange site for mac questions.

这篇关于如何从Linux Guest(Virtualbox)到OSX主机访问弹性搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆