Elasticsearch 5.4.1 - availableProcessors is already set

Hi,

I have upgraded elasticsearch from 5.4.0 to 5.4.1 and I have got this error:

java.lang.IllegalStateException: availableProcessors is already set to [8], rejecting [8]
at io.netty.util.NettyRuntime$AvailableProcessorsHolder.setAvailableProcessors(NettyRuntime.java:51) ~[netty-common-4.1.11.Final.jar:4.1.11.Final]
at io.netty.util.NettyRuntime.setAvailableProcessors(NettyRuntime.java:87) ~[netty-common-4.1.11.Final.jar:4.1.11.Final]
at org.elasticsearch.transport.netty4.Netty4Utils.setAvailableProcessors(Netty4Utils.java:82) ~[transport-netty4-client-5.4.1.jar:5.4.1]
at org.elasticsearch.transport.netty4.Netty4Transport.(Netty4Transport.java:138) ~[transport-netty4-client-5.4.1.jar:5.4.1]
at org.elasticsearch.transport.Netty4Plugin.lambda$getTransports$0(Netty4Plugin.java:93) ~[transport-netty4-client-5.4.1.jar:5.4.1]
java.lang.IllegalStateException: availableProcessors is already set to [8], rejecting [8]
at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:176) ~[elasticsearch-5.4.1.jar:5.4.1]
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:82)
at org.elasticsearch.transport.netty4.Netty4Transport.(Netty4Transport.java:138)
at org.elasticsearch.transport.Netty4Plugin.lambda$getTransports$0(Netty4Plugin.java:93)
at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:176)
at org.elasticsearch.client.transport.TransportClient.(TransportClient.java:268)
at org.elasticsearch.transport.client.PreBuiltTransportClient.(PreBuiltTransportClient.java:127)
at org.elasticsearch.xpack.client.PreBuiltXPackTransportClient.(PreBuiltXPackTransportClient.java:55)
at org.elasticsearch.xpack.client.PreBuiltXPackTransportClient.(PreBuiltXPackTransportClient.java:50)
at org.elasticsearch.xpack.client.PreBuiltXPackTransportClient.(PreBuiltXPackTransportClient.java:46)

It seems that the number of available processors is already configured in that moment.
Is there a fix for this?

Thanks,
Mihai

I can do something like this:

System.setProperty("es.set.netty.runtime.available.processors", "false");

but, for sure, is not the right fix.

1 Like

May be open an issue in that case? @jasontedor WDYT?

Can you explain why it's already configured? Are you using Netty within your application outside of the use within the transport client?

Yes, I'm using Vert.x (a framework based on Netty).

Then you should indeed set es.set.netty.runtime.available.processors.

OK. Thank you!

What I wanted to emphasize was that the error has not been present on previous versions (<= 5.4.0).

I understand that, this feature wasn't available in versions of Netty that Elasticsearch <= 5.4.0 depended on.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.