Spring boot整合出现问题

来源:-

msidolphin

2018-04-20 01:46

Caused by: java.lang.IllegalStateException: availableProcessors is already set to [4], rejecting [4]

at io.netty.util.NettyRuntime$AvailableProcessorsHolder.setAvailableProcessors(NettyRuntime.java:51)

at io.netty.util.NettyRuntime.setAvailableProcessors(NettyRuntime.java:87)

at org.elasticsearch.transport.netty4.Netty4Utils.setAvailableProcessors(Netty4Utils.java:85)

at org.elasticsearch.transport.netty4.Netty4Transport.<init>(Netty4Transport.java:140)

at org.elasticsearch.transport.Netty4Plugin.lambda$getTransports$0(Netty4Plugin.java:93)

at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:177)

at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:268)

at org.elasticsearch.transport.client.PreBuiltTransportClient.<init>(PreBuiltTransportClient.java:133)

at org.elasticsearch.transport.client.PreBuiltTransportClient.<init>(PreBuiltTransportClient.java:119)

at org.elasticsearch.transport.client.PreBuiltTransportClient.<init>(PreBuiltTransportClient.java:109)

at org.springframework.data.elasticsearch.client.TransportClientFactoryBean.buildClient(TransportClientFactoryBean.java:91)

at org.springframework.data.elasticsearch.client.TransportClientFactoryBean.afterPropertiesSet(TransportClientFactoryBean.java:86)

at org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration.elasticsearchClient(ElasticsearchAutoConfiguration.java:59)

at org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration$$EnhancerBySpringCGLIB$$2d8ff2e0.CGLIB$elasticsearchClient$0(<generated>)

at org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration$$EnhancerBySpringCGLIB$$2d8ff2e0$$FastClassBySpringCGLIB$$81a62f3d.invoke(<generated>)

at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)

at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)

at org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration$$EnhancerBySpringCGLIB$$2d8ff2e0.elasticsearchClient(<generated>)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)

... 24 common frames omitted

https://img2.mukewang.com/5ad8d5ee0001b75106650096.jpg


写回答 关注

2回答

  • jishaochen_
    2018-05-03 11:26:14

    遇到了相同问题,版本都一模一样,请问是否解决!

    msidol...

    参考下https://github.com/netty/netty/issues/6956。但是貌似和redis有关,我使用配置类来配置redis就可以了 https://github.com/msidolphin/mblog/blob/master/src/main/java/pers/msidolphin/mblog/config/RedisConfig.java

    2018-05-04 23:00:18

    共 1 条回复 >

  • msidolphin
    2018-04-20 01:53:43

    es版本是5.6.8,spring boot 2.0

ElasticSearch入门

ElasticSearch轻松入门,Spring Boot集成ES

67742 学习 · 302 问题

查看课程

相似问题