Failed to get node info for {#transport#-1}{52.43.xx.xxx}{52.43.xx.xxx:9243}, disconnecting


(Santosh Kumar) #1

Trying to connect to cloud elastic search, getting below error.
[][generic][T#2]] org.elasticsearch.client.transport : [Jimaine Szardos] failed to get node info for {#transport#-1}{52.43.xx.xxx}{52.43.xx.xxx:9243}, disconnecting...

org.elasticsearch.transport.NodeDisconnectedException: [][52.43.xx.xxx:9243][cluster:monitor/nodes/liveness] disconnected

This is how I'm connecting
@bean
public Client client() throws Exception {

Settings esSettings = Settings.settingsBuilder()
		.put("http.enabled", true)
		.build();

return TransportClient.builder().settings(esSettings).build()
		.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(EsHost), EsPort));

}

Any Help?


(Christian Dahlqvist) #2

Have you looked at the Cloud documentation around the transport client and the version specific examples? Note that the transport protocol uses port 9343, not 9243. There are also some additional settings required, which are outlined in the docs I linked to.


(Santosh Kumar) #3
@Christian_Dahlqvist Thank you for the reply.

I have tried to integrate the same way specified in the documentation, even though I'm the error "ShieldPlugin cannot be resolved to a type" .addPlugin(ShieldPlugin.class).

I tried to include the dependency in the pom.xml.

 <dependency>
            <groupId>org.elasticsearch.plugin</groupId>
            <artifactId>shield</artifactId>
            <version>2.1.0</version>
        </dependency>

Showing error missing artifact org.elasticsearch.plugin:shield:jar:2.1.0.

Do I missing any thing? Please suggest.

(Christian Dahlqvist) #4

It looks like you are looking ate the wrong version. The Shield plugin is for use with Elasticsearch 2.x. Look at the documentation as well as the example for the correct version.


(Santosh Kumar) #5

@Christian_Dahlqvist
I'm trying to connect to elastic search version 2.4.4.

I have cloned the 2.x branch from git and followed the same instructions to run it from my local by provind remote server details, getting below error.

mvn compile exec:java -Dhost=xxxxxxx.us-west-2.aws.found.io -Dshield.user="xxxxxx:xxxxxx"

Failed to execute goal on project found-shield-example: Could not resolve dependencies for project no.found.elasticsearch:found-shield-example:jar:2.1.0-SNAPSHOT: Failed to collect dependencies at org.elasticsearch.plugin:shield:jar:2.1.0: Failed to read artifact descriptor for org.elasticsearch.plugin:shield:jar:2.1.0: Could not transfer artifact org.elasticsearch.plugin:shield:pom:2.1.0 from/to elasticsearch-releases (http://maven.elasticsearch.org/releases): maven.elasticsearch.org: Unknown host maven.elasticsearch.org ->


(Santosh Kumar) #6

@Christian_Dahlqvist

Thanks for your help. Finally i got the solution, it seems like version compatible issue with elastic search


(system) #7

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