Duplicate JSON key in RabbitMQ-3.6.5 Management API response

303 views
Skip to first unread message

Diptesh Chatterjee

unread,
Aug 11, 2016, 4:26:47 PM8/11/16
to rabbitmq-users
Hi,

I was trying to evaluate RabbtiMQ-3.6.5 and noticed a major issue there. I set up one RabbitMQ broker and issued the following query:

curl -X GET -u rabbit:rabbit http://localhost:15672/api/queues/%2F

The response looks as follows:

[{
"reductions": 214680,
"reductions_details": {
"rate": 553.0
},
"messages": 0,
"messages_details": {
"rate": 0.0
},
"messages_ready": 0,
"messages_ready_details": {
"rate": 0.0
},
"messages_unacknowledged": 0,
"messages_unacknowledged_details": {
"rate": 0.0
},
"policy": "ha-all",
"exclusive_consumer_tag": null,
"consumers": 0,
"consumer_utilisation": null,
"memory": 68232,
"slave_nodes": [],
"synchronised_slave_nodes": [],
"recoverable_slaves": [],
"state": "running",
"reductions": 214680,
"garbage_collection": {
"min_bin_vheap_size": 46422,
"min_heap_size": 233,
"fullsweep_after": 65535,
"minor_gcs": 7
},
"messages_ram": 0,
"messages_ready_ram": 0,
"messages_unacknowledged_ram": 0,
"messages_persistent": 0,
"message_bytes": 0,
"message_bytes_ready": 0,
"message_bytes_unacknowledged": 0,
"message_bytes_ram": 0,
"message_bytes_persistent": 0,
"head_message_timestamp": null,
"disk_reads": 0,
"disk_writes": 0,
"backing_queue_status": {
"mode": "default",
"q1": 0,
"q2": 0,
"delta": ["delta", "undefined", 0, "undefined"],
"q3": 0,
"q4": 0,
"len": 0,
"target_ram_count": "infinity",
"next_seq_id": 0,
"avg_ingress_rate": 0.0,
"avg_egress_rate": 0.0,
"avg_ack_ingress_rate": 0.0,
"avg_ack_egress_rate": 0.0,
"mirror_seen": 0,
"mirror_senders": 0
},
"node": "rabbit@node1",
"arguments": {},
"exclusive": false,
"auto_delete": false,
"durable": true,
"vhost": "/",
"name": "test"
}
]

As you can see from the lines in bold, the key "reductions" occurs twice in the JSON and this causes JSON parsing to fail while using the org.json library. Is there any plan to fix this bug soon?

François Abraham

unread,
Aug 17, 2016, 6:09:12 AM8/17/16
to rabbitmq-users
Hello,

i have the same issue with RabbitMQ-3.6.5 : duplicate key 'reductions' in JSON stream that generate org.json.JSONException while parsing.

Could you please find a bugfix soon ?

Thanx

Michael Klishin

unread,
Aug 17, 2016, 11:27:24 AM8/17/16
to rabbitm...@googlegroups.com
I cannot reproduce with

curl -X GET -u guest:guest http://localhost:15672/api/queues/%2F | python -m json.tool

or by running Hop's [1] test suite against it.

Can you please provide `rabbitmqctl status` and `rabbitmqctl environment` output?


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Abraham, François

unread,
Aug 17, 2016, 12:00:01 PM8/17/16
to rabbitm...@googlegroups.com
Hello,

i have downgraded my RabbitMQ version to 3.6.4 and i've got the same issue.

Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Tous droits réservés.

C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.6.4>rabbitmqctl status
Status of node 'RabbitMQ@PT8119' ...
[{pid,8004},
 {running_applications,
     [{rabbitmq_management,"RabbitMQ Management Console","3.6.4"},
      {rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.6.4"},
      {webmachine,"webmachine","1.10.3"},
      {mochiweb,"MochiMedia Web Server","2.13.1"},
      {rabbitmq_web_stomp,"Rabbit WEB-STOMP - WebSockets to Stomp adapter",
          "3.6.4"},
      {rabbitmq_management_agent,"RabbitMQ Management Agent","3.6.4"},
      {rabbitmq_stomp,"RabbitMQ STOMP plugin","3.6.4"},
      {rabbit,"RabbitMQ","3.6.4"},
      {amqp_client,"RabbitMQ AMQP Client","3.6.4"},
      {sockjs,"SockJS","0.3.4"},
      {xmerl,"XML parser","1.3.11"},
      {ssl,"Erlang/OTP SSL application","8.0"},
      {cowboy,"Small, fast, modular HTTP server.","1.0.3"},
      {ranch,"Socket acceptor pool for TCP protocols.","1.2.1"},
      {os_mon,"CPO  CXC 138 46","2.4.1"},
      {compiler,"ERTS  CXC 138 10","7.0"},
      {rabbit_common,[],"3.6.4"},
      {cowlib,"Support library for manipulating Web protocols.","1.0.1"},
      {public_key,"Public key infrastructure","1.2"},
      {crypto,"CRYPTO","3.7"},
      {inets,"INETS  CXC 138 49","6.3"},
      {asn1,"The Erlang ASN1 compiler version 4.0.3","4.0.3"},
      {mnesia,"MNESIA  CXC 138 12","4.14"},
      {syntax_tools,"Syntax tools","2.0"},
      {sasl,"SASL  CXC 138 11","3.0"},
      {stdlib,"ERTS  CXC 138 10","3.0"},
      {kernel,"ERTS  CXC 138 10","5.0"}]},
 {os,{win32,nt}},
 {erlang_version,
     "Erlang/OTP 19 [erts-8.0] [64-bit] [smp:4:4] [async-threads:64]\n"},
 {memory,
     [{total,58870448},
      {connection_readers,69344},
      {connection_writers,2720},
      {connection_channels,12080},
      {connection_other,59376},
      {queue_procs,70064},
      {queue_slave_procs,0},
      {plugins,1283856},
      {other_proc,17594400},
      {mnesia,82352},
      {mgmt_db,1051088},
      {msg_index,52560},
      {other_ets,1591152},
      {binary,235760},
      {code,25808005},
      {atom,1041593},
      {other_system,9916098}]},
 {alarms,[]},
 {listeners,
     [{clustering,25672,"::"},
      {amqp,5672,"::"},
      {amqp,5672,"0.0.0.0"},
      {stomp,61613,"::"},
      {stomp,61613,"0.0.0.0"}]},
 {vm_memory_high_watermark,0.3},
 {vm_memory_limit,2541907968},
 {disk_free_limit,50000000},
 {disk_free,287420657664},
 {file_descriptors,
     [{total_limit,8092},
      {total_used,4},
      {sockets_limit,7280},
      {sockets_used,2}]},
 {processes,[{limit,1048576},{used,341}]},
 {run_queue,0},
 {uptime,188},
 {kernel,{net_ticktime,60}}]

C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.6.4>rabbitmqctl environment
Application environment of node 'RabbitMQ@PT8119' ...
[{amqp_client,[{prefer_ipv6,false},{ssl_options,[]}]},
 {asn1,[]},
 {compiler,[]},
 {cowboy,[]},
 {cowlib,[]},
 {crypto,[]},
 {inets,[]},
 {kernel,
     [{error_logger,tty},
      {inet_default_connect_options,[{nodelay,true}]},
      {inet_dist_listen_max,25672},
      {inet_dist_listen_min,25672}]},
 {mnesia,[{dir,"C:/SavoyeSHY/rabbitmq/db/RABBIT~2"}]},
 {mochiweb,[]},
 {os_mon,
     [{start_cpu_sup,false},
      {start_disksup,false},
      {start_memsup,false},
      {start_os_sup,false}]},
 {public_key,[]},
 {rabbit,
     [{auth_backends,[rabbit_auth_backend_internal]},
      {auth_mechanisms,['PLAIN','AMQPLAIN']},
      {backing_queue_module,rabbit_priority_queue},
      {channel_max,128},
      {channel_operation_timeout,15000},
      {cluster_keepalive_interval,10000},
      {cluster_nodes,{[],disc}},
      {cluster_partition_handling,ignore},
      {collect_statistics,fine},
      {collect_statistics_interval,10000},
      {credit_flow_default_credit,{200,50}},
      {default_permissions,[<<".*">>,<<".*">>,<<".*">>]},
      {default_user,<<"guest">>},
      {default_user_tags,[administrator]},
      {default_vhost,<<"/">>},
      {delegate_count,16},
      {disk_free_limit,50000000},
      {enabled_plugins_file,"C:/SavoyeSHY/rabbitmq/ENABLE~1"},
      {error_logger,{file,"C:/SavoyeSHY/rabbitmq/log/RabbitMQ.log"}},
      {fhc_read_buffering,false},
      {fhc_write_buffering,true},
      {frame_max,131072},
      {halt_on_upgrade_failure,true},
      {handshake_timeout,10000},
      {heartbeat,600},
      {hipe_compile,false},
      {hipe_modules,
          [rabbit_reader,rabbit_channel,gen_server2,rabbit_exchange,
           rabbit_command_assembler,rabbit_framing_amqp_0_9_1,rabbit_basic,
           rabbit_event,lists,queue,priority_queue,rabbit_router,rabbit_trace,
           rabbit_misc,rabbit_binary_parser,rabbit_exchange_type_direct,
           rabbit_guid,rabbit_net,rabbit_amqqueue_process,
           rabbit_variable_queue,rabbit_binary_generator,rabbit_writer,
           delegate,gb_sets,lqueue,sets,orddict,rabbit_amqqueue,
           rabbit_limiter,gb_trees,rabbit_queue_index,
           rabbit_exchange_decorator,gen,dict,ordsets,file_handle_cache,
           rabbit_msg_store,array,rabbit_msg_store_ets_index,rabbit_msg_file,
           rabbit_exchange_type_fanout,rabbit_exchange_type_topic,mnesia,
           mnesia_lib,rpc,mnesia_tm,qlc,sofs,proplists,credit_flow,pmon,
           ssl_connection,tls_connection,ssl_record,tls_record,gen_fsm,ssl]},
      {log_levels,[{connection,info},{channel,info}]},
      {loopback_users,[]},
      {memory_monitor_interval,2500},
      {mirroring_flow_control,true},
      {mirroring_sync_batch_size,4096},
      {mnesia_table_loading_timeout,30000},
      {msg_store_credit_disc_bound,{2000,500}},
      {msg_store_file_size_limit,16777216},
      {msg_store_index_module,rabbit_msg_store_ets_index},
      {msg_store_io_batch_size,2048},
      {num_ssl_acceptors,1},
      {num_tcp_acceptors,10},
      {password_hashing_module,rabbit_password_hashing_sha256},
      {plugins_dir,"C:/PROGRA~2/RABBIT~1/RABBIT~1.4/plugins"},
      {plugins_expand_dir,"C:/SavoyeSHY/rabbitmq/db/RabbitMQ-plugins-expand"},
      {queue_index_embed_msgs_below,4096},
      {queue_index_max_journal_entries,32768},
      {reverse_dns_lookups,true},
      {sasl_error_logger,{file,"C:/SavoyeSHY/rabbitmq/log/RABBIT~1.LOG"}},
      {server_properties,[]},
      {ssl_allow_poodle_attack,false},
      {ssl_apps,[asn1,crypto,public_key,ssl]},
      {ssl_cert_login_from,distinguished_name},
      {ssl_handshake_timeout,5000},
      {ssl_listeners,[]},
      {ssl_options,[]},
      {tcp_listen_options,
          [{backlog,128},
           {nodelay,true},
           {linger,{true,0}},
           {exit_on_close,false}]},
      {tcp_listeners,[5672]},
      {trace_vhosts,[]},
      {vm_memory_high_watermark,0.3},
      {vm_memory_high_watermark_paging_ratio,0.5},
      {windows_service_config,"C:/SavoyeSHY/rabbitmq/rabbitmq"}]},
 {rabbit_common,[]},
 {rabbitmq_management,
     [{cors_allow_origins,[]},
      {cors_max_age,1800},
      {http_log_dir,"/tmp/rabbit-mgmt"},
      {listener,[{port,15672}]},
      {load_definitions,none},
      {process_stats_gc_timeout,300000},
      {rates_mode,basic},
      {sample_retention_policies,
          [{global,[{605,5},{3660,60},{29400,600},{86400,1800}]},
           {basic,[{605,5},{3600,60}]},
           {detailed,[{10,5}]}]},
      {stats_event_max_backlog,250}]},
 {rabbitmq_management_agent,[]},
 {rabbitmq_stomp,
     [{default_user,[{login,"guest"},{passcode,"guest"}]},
      {default_vhost,<<"/">>},
      {hide_server_info,false},
      {implicit_connect,true},
      {num_ssl_acceptors,1},
      {num_tcp_acceptors,10},
      {ssl_cert_login,false},
      {ssl_listeners,[]},
      {tcp_listen_options,[{backlog,128},{nodelay,true}]},
      {tcp_listeners,[61613]},
      {trailing_lf,true}]},
 {rabbitmq_web_dispatch,[]},
 {rabbitmq_web_stomp,
     [{cowboy_opts,[]},
      {num_ssl_acceptors,1},
      {num_tcp_acceptors,10},
      {port,15674},
      {sockjs_opts,[]},
      {ssl_config,[]},
      {tcp_config,[]},
      {use_http_auth,false},
      {ws_frame,text}]},
 {ranch,[]},
 {sasl,[{errlog_type,error},{sasl_error_logger,false}]},
 {sockjs,[]},
 {ssl,[]},
 {stdlib,[]},
 {syntax_tools,[]},
 {webmachine,[{error_handler,rabbit_webmachine_error_handler}]},
 {xmerl,[]}]

I have management, stomp and webstomp plugins enabled.

Regards, François 





François Abraham 
Chef de projet solution WCS 


a-SIS 
8 Rue de La Richelandière - F42100 SAINT ETIENNE 


To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/2hifylvq_mM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-users+unsubscribe@googlegroups.com.

Gabriele Santomaggio

unread,
Aug 18, 2016, 1:37:58 AM8/18/16
to rabbitmq-users
Hi,

We can reproduced the issue.

github issue: https://github.com/rabbitmq/rabbitmq-management/issues/278

Regards

-
Gabriele
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.

To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/2hifylvq_mM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-user...@googlegroups.com.

Michael Klishin

unread,
Aug 18, 2016, 2:11:51 AM8/18/16
to rabbitm...@googlegroups.com
Note that it doesn't affect quite a few JSON parsers out there, for example, 3 HTTP API clients we use
as additional test suites are not affected.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages