Skip to content

4.1.4: 'rabbitmq-diagnostics status --formatter json' incorrectly formats a few collection keys (again) #14509

@sturla78

Description

@sturla78

Describe the bug

In RabbitMQ 4.1.4 (erlang 27.3.4.2) on windows 11/2022 OS, the output of rabbitmqctl status --formatter json
returns a json with wrong array type format.

{
	"memory": {
		"atom": 1130777,
		"binary": 1563584,
		"code": 23346086,
		"total": {
			"erlang": 88199960,
			"rss": 109477888,
			"allocated": 108429312
		},
		"strategy": "rss",
		"plugins": 1265676,
		"mnesia": 443872,
		"connection_readers": 648736,
		"connection_writers": 316400,
		"connection_channels": 142544,
		"connection_other": 3804920,
		"queue_procs": 287832,
		"quorum_queue_procs": 2752,
		"quorum_queue_dlx_procs": 2752,
		"stream_queue_procs": 1304,
		"stream_queue_replica_reader_procs": 1304,
		"stream_queue_coordinator_procs": 0,
		"metadata_store": 427244,
		"other_proc": 29259760,
		"metrics": 1488448,
		"mgmt_db": 475264,
		"quorum_ets": 5584,
		"metadata_store_ets": 26504,
		"other_ets": 2310464,
		"msg_index": 680544,
		"other_system": 20567609,
		"allocated_unused": 20229352,
		"reserved_unallocated": 1048576
	},
	"pid": 32436,
	"processes": {
		"used": 1344,
		"limit": 1048576
	},
	"run_queue": 1,
	"os": "Windows",
	"net_ticktime": 60,
	"uptime": 42,
	"config_files": "c:/ProgramData/product/Unified/RabbitMQ/advanced.configc:/ProgramData/product/Unified/RabbitMQ/rabbitmq.conf",
	"tags": [],
	"alarms": [],
	"product_name": "",
	"product_version": "",
	"is_under_maintenance": false,
	"rabbitmq_version": "4.1.4",
	"erlang_version": "Erlang/OTP 27 [erts-15.2.7.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]",
	"crypto_lib_version": "OpenSSL 3.1.0 14 Mar 2023",
	"enabled_plugin_file": "c:/ProgramData/product/Unified/RabbitMQ/enabled_plugins",
	"active_plugins": "rabbitmq_shovel_managementrabbitmq_federation_managementrabbitmq_federationrabbitmq_shovelamqp10_clientgunrabbitmq_managementrabbitmq_management_agentrabbitmq_web_dispatchcowboyoauth2_clientjoseamqp_client",
	"data_directory": "c:/ProgramData/product/Unified/RabbitMQ/db/rabbit@vdip102m273-mnesia",
	"raft_data_directory": "c:/ProgramData/product/Unified/RabbitMQ/db/rabbit@vdip102m273-mnesia/quorum/rabbit@vdip102m273",
	"log_files": "<stdout>c:/ProgramData/product/Unified/RabbitMQ/log/[email protected]",
	"vm_memory_calculation_strategy": "rss",
	"vm_memory_high_watermark_setting": {
		"relative": 0.6
	},
	"vm_memory_high_watermark_limit": 15461186764,
	"file_descriptors": {
		"total_used": 0,
		"total_limit": 65439,
		"sockets_limit": 0,
		"sockets_used": 0
	},
	"disk_free_limit": 50000000,
	"disk_free": 326574919680,
	"totals": {
		"virtual_host_count": 3,
		"connection_count": 18,
		"queue_count": 26
	},
	"listeners": [
		{
			"node": "rabbit@vdip102m273",
			"port": 15672,
			"protocol": "http",
			"interface": "[::]",
			"purpose": "HTTP API"
		},
		{
			"node": "rabbit@vdip102m273",
			"port": 25672,
			"protocol": "clustering",
			"interface": "[::]",
			"purpose": "inter-node and CLI tool communication"
		},
		{
			"node": "rabbit@vdip102m273",
			"port": 5672,
			"protocol": "amqp",
			"interface": "[::]",
			"purpose": "AMQP 0-9-1 and AMQP 1.0"
		},
		{
			"node": "rabbit@vdip102m273",
			"port": 5672,
			"protocol": "amqp",
			"interface": "0.0.0.0",
			"purpose": "AMQP 0-9-1 and AMQP 1.0"
		}
	]
}

The property config_files, log_files, active_plugins are not well formatted.

Reproduction steps

run the cli rabbitmqctl status --formatter json

Expected behavior

The type array should be parse with a correct format (as in previous version of rabbit for ex. 3.13.2)

Additional context

Running following versions:

erlang 27.3.4.2
rabbitmq 4.1.4
OS: Windows 11 / Windows 2022

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions