问题背景:
将es部署到内网中两台服务器,其Ip地址分别为:192.111.222.5,192.111.222.1(部署方式完全一样,是将192.111.222.1服务器上es整个部署包,拷贝到了192.111.222.5,包括索引文件)。
在开发本机(IP:192.111.222.36)通过idea编译直接运行代码,从而连接对应es的服务器,连接192.111.222.1就没有任何问题,但连接192.111.222.5,就会报出异常,具体异常信息如下:

1
2
3
4
5
6
7
8
9
10
NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{192.111.222.5}{192.111.222.5:9300}]]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:290)
    at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:207)
    at org.elasticsearch.client.transport.support.TransportProxyClient.execute(TransportProxyClient.java:55)
    at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:286)
    at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:351)
    at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1187)
    at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)
    at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)
    at org.elasticsearch.action.ActionRequestBuilder.get(ActionRequestBuilder.java:67)

解决办法:将192.111.222.5服务器上配置文件elasticsearch.yml,具体位置如下

修改配置文件中的network.host项,将network.host: 0.0.0.0修改为本机ipnetwork.host: 192.111.222.5,搞定。
具体如下:

但有个问题就是192.111.222.1配置文件中的network.host项一直为network.host: 0.0.0.0,但可以正常访问啊,为什么192.111.222.5就需要修改为本机ip了?暂时没有搞清楚,希望有知道的朋友,留个言,帮我解一下惑。

转自:https://www.2cto.com/kf/201611/571168.html

(转)Elasticsearch NoNodeAvailableException None of the configured nodes are available的更多相关文章

  1. ElasticSearch java客户端更新时出现的错误:NoNodeAvailableException[None of the configured nodes are available

    下午尝试 用ElasticSearch  的java客户端去做数据检索工作,测试了一下批量更新,代码如下: public static void bulkUpdateGoods(List<Goo ...

  2. 解决Spring Boot(2.1.3.RELEASE)整合spring-data-elasticsearch3.1.5.RELEASE报NoNodeAvailableException[None of the configured nodes are available

    Spring Boot(2.1.3.RELEASE)整合spring-data-elasticsearch3.1.5.RELEASE报NoNodeAvailableException[None of ...

  3. 解决ES报错NoNodeAvailableException[None of the configured nodes are available:问题

    elasticSearch的错误 NoNodeAvailableException[None of the configured nodes are available: [{#transport#- ...

  4. NoNodeAvailableException[None of the configured nodes are available:[.127.0.0.1}{127.0.0.1:9300]

    我在springboot 集成 elasticsearch,启动springboot测试创建索引,建立索引的时候报 : NoNodeAvailableException[None of the con ...

  5. NoNodeAvailableException[None of the configured nodes are available:

    elasticSearch的错误 NoNodeAvailableException[None of the configured nodes are available: [{#transport#- ...

  6. Exception in thread "main" NoNodeAvailableException[None of the configured nodes are available

    连接elasticsearch已经成功,但是会报以下错误,字面意思是节点不可用这样 Exception in thread "main" NoNodeAvailableExcept ...

  7. Elasticsearch使用java读取数据报错NoNodeAvailableException: None of the configured nodes are available: [127.0.0.1:9300]

    对于这个问题,大部分人出现在这个地方: Client client = new TransportClient(settings).addTransportAddress(new InetSocket ...

  8. elasticsearch 使用tcp 访问NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{Yk0WjtKbQXqYCJSDFRYlRA}

    默认的 elasticsearch.yml 端口是9200,是给tcp提供的.如果想使用 自带的  TransportClient 需要配置为 tcp 的9300端口.配置方式为: 在/config/ ...

  9. Elasticsearch 9300无法访问,客户端出现NoNodeAvailableException[None of the configured nodes are available:  [{#transport#‐1}{exvgJLR‐RlCNMJy‐hzKtnA}

    1.  进入容器 docker exec ‐it ID /bin/bash 2. 拷贝配置文件到宿主机 docker cp  ID:/usr/share/elasticsearch/config/el ...

随机推荐

  1. Ubuntu12.04 15.04禁止移动介质自动播放

    网上有有很多关于Ubuntu10.04关闭移动介质自动播放的方法,包括在文件管理器里面设置或者使用gconf-editor,但是从12.04开始这两种方法都不再好用了,关于移动介质的处理方法被移到了S ...

  2. 《转》Python学习(19)-python函数(二)-关于lambda

    转自http://www.cnblogs.com/BeginMan/p/3178103.html 一.lambda函数 1.lambda函数基础: lambda函数也叫匿名函数,即,函数没有具体的名称 ...

  3. JS基础---->javascript的基础(二)

    记载javascript的一些基础的知识.我们在春风秋雨中无话不说,又在春去秋来中失去了联系. js中string类型 一.字符方法:charAt() 和 charCodeAt() var strin ...

  4. 题目1453:Greedy Tino(dp题目)

    题目链接:http://ac.jobdu.com/problem.php?pid=1453 详解链接:https://github.com/zpfbuaa/JobduInCPlusPlus 参考代码: ...

  5. [Noi2016]区间[离散化+线段树维护+决策单调性]

    4653: [Noi2016]区间 Time Limit: 60 Sec  Memory Limit: 256 MBSubmit: 621  Solved: 329[Submit][Status][D ...

  6. calloc(), malloc(), realloc(), free(),alloca()

    内存区域可以分为栈.堆.静态存储区和常量存储区,局部变量,函数形参,临时变量都是在栈上获得内存的,它们获取的方式都是由编译器自动执行的. 利用指针,我们可以像汇编语言一样处理内存地址,C 标准函数库提 ...

  7. Python 多进程应用示例

    import multiprocessing import time def func(name): outputline=name for i in range(3): outputline+= & ...

  8. 神奇的thrust::device_vector与nvcc编译选项

    在C++的GPU库thrust中,有两种vector thrust::device_vector<int> D; //GPU使用的内存中的向量 thrust::host_vector< ...

  9. UPUPW本地环境配置thinkphp5的问题

    问题解决参考: https://blog.csdn.net/lengyue1084/article/details/80001625 看httpd-vhosts.conf的配置: <Virtua ...

  10. Spark2 文件处理和jar包执行

    上传数据文件 mkdir -p data/ml/ hadoop fs -mkdir -p /datafile/wangxiao/ hadoop fs -ls / hadoop fs -put /hom ...