cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michał Michalski (JIRA) <>
Subject [jira] [Created] (CASSANDRA-5298) MalformedObjectNameException in ConnectionMetrics for IPv6 nodes because of ":" characters
Date Thu, 28 Feb 2013 10:01:14 GMT
Michał Michalski created CASSANDRA-5298:

             Summary: MalformedObjectNameException in ConnectionMetrics for IPv6 nodes because
of ":" characters
                 Key: CASSANDRA-5298
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 1.2.1
            Reporter: Michał Michalski
            Assignee: Michał Michalski
         Attachments: ipv6-connection-metrics-replaceAll.patch, ipv6-connection-metrics-URLEncoder.patch

After upgrading node to 1.2.1, during C* startup, for all ConnectionMetrics I get exception
like this one:

{noformat} WARN [GossipStage:1] 2013-02-27 12:14:55,431 (line 388) Error
processing org.apache.cassandra.metrics:type=Connection,scope=2001:4c28:20:177:0:1:2:4,name=Timeouts Invalid character ':' in value part of property
	at com.yammer.metrics.reporting.JmxReporter.onMetricAdded(
	at com.yammer.metrics.core.MetricsRegistry.notifyMetricAdded(
	at com.yammer.metrics.core.MetricsRegistry.getOrAdd(
	at com.yammer.metrics.core.MetricsRegistry.newMeter(
	at com.yammer.metrics.Metrics.newMeter(
	at org.apache.cassandra.metrics.ConnectionMetrics.<init>(
	at org.apache.cassandra.gms.GossipDigestSynVerbHandler.doVerb(
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
	at java.util.concurrent.ThreadPoolExecutor$


Looking at ObjectName source code (e.g.
) I can see that ":" is not a valid character, so my idea for solving this problem is to use:

1) URLEncode.encode() - seems to be more "proper" solution, but produces a bit unreadable
metric scrope like: MBean org.apache.cassandra.metrics:type=Connection,scope=2001%3A4c27%3A10%3A167%3A0%3A1%3A2%3A5,name=CommandCompletedTasks

2) <String>.replaceAll() - we can simply replace ":" with "." which wouldn't give us
valid IPv6 address, but will be much more readable. 

Second one seems to be a better choice for me, but I attach two patches.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message