为了账号安全,请及时绑定邮箱和手机立即绑定

Spring boot整合出现问题

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://img1.sycdn.imooc.com//5ad8d5ee0001b75106650096.jpg


正在回答

2 回答

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

0 回复 有任何疑惑可以回复我~
#1

msidolphin 提问者

参考下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 回复 有任何疑惑可以回复我~

es版本是5.6.8,spring boot 2.0

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

Spring boot整合出现问题

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信