I am trying to connect to elastic search 2.1.1 using transport client by setting up Shield SSL. I have succeeded in creating the certificate and the keystore as mentioned in the Shield SSL set up guide using OpenSSL and java keytool. I do not see any certificate/security issues while the server starts.
I am able to connect to elastic search with basic shield authentication, but once I turn on the SSL settings, I am getting NoNodeAvailableException.
Exception in thread "main" NoNodeAvailableException[None of the configured nodes
are available: [{#transport#-1}{127.0.0.1}{localhost/127.0.0.1:9301}]]
Here are my elasticsearch.yml settings
network.host: 127.0.0.1
cluster.name: es_raaj
node.name: wolverine_dev
shield.ssl.keystore.path:C:/elasticsearch-2.1.1/config/shield/wolverine_dev.jks
shield.ssl.keystore.password:
shield.ssl.keystore.key_password:
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["127.0.0.1:9300"]
shield.transport.ssl: true
here is my code
Settings settings = Settings.settingsBuilder()
.put("cluster.name", "es_raaj")
.put("node.name","wolverine_dev")
.put("shield.transport.ssl", true)
.put("shield.user", "romanov:<password>")
.put("shield.ssl.keystore.path", "wolverine_dev.jks")
.put("shield.ssl.keystore.password", "<password>")
//.put("action.bulk.compress", false)
//.put("client.transport.sniff",true)
.build();
client = TransportClient.builder()
.addPlugin(ShieldPlugin.class)
.settings(settings).build()
.addTransportAddress(new
InetSocketTransportAddress(InetAddress.getByName("localhost"), 9300));
I have tried various settings for the transport client which I have commented above
Below is my elasticsearch server start up log, if it helps
[2016-06-10 16:48:30,872][INFO ][node ] [wolverine_dev] version[2.1.1], pid[17568], build[40e2c53/2015-12-15T13:05:55Z]
[2016-06-10 16:48:30,872][INFO ][node ] [wolverine_dev] initializing ...
[2016-06-10 16:48:31,238][INFO ][plugins ] [wolverine_dev] loaded [shield, license], sites []
[2016-06-10 16:48:31,269][INFO ][env ] [wolverine_dev] using [1] data paths, mounts [[OSDisk (C:)]], net usable_space [16gb], net total_space [118.7gb], spins? [unknown], types [N
TFS]
[2016-06-10 16:48:31,571][INFO ][http ] [wolverine_dev] Using [org.elasticsearch.http.netty.NettyHttpServerTransport] as http transport, overridden by [shield]
[2016-06-10 16:48:31,834][INFO ][transport ] [wolverine_dev] Using [org.elasticsearch.shield.transport.ShieldServerTransportService] as transport service, overridden by [shield]
[2016-06-10 16:48:31,835][INFO ][transport ] [wolverine_dev] Using [org.elasticsearch.shield.transport.netty.ShieldNettyTransport] as transport, overridden by [shield]
[2016-06-10 16:48:34,259][INFO ][node ] [wolverine_dev] initialized
[2016-06-10 16:48:34,259][INFO ][node ] [wolverine_dev] starting ...
[2016-06-10 16:48:35,641][INFO ][shield.transport ] [wolverine_dev] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
[2016-06-10 16:48:35,652][INFO ][discovery ] [wolverine_dev] es_raaj/uts9wTn6RRi_XQwdZCoKqQ
[2016-06-10 16:48:39,777][INFO ][cluster.service ] [wolverine_dev] new_master {wolverine_dev}{uts9wTn6RRi_XQwdZCoKqQ}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0]
joins received)
[2016-06-10 16:48:39,922][INFO ][license.plugin.core ] [wolverine_dev] license [048bf56b-6c1a-46fb-8857-2809b00325a1] - valid
[2016-06-10 16:48:39,927][ERROR][license.plugin.core ] [wolverine_dev]
[2016-06-10 16:48:39,981][INFO ][gateway ] [wolverine_dev] recovered [1] indices into cluster_state
[2016-06-10 16:48:40,000][INFO ][http ] [wolverine_dev] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}
[2016-06-10 16:48:40,001][INFO ][node ] [wolverine_dev] started
I have verified the jar versions of elastic search and shield on both my client and server, its 2.1.1
Please help me resolving this issue.