Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cassandra exporter (0.9.12) gives warning IllegalArgumentException: 'xxx.xxx.xxx.xxx_7001' is not an IP string literal message for cassandra 4.1 #112

Open
rajesh-sapkale opened this issue May 29, 2023 · 8 comments

Comments

@rajesh-sapkale
Copy link

rajesh-sapkale commented May 29, 2023

Getting below error for cassandra exporter (0.9.12) with Cassandra 4.1. I am using cassandra-exporter in agent mode

WARN [cassandra-exporter-harvester-defer-0] 2023-05-29 11:40:46,959 Harvester.java:191 - Failed to register collector for MBean org.apache.cassandra.metrics:type=Connec tion,scope=xxx.xxx.xxx.xxx_7001,name=GossipMessageDroppedTasks. java.lang.IllegalArgumentException: '139.144.217.245_7001' is not an IP string literal. at com.google.common.net.InetAddresses.formatIllegalArgumentException(InetAddresses.java:987) at com.google.common.net.InetAddresses.forString(InetAddresses.java:143) at com.zegelin.cassandra.exporter.MetadataFactory.endpointLabels(MetadataFactory.java:71) at com.zegelin.cassandra.exporter.FactoriesSupplier.lambda$connectionMetric$17(FactoriesSupplier.java:474) at com.zegelin.cassandra.exporter.FactoriesSupplier$FactoryBuilder.lambda$withLabelMaker$0(FactoriesSupplier.java:73) at com.zegelin.cassandra.exporter.FactoriesSupplier$FactoryBuilder.lambda$build$1(FactoriesSupplier.java:99) at com.zegelin.cassandra.exporter.Harvester.lambda$registerMBean$0(Harvester.java:174) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)

@rajesh-sapkale rajesh-sapkale changed the title cassandra exporter (0.9.12) give warn IllegalArgumentException: 'xxx.xxx.xxx.xxx_7001' is not an IP string literal message cassandra 4.1 cassandra exporter (0.9.12) gives warning IllegalArgumentException: 'xxx.xxx.xxx.xxx_7001' is not an IP string literal message for cassandra 4.1 May 29, 2023
@n1nj444
Copy link

n1nj444 commented Jun 26, 2023

Hi !

BUMP, i got the same issue with cassandra 4.0.10 :

WARN [cassandra-exporter-harvester-defer-0] 2023-06-26 15:52:06,520 Harvester.java:191 - Failed to register collector for MBean org.apache.cassandra.metrics:type=Connection,scope=7000,name=GossipMessageDroppedTasks.
at com.zegelin.cassandra.exporter.MetadataFactory.endpointLabels(MetadataFactory.java:71)
at com.zegelin.cassandra.exporter.FactoriesSupplier.lambda$connectionMetric$17(FactoriesSupplier.java:474)
at com.zegelin.cassandra.exporter.FactoriesSupplier$FactoryBuilder.lambda$withLabelMaker$0(FactoriesSupplier.java:73)
at com.zegelin.cassandra.exporter.FactoriesSupplier$FactoryBuilder.lambda$build$1(FactoriesSupplier.java:99)
at com.zegelin.cassandra.exporter.Harvester.lambda$registerMBean$0(Harvester.java:174)
at com.zegelin.cassandra.exporter.InternalMetadataFactory.localBroadcastAddress(InternalMetadataFactory.java:91)
at com.zegelin.cassandra.exporter.Harvester.globalLabels(Harvester.java:283)
at com.zegelin.cassandra.exporter.netty.HttpHandler.sendMetrics(HttpHandler.java:292)
at com.zegelin.cassandra.exporter.netty.HttpHandler.channelRead0(HttpHandler.java:94)
at com.zegelin.cassandra.exporter.netty.HttpHandler.channelRead0(HttpHandler.java:39)
at com.zegelin.cassandra.exporter.InternalMetadataFactory.localBroadcastAddress(InternalMetadataFactory.java:91)
at com.zegelin.cassandra.exporter.Harvester.globalLabels(Harvester.java:283)
at com.zegelin.cassandra.exporter.netty.HttpHandler.sendMetrics(HttpHandler.java:292)
at com.zegelin.cassandra.exporter.netty.HttpHandler.channelRead0(HttpHandler.java:94)
at com.zegelin.cassandra.exporter.netty.HttpHandler.channelRead0(HttpHandler.java:39)
at com.zegelin.cassandra.exporter.InternalMetadataFactory.localBroadcastAddress(InternalMetadataFactory.java:91)
at com.zegelin.cassandra.exporter.Harvester.globalLabels(Harvester.java:283)
at com.zegelin.cassandra.exporter.netty.HttpHandler.sendMetrics(HttpHandler.java:292)
at com.zegelin.cassandra.exporter.netty.HttpHandler.channelRead0(HttpHandler.java:94)
at com.zegelin.cassandra.exporter.netty.HttpHandler.channelRead0(HttpHandler.java:39)
at com.zegelin.cassandra.exporter.InternalMetadataFactory.localBroadcastAddress(InternalMetadataFactory.java:91)
at com.zegelin.cassandra.exporter.Harvester.globalLabels(Harvester.java:283)
at com.zegelin.cassandra.exporter.netty.HttpHandler.sendMetrics(HttpHandler.java:292)
at com.zegelin.cassandra.exporter.netty.HttpHandler.channelRead0(HttpHandler.java:94)
at com.zegelin.cassandra.exporter.netty.HttpHandler.channelRead0(HttpHandler.java:39)

@icroitoru
Copy link

icroitoru commented Jun 26, 2023

hi,
does anyone have any idea if we can workaround this issue or we have to wait for the fix?
We are facing same issue after upgrading to cassandra ver. 4.0.1.
[cassandra-exporter-harvester-defer-0] WARN com.zegelin.cassandra.exporter.Harvester - Failed to register collector for MBean org.apache.cassandra.metrics:type=Connection,scope=xxx.xxx.xxx.xxx_7000,name=Timeouts. java.lang.IllegalArgumentException: 'xxx.xxx.xxx.xxx_7000' is not an IP string literal. at com.google.common.net.InetAddresses.forString(InetAddresses.java:153) at com.zegelin.cassandra.exporter.MetadataFactory.endpointLabels(MetadataFactory.java:71) at com.zegelin.cassandra.exporter.FactoriesSupplier.lambda$connectionMetric$17(FactoriesSupplier.java:474) at com.zegelin.cassandra.exporter.FactoriesSupplier$FactoryBuilder.lambda$withLabelMaker$0(FactoriesSupplier.java:73) at com.zegelin.cassandra.exporter.FactoriesSupplier$FactoryBuilder.lambda$build$1(FactoriesSupplier.java:99) at com.zegelin.cassandra.exporter.Harvester.lambda$registerMBean$0(Harvester.java:174) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750)

The name might be different -> name=Timeouts | LargeMessageCompletedTasks | GossipMessageDroppedTasks | SmallMessagePendingTasks ...

@Tigraine
Copy link

Same issue here - tried it on Cassandra 4.1.3:

WARN  [cassandra-exporter-harvester-defer-0] 2023-07-31 14:10:36,620 Harvester.java:191 - Failed to register collector for MBean org.apache.cassandra.metrics:type=Connection,scope=10.132.0.58_7000,name=GossipMessageCompletedTasks.
java.lang.IllegalArgumentException: '10.132.0.58_7000' is not an IP string literal.
        at com.google.common.net.InetAddresses.formatIllegalArgumentException(InetAddresses.java:987)
        at com.google.common.net.InetAddresses.forString(InetAddresses.java:143)
        at com.zegelin.cassandra.exporter.MetadataFactory.endpointLabels(MetadataFactory.java:71)
        at com.zegelin.cassandra.exporter.FactoriesSupplier.lambda$connectionMetric$17(FactoriesSupplier.java:474)
        at com.zegelin.cassandra.exporter.FactoriesSupplier$FactoryBuilder.lambda$withLabelMaker$0(FactoriesSupplier.java:73)
        at com.zegelin.cassandra.exporter.FactoriesSupplier$FactoryBuilder.lambda$build$1(FactoriesSupplier.java:99)
        at com.zegelin.cassandra.exporter.Harvester.lambda$registerMBean$0(Harvester.java:174)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

@isaiasanchez
Copy link

isaiasanchez commented Sep 14, 2023

After this WARN the exporter stops giving results, at lease un my case:
curl http://localhost:9500/metrics
curl: (18) transfer closed with outstanding read data remaining

@sonman
Copy link

sonman commented Sep 20, 2023

The stop is related to #83 I guess.

sonman added a commit to sonman/cassandra-exporter that referenced this issue Sep 20, 2023
sonman added a commit to sonman/cassandra-exporter that referenced this issue Sep 20, 2023
sonman pushed a commit to sonman/cassandra-exporter that referenced this issue Sep 21, 2023
@itskarlsson
Copy link

itskarlsson commented Sep 22, 2023

@sonman You are on the right track, although you could condense the patch to something like this.

This way only connection mbeans are affected. Although this will mean that one loses statistics if two nodes are connecting from different ports but the same IP. Which I suspect was the whole idea with including the ports to begin with on the Cassandra side. A small price to pay though as having two Cassandras on the same node doesn't seem like a common use case in production systems.

@julienlau
Copy link

when I try to compile the master branch I hit an error ! #117

@julienlau
Copy link

julienlau commented Nov 21, 2023

I tried to switch to the standalone to avoid this not an IP string literal error mode but I got another error:
WARN [cassandra-exporter-harvester-defer-0] 2023-11-21 13:51:04,746 Harvester.java:191 - Failed to register collector for MBean org.apache.cassandra.metrics:type=Connection,scope=10.1.1.1_7000,name=GossipMessageCompletedTasks.

I finally rolled back to using the old cassandra_exporter from criteo : it stills work with 4.1.3 despite not being actively maintained

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants