Hi,
We have a Java application that connects to elasticSearch 2.4 (standalone) via Spring Data and Spring Boot (1.4.0). The connection settings are:
spring.data.elasticsearch.cluster-name=
spring.data.elasticsearch.cluster-nodes=127.0.0.1:9300
Everything worked fine before installing Shield.
I installed Shield on my DEV (windows) box, The GET _shield shows status as enabled. Added more settings as below,
spring.data.elasticsearch.properties.shield.user=:
spring.data.elasticsearch.clientPingTimeout=30s
spring.data.elasticsearch.clientNodesSamplerInterval=30s
spring.data.elasticsearch.properties.request.headers.X-Found-Cluster=s
spring.data.elasticsearch.properties.shield.transport.ssl=false
however, the application failed to start due to error: SEVERE: failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{127.0.0.1}{127.0.0.1:9300}]
Does anyone have any suggestions?
Thanks in advance.
Error message:
Jan 16, 2017 5:53:35 PM org.springframework.data.elasticsearch.client.TransportClientFactoryBean buildClient
INFO: adding transport node : localhost:9300
Jan 16, 2017 5:56:52 PM org.springframework.data.elasticsearch.repository.support.AbstractElasticsearchRepository
SEVERE: failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{127.0.0.1}{127.0.0.1:9300}]
I debugged into TransportClientFactoryBean buildClient(), the value for "shield.user" was passed in.
I suspect because the buildClient method does not have .addPlugin(ShieldPlugin.class), hence the shield user credentials were NOT passed to ES.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.