I'm creating an application using Spring Boot and also Elastic-Search. Spring application part is working. And also when I start Elastic server, it's also running well. No issues at all. I can test it via POSTMAN and also CURL. Adding and also searching works well.
But when I run the application, i'm getting following issues. This is the issue i'm getting in the IDE. (which means from my java application)
org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{127.0.0.1}{127.0.0.1:9300}]
And this is the issue i'm getting from the Elasctic server on my local system.
java.lang.IllegalStateException: Received message from unsupported version: [2.0.0] minimal compatible version is: [5.0.0]
These are the libraries I'm using.
- Spring Boot 1.5.1.RELEASE
- Spring Boot Starter Data Elasticsearch 1.5.1.RELEASE
- Spring Data Elasticsearch 2.10.RELEASE
- Elastic Search 5.0
I think this is a issue with Elastic and above library version mismatch. I'm new to Elastic and also Spring. The version issue is here. https://github.com/spring-projects/spring-data-elasticsearch/wiki/Spring-Data-Elasticsearch---Spring-Boot---version-matrix
And also here is my pom.xml. If I need to update any library, can anyone tell me what's that ? And also tell me how to update those libraries ? Can I update them without changing to my source code ?
<?xml version="1.0" encoding="UTF-8"?>
http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0
<artifactId>springboot-springdata-elasticsearch-example</artifactId>
<packaging>jar</packaging>
<url>https://www.mkyong.com</url>
<version>1.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.1.RELEASE</version>
</parent>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Runtime, for Embedded Elasticsearch,
comment this if connect to external elastic search server-->
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Package as an executable jar/war -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
In this pom.xml , I can't find all the dependencies too.