Connection Error from Java client


  • Ubuntu host running ES 5.3.2 in docker container. Ports 9200 and 9300 exposed.
  • using Spring Boot Data (Java) as the client, running on the Ubuntu host
  • from host, telnet to port 9200 works fine
  • from host, curl to works fine

When the Java client tries to connect, I get the following error:

org.elasticsearch.transport.netty : [Patriot II] connected to node [{#transport#-1}{}{}]
org.elasticsearch.transport.netty : [Patriot II] disconnecting from [{#transport#-1}{}{}], ClosedChannelException[null]
org.elasticsearch.client.transport : [Patriot II] failed to get node info for {#transport#-1}{}{}, disconnecting...
.d.e.r.s.AbstractElasticsearchRepository : failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{}{}]

My client settings:

client.transport.sniff = false
client.type = transport = docker-cluster
name = Patriot II
network.server = false
node.client = true
transport.ping_schedule = 5s

When I curl the ES container's health, it reports

1497121581 19:06:21 docker-cluster yellow 1 1 2 2 0 0 2 0 - 50.0%

When I look at the ES log within the container, there are two lines that catch my eye:

Failed to find a usable hardware address from the network interfaces; using random bytes: b3:5d:58:99:29:27:04:6a
Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[.monitoring-es-2-2017.06.10][0]] ...])

Note that I already ran sysctl -w vm.max_map_count=262144 on the host.

My Java code looks like this:

    Settings esSettings = Settings.settingsBuilder()
            .put("", EsClusterName)
            .put("client.transport.sniff", false)
            .put("node.client", true)
    return TransportClient.builder()
            .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(EsHost), EsPort));

Any ideas? I'm out of ideas ...

  • Joe

May be you are using an old client version ?

Have a look at

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.