无法远程访问9200端口

2023-12-29

刚刚开始使用elasticsearch 5.4.0,首先我将其安装在Mac(本地)上,然后安装在服务器上。 在 Mac 中,当我在浏览器中运行“http://本地主机:9200 http://localhost:9200'它向我显示输出:

{
  "name" : "Node_1",
  "cluster_name" : "bhujang_bipl",
  "cluster_uuid" : "N75mGOiSQCufpBl_2B7jSg",
  "version" : {
    "number" : "5.4.0",
    "build_hash" : "780f8c4",
    "build_date" : "2017-04-28T17:43:27.229Z",
    "build_snapshot" : false,
    "lucene_version" : "6.5.0"
  },
  "tagline" : "You Know, for Search"
}

这意味着我已连接到9200,即elasticsearch。

但是当我在服务器上运行它时http://192.168.1.126:9200 http://192.168.1.126:9200,然后它没有连接并显示输出为:找不到页面!

我在服务器和客户端上禁用了防火墙,作为我从互联网获得的解决方案,但无法使其正常工作。

我的elasticsearch.yml 文件是

 
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#network.host:192.168.1.126
#
# Set a custom port for HTTP:
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
#The default list of hosts is ["127.0.0.1", "[::1]","103.240.195.45","103.240.195.45"]
#
#discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
#discovery.zen.minimum_master_nodes: 3
#
# For more information, consult the zen discovery module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true

谁能帮助我解决我这边可能犯的最好的错误?


从链接https://github.com/elastic/elasticsearch/issues/19987 https://github.com/elastic/elasticsearch/issues/19987

在 yml 文件中添加这两行

transport.host: localhost
network.host: 192.168.1.126
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无法远程访问9200端口 的相关文章

随机推荐

  • Eclipse Europa 搜索引用功能停止工作

    我正在使用 JDK 1 5 0 12 在 MS Windows 2000 SP4 上使用 Eclipse 版本 3 2 1 Build M20060921 0945 我采用 es AR 语言环境 并用我不喜欢的西班牙语设置所有菜单和上下文
  • 如何从 Maven 3.0 插件获取本地存储库位置?

    如何从 Maven 3 x 插件中获取本地存储库位置 URI 按照中所述使用以太这篇博文 http www sonatype com people 2011 01 how to use aether in maven plugins The
  • 代理后面的 git Push 远程问题

    为了设置上下文 我尝试使用toto https github com cloudhead toto建立我的博客 我做到了 sudo gem install toto 并且宝石安装正确 Successfully installed rdisc
  • Android ADB 连接空主机名

    我使用 ADB over WiFi 连接到 Android 设备 当我打字时 adb connect
  • java.lang.ClassNotFoundException:javax.ws.rs.client.RxInvokerProvider

    我尝试使用 loginServlet 从 jsp 页面登录 它重定向到 servlet 但不进行身份验证并引发错误 这是代码 JSP 文件 div class container div class row div class box di
  • Powershell:如何将结果添加到数组(ForEach-Object -Parallel)

    我知道 用参数 using foo我可以在运行时使用来自不同运行空间的变量ForEach Object Parallel在 Powershell 7 及更高版本中 但是如何将结果添加回变量呢 常用参数 and using 不管用 例如 Al
  • 如何向 pandas 数据框添加额外的行[重复]

    这个问题在这里已经有答案了 如果我有一个空数据框 columns Date Name Action ID df pd DataFrame columns columns 有没有办法向这个新创建的数据框追加新行 目前我必须创建一个字典 填充它
  • 我可以从网格生成点云吗? [关闭]

    Closed 这个问题正在寻求书籍 工具 软件库等的推荐 不满足堆栈溢出指南 help closed questions 目前不接受答案 我正在尝试从网格生成点云数据 例如 Maya 的 obj 文件 但是 我只能在互联网上找到相反的情况
  • 我如何给此列表中的每个人加薪

    需要使用 for each 循环 每个人获得的加薪是 1000 会是这样吗 int raise 1000 for Person i people people add raise i 我正在处理这个 public ArrayList
  • C 中的多字节整数变量[重复]

    这个问题在这里已经有答案了 我想知道如何计算单引号中字符串的整数值 我的示例代码是 include
  • 在Python中,导入类与导入类的模块有什么优缺点?

    我正在为大约 30 名开发人员组成的团队编写一套 Python 编码指南 作为我的文档的基础 到目前为止我已经研究了谷歌Python风格指南 http google styleguide googlecode com和PEP 8 风格指南
  • 我可以将对象保存到 app.config 文件中吗?

    我需要为我的应用程序使用一个配置文件 它将保存每个实体的详细信息列表 例如
  • 检查php会话是否不存在

    我有以下 php 代码 哪个应该检查会话是否不存在 如果不存在 则用户重定向 问题是这个条件始终为真 即使会话确实存在 我的问题是如何修复它 尝试用 SESSION like
  • 隐藏 UITableView 搜索栏

    我有一个 UITableViewController 它以标准方式设置了 UISearchDisplayController 搜索栏位于 tableView 内 我希望搜索栏一开始是隐藏的 真正隐藏 而不仅仅是滚动消失就像在这个解决方案中一
  • 在 Haskell 中过滤斐波那契数列

    我正在尝试过滤包含斐波那契数字的列表 我需要的只是奇数 并且小于或等于N 这是我到目前为止所拥有的 fib n n 0 0 n 1 1 otherwise fib n 1 fib n 2 fibs n a a lt fib x x lt 1
  • NodeJS“readline”模块不输出提示

    使用 NodeJS 我试图制作一个 笔记 管理器只是为了好玩 但是当我尝试使用 readline question 来获取用户关于他们想要做什么的输入 即创建一个新笔记 删除一个笔记 则不会显示提示 关于如何解决这个问题有什么建议吗 项目链
  • 在堆栈上分配大于页面大小的缓冲区会损坏内存吗?

    在Windows中 堆栈的实现方式如下 指定的页面后面是提交的堆栈页面 它的保护标志受到保护 因此 当 thead 引用受保护页面上的地址时 会出现内存错误 这使得内存管理器将受保护页面提交到堆栈并清除该页面的受保护标志 然后保留一个新页面
  • Flask-restful 在同一个类中具有 get/ 和 post 与 json

    如果 api add resource User user 则用户的 get 方法有效 该行未注释 另一个 api add resource 是 反之亦然 使 post 方法起作用 我怎样才能让这两条路径都起作用 from flask im
  • 处理命令行参数时清理控制流 [C#]

    我正在处理一个基于命令行参数执行大量 if else 分支的程序 这是 C 语言 但我确信它也适用于 Java C 等 以下是总体概述 if args Length 0 do something if args Length gt 0 ar
  • 无法远程访问9200端口

    刚刚开始使用elasticsearch 5 4 0 首先我将其安装在Mac 本地 上 然后安装在服务器上 在 Mac 中 当我在浏览器中运行 http 本地主机 9200 http localhost 9200 它向我显示输出 name N