jmx_exporter icon indicating copy to clipboard operation
jmx_exporter copied to clipboard

Is IPV6 supported?. In kubernetes seems to not be supported.

Open mtenrero opened this issue 3 years ago • 1 comments

This issue come from this one in kafka-exporter: https://github.com/bitnami/charts/issues/5447

It seems in a pure IPV6 cluster, jmx_exporter is not supported at all, or I think so, I just want to confirm it.

This is the tracelog from jmx_container:

SEVERE: JMX scrape failed: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:343)
at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:116)
at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:132)
... 23 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:607)
at java.net.Socket.connect(Socket.java:556)
at java.net.Socket.<init>(Socket.java:452)
at java.net.Socket.<init>(Socket.java:229)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:148)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:617)

And this one the received by kafka:

[2021-02-10 14:22:32,000] WARN [SocketServer brokerId=1002] Unexpected error from /0:0:0:0:0:0:0:1; closing connection (org.apache.kafka.common.network.Selector)
org.apache.kafka.common.network.InvalidReceiveException: Invalid receive (size = 1195725856 larger than 104857600)
at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:105)
at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:447)
at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:397)
at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:674)
at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:576)
at org.apache.kafka.common.network.Selector.poll(Selector.java:481)
at kafka.network.Processor.poll(SocketServer.scala:923)
at kafka.network.Processor.run(SocketServer.scala:826)
at java.base/java.lang.Thread.run(Thread.java:834)

Can anyone confirm that IPV6 is fully supported in Jmx_exporter for communicating only with this IP protocol? (only IPV6 not IPV4/IP6 mixed)

mtenrero avatar Apr 05 '21 06:04 mtenrero

In general I think IPv6 should work. In the Exception above I see

Connection refused to host: 127.0.0.1

Is there a configuration issue where jmx_exporter tries to connect to the IPv4 address, but the JMX service is only bound to the IPv6 address?

fstab avatar Apr 05 '21 14:04 fstab

@mtenrero IPv6 should be supported. There is no specific code (outside of configuration) that would cause this issue.

Have you resolved this issue?

If there are no updates within 1 week, this will be closed as inactive.

dhoard avatar Apr 14 '23 12:04 dhoard