ввод-вывод.netty.util.ResourceLeakDetector.addExclusions(Лява/язык /класс;[Лява/язык/Строка;)V

#spring-boot #elasticsearch #java-8 #spring-data-elasticsearch #elasticsearch-plugin

#весенняя загрузка #эластичный поиск #java-8 #spring-данные-эластичный поиск #elasticsearch-плагин

Вопрос:

Я получаю сообщение об ошибке, когда пытаюсь интегрировать данные Spring с эластичным поиском

 2020-09-09 16:14:42 - Adding transport node : 127.0.0.1:9300
2020-09-09 16:14:47 - fatal error on the network layer
    at org.elasticsearch.transport.netty4.Netty4Utils.maybeDie(Netty4Utils.java:184)
    at org.elasticsearch.transport.netty4.Netty4Transport.initiateChannel(Netty4Transport.java:247)
    at org.elasticsearch.transport.netty4.Netty4Transport.initiateChannel(Netty4Transport.java:82)
    at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:604)
    at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:122)
  

и еще одна ошибка, подобная этой

 Exception in thread "Thread-7" java.lang.NoSuchMethodError: io.netty.util.ResourceLeakDetector.addExclusions(Ljava/lang/Class;[Ljava/lang/String;)V
    at io.netty.buffer.AbstractByteBufAllocator.<clinit>(AbstractByteBufAllocator.java:34)
    at io.netty.buffer.ByteBufUtil.<clinit>(ByteBufUtil.java:79)
    at io.netty.buffer.ByteBufAllocator.<clinit>(ByteBufAllocator.java:24)
    at io.netty.channel.DefaultChannelConfig.<init>(DefaultChannelConfig.java:56)
    at io.netty.channel.DefaultChannelConfig.<init>(DefaultChannelConfig.java:69)
    at io.netty.channel.socket.DefaultSocketChannelConfig.<init>(DefaultSocketChannelConfig.java:46)
    at io.netty.channel.socket.nio.NioSocketChannel$NioSocketChannelConfig.<init>(NioSocketChannel.java:457)
    at io.netty.channel.socket.nio.NioSocketChannel$NioSocketChannelConfig.<init>(NioSocketChannel.java:455)
    at io.netty.channel.socket.nio.NioSocketChannel.<init>(NioSocketChannel.java:101)
    at io.netty.channel.socket.nio.NioSocketChannel.<init>(NioSocketChannel.java:90)
    at io.netty.channel.socket.nio.NioSocketChannel.<init>(NioSocketChannel.java:83)
    at io.netty.channel.socket.nio.NioSocketChannel.<init>(NioSocketChannel.java:76)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at io.netty.channel.ReflectiveChannelFactory.newChannel(ReflectiveChannelFactory.java:38)
    at io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:320)
    at io.netty.bootstrap.Bootstrap.doResolveAndConnect(Bootstrap.java:163)
    at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:145)
  

моя зависимость от pom выглядит примерно так

 <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
            <version>2.1.15.RELEASE</version>
        </dependency>
  

и файлы свойств, подобные этому

 spring.data.elasticsearch.cluster-name=my-application
spring.data.elasticsearch.cluster-nodes=localhost:9300
spring.data.elasticsearch.repositories.enabled=true
api.elasticsearch.uri = http://localhost:9200/
api.elasticsearch.search = /_search
  

Комментарии:

1. какую версию Spring Boot вы используете? 2.1.15 также? Настроены ли у вас другие версии Spring Data Elasticsearch или библиотек Elasticsearch? Какая версия кластера Elasticsearch?

2. Нет версии spring boor 2.1.12, даже если я меняю версию elastic search на 2.1.12, она не работает