my cluster it's not in the same network, and there is a tunnel between my pc and the server.
i have got this error :
org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available
my cluster it's not in the same network, and there is a tunnel between my pc and the server.
i have got this error :
org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available
If you are using elasticsearch default multicast mechanism to discover nodes in the cluster you must have all cluster nodes located on the same subnet (this is true till version 2.0).
In order to have your node discovering the other nodes in the cluster you may configure [elasticsearch home]/config/elasticsearch.yaml field name: discovery.zen.ping.unicast.hosts as described [here]
(https://www.elastic.co/guide/en/elasticsearch/reference/2.x/modules-network.html):
discovery.zen.ping.unicast.hosts
In order to join a cluster, a node needs to know the hostname or IP address of at least some of the other nodes in the cluster. This >settting provides the initial list of other nodes that this node will try to contact. Accepts IP addresses or hostnames.
Defaults to ["127.0.0.1", "[::1]"].
Hope it helps.
I have tried to recreate your configuration on my environment and managed to work with Elasticsearch (created an index). Here is how it goes:
public class App
{
public static void main( String[] args ) throws Exception
{
Settings settings = ImmutableSettings.settingsBuilder().
put("cluster.name", "my-cluster").build();
TransportClient client = new TransportClient(settings)
.addTransportAddress(
new InetSocketTransportAddress(
"localhost", 9093));
CreateIndexResponse rs = client.admin().indices().create(new CreateIndexRequest("tunnelingindex")).actionGet();
System.out.println(rs.isAcknowledged());
client.close();
}
}
The code creates an index named tunnelingindex
If it still do not work for you, I think that you may have an issue which is not related to tunneling or Elasticsearch.
Hope I have managed to help.