Support Migration Notice: To update migrated JIRA cases click here to open a new case use www.vmware.com/go/sr | vFabric Hyperic 5.7.0 is Now Available

Hyperic HQ

RabbitMQ plugin broken for rabbit version 2.7.1

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 4.6.0.1
  • Fix Version/s: 4.6.5
  • Component/s: Plugins
  • Case Links:
    none
  • HQ Fix Version:
    4.6.5
  • Regression:
    No

Description

Rabbitmq service at URL /api/overview changed "queue_totals" from simple key-value list (string/int) to a complex structure (string/int + string/sublist). It is mapped with google gson library to a hashmap<String,Integer>.

2011-12-21 10:20:02,342 ERROR [pool-4-thread-1] [ScheduleThread] Stack trace follows:
com.google.gson.JsonParseException: The JsonDeserializer org.hyperic.hq.plugin.rabbitmq.core.HypericRabbitAdmin$IntegerDeserializer@15f918 failed to deserialized json object {"rate":0,"interval":0,"last_event":0} given the type class java.lang.Integer
at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:63)
at com.google.gson.JsonDeserializationVisitor.invokeCustomDeserializer(JsonDeserializationVisitor.java:88)
at com.google.gson.JsonDeserializationVisitor.visitUsingCustomHandler(JsonDeserializationVisitor.java:76)
at com.google.gson.ObjectNavigator.accept(ObjectNavigator.java:98)
at com.google.gson.JsonDeserializationContextDefault.fromJsonObject(JsonDeserializationContextDefault.java:73)
at com.google.gson.JsonDeserializationContextDefault.deserialize(JsonDeserializationContextDefault.java:51)
at com.google.gson.DefaultTypeAdapters$MapTypeAdapter.deserialize(DefaultTypeAdapters.java:532)
at com.google.gson.DefaultTypeAdapters$MapTypeAdapter.deserialize(DefaultTypeAdapters.java:498)
at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:50)
at com.google.gson.JsonDeserializationVisitor.invokeCustomDeserializer(JsonDeserializationVisitor.java:88)
at com.google.gson.JsonObjectDeserializationVisitor.visitFieldUsingCustomHandler(JsonObjectDeserializationVisitor.java:117)
at com.google.gson.ObjectNavigator.navigateClassFields(ObjectNavigator.java:150)
at com.google.gson.ObjectNavigator.accept(ObjectNavigator.java:123)
at com.google.gson.JsonDeserializationContextDefault.fromJsonObject(JsonDeserializationContextDefault.java:73)
at com.google.gson.JsonDeserializationContextDefault.deserialize(JsonDeserializationContextDefault.java:51)
at com.google.gson.Gson.fromJson(Gson.java:495)
at com.google.gson.Gson.fromJson(Gson.java:444)
at com.google.gson.Gson.fromJson(Gson.java:396)
at com.google.gson.Gson.fromJson(Gson.java:372)
at org.hyperic.hq.plugin.rabbitmq.core.HypericRabbitAdmin.get(HypericRabbitAdmin.java:255)
at org.hyperic.hq.plugin.rabbitmq.core.HypericRabbitAdmin.getOverview(HypericRabbitAdmin.java:111)
at org.hyperic.hq.plugin.rabbitmq.collect.RabbitMQDefaultCollector.init(RabbitMQDefaultCollector.java:32)
at org.hyperic.hq.product.Collector.getValue(Collector.java:513)
at org.hyperic.hq.plugin.rabbitmq.collect.RabbitServerMeasurement.getValue(RabbitServerMeasurement.java:55)
at org.hyperic.hq.product.MeasurementPluginManager.getPluginValue(MeasurementPluginManager.java:176)
at org.hyperic.hq.product.MeasurementPluginManager.getValue(MeasurementPluginManager.java:274)
at org.hyperic.hq.measurement.agent.server.ScheduleThread.getValue(ScheduleThread.java:439)
at org.hyperic.hq.measurement.agent.server.ScheduleThread.access$1400(ScheduleThread.java:75)
at org.hyperic.hq.measurement.agent.server.ScheduleThread$MetricTask.run(ScheduleThread.java:505)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.UnsupportedOperationException
at com.google.gson.JsonElement.getAsInt(JsonElement.java:240)
at org.hyperic.hq.plugin.rabbitmq.core.HypericRabbitAdmin$IntegerDeserializer.deserialize(HypericRabbitAdmin.java:286)
at org.hyperic.hq.plugin.rabbitmq.core.HypericRabbitAdmin$IntegerDeserializer.deserialize(HypericRabbitAdmin.java:282)
at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:50)
... 34 more

Activity

Hide
Janne Valkealahti added a comment -

Examples of JSONs:

2.4.1:
{
"management_version":"2.4.1",
"statistics_level":"fine",
"message_stats":[],
"queue_totals":{ "messages":0, "messages_ready":0, "messages_unacknowledged":0},
"node":"rabbit241@ubuntu",
"statistics_db_node":"rabbit241@ubuntu",
"listeners":[{ "node":"rabbit241@ubuntu", "protocol":"amqp", "host":"ubuntu.localdomain", "ip_address":"::","port":5672}]}

2.7.1:
{
"management_version":"2.7.1","statistics_level":"fine","message_stats":[],
"queue_totals":{
"messages":0,
"messages_ready":0,
"messages_unacknowledged":0,
"messages_details":{"rate":0,"interval":0,"last_event":0},
"messages_ready_details":{"rate":0,"interval":0,"last_event":0},
"messages_unacknowledged_details":{"rate":0,"interval":0,"last_event":0}},
"node":"rabbit271@ubuntu","statistics_db_node":"rabbit271@ubuntu",
"listeners":[{"node":"rabbit271@ubuntu","protocol":"amqp","ip_address":"::","port":6672}],
"contexts":[{"node":"rabbit271@ubuntu","description":"RabbitMQ Management","path":"/","port":55672}]}

Show
Janne Valkealahti added a comment - Examples of JSONs: 2.4.1: { "management_version":"2.4.1", "statistics_level":"fine", "message_stats":[], "queue_totals":{ "messages":0, "messages_ready":0, "messages_unacknowledged":0}, "node":"rabbit241@ubuntu", "statistics_db_node":"rabbit241@ubuntu", "listeners":[{ "node":"rabbit241@ubuntu", "protocol":"amqp", "host":"ubuntu.localdomain", "ip_address":"::","port":5672}]} 2.7.1: { "management_version":"2.7.1","statistics_level":"fine","message_stats":[], "queue_totals":{ "messages":0, "messages_ready":0, "messages_unacknowledged":0, "messages_details":{"rate":0,"interval":0,"last_event":0}, "messages_ready_details":{"rate":0,"interval":0,"last_event":0}, "messages_unacknowledged_details":{"rate":0,"interval":0,"last_event":0}}, "node":"rabbit271@ubuntu","statistics_db_node":"rabbit271@ubuntu", "listeners":[{"node":"rabbit271@ubuntu","protocol":"amqp","ip_address":"::","port":6672}], "contexts":[{"node":"rabbit271@ubuntu","description":"RabbitMQ Management","path":"/","port":55672}]}
Hide
Adi Baron (c) added a comment -

The fix was tested using static JSON files only.
We should verify my work again, once we have lab machines with both v2.4.1 and v2.7.1 ready.

Show
Adi Baron (c) added a comment - The fix was tested using static JSON files only. We should verify my work again, once we have lab machines with both v2.4.1 and v2.7.1 ready.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:
    Last comment:
    2 years, 10 weeks, 2 days ago