Java Client: failing to connect remotely

(Mark Kuryan) #1

I have a working Python script using Python ES plugin which connects to ES index located on the remote server, connection part of it looks like this:

es = Elasticsearch([{

Connection specifications are listed [here][1]

However, I am failing to implement this in Java.

So far I tried:

client = new TransportClient()
                    .addTransportAddress(new InetSocketTransportAddress("", 9300));

other URLs I tried:

and with port 80

all result in java.nio.channels.UnresolvedAddressException

(eliasah) #2

The error you have received is raised when an attempt is made to invoke a network operation upon an unresolved socket address. Which means that the address you are giving is not correct.

Is the following address your cluster address?

(Mark Kuryan) #3

Well the question can be closed - I just learned that the owner of the service only allows connections through http, which he secured, because otherwise he can't control who is connected, and Java client doesn't have an option connecting through http and uses a different protocol, so it cannot be used...

(eliasah) #4

Well, if you don't have access, no matter what the options the Java provides, you'll not be able to access.

(system) #5