Can not connect to standalone node using TransportClient with es 5.5

Using elasticsearch 5.5.2, I can not connect using the TransportClient. The elasticsearch instance is standalone (My node with 5 indexes look fine using head and Kibana). I have

transport.type:local, node.master:true, node.data:true, node.name:myCluster

set in the elasticsearch.yml.

In my Settings, I set my cluster.name and node.name. When I call client

PreBuilTransportClient(settings).addTransportClient(newSocketTransportAddress(InetAddress.getByName(myhost),9300))

I get no errors, when I print out

client.nodeName()

that is correct, but

client.connectedNodes().toString()

is empty. The Exception I am getting is

None of the configured nodes are available: [{transport#-1}{Dlw-DO6RJ-6zuwl2x_xUw}{myhost}{ipaddress:9300}]
Can someone help?

I believe your node is only listening on 127.0.0.1 as you did not set network.host right?

I tried setting each of the following to network.host

machine fqdn - ES wouldn't start BindException cannot assign requested addess
internal ip - Es wouldn't start BindException cannot assign requested address
external ip - ES starts, but head shows no cluster connected
hostname - ES starts, but head shows no cluster connected
localhost - ES starts and looks fine in head, but when trying to connect using TransportClient:
None of the configured nodes are available: [{transport#-1}{Dlw-DO6RJ-6zuwl2x_xUw}{myhost}{internalipaddress:9300}]

Is something configured wrong on our system?

I also changed my call to

PreBuilTransportClient(settings).addTransportClient(newSocketTransportAddress(InetAddress.getByName(myhost),9300)) to

PreBuilTransportClient(settings).addTransportClient(newSocketTransportAddress(InetAddress.getLocalHost(),9300))

Blockquote

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