Skip to content

(FunctionClauseError) no function clause matching in RabbitMQ.CLI.Core.Memory.formatted_watermark/1 #2964

@eLvErDe

Description

@eLvErDe

Hello,

I think there is a bug in rabbitmqctl parsing of relative memory watermark:

/usr/lib/rabbitmq/bin/rabbitmqctl -q status
Stack trace: 

** (FunctionClauseError) no function clause matching in RabbitMQ.CLI.Core.Memory.formatted_watermark/1
    (rabbitmqctl 3.8.0-dev) lib/rabbitmq/cli/core/memory.ex:56: RabbitMQ.CLI.Core.Memory.formatted_watermark({:relative, 0.4})
    (rabbitmqctl 3.8.0-dev) lib/rabbitmq/cli/ctl/commands/status_command.ex:221: RabbitMQ.CLI.Ctl.Commands.StatusCommand.result_map/1
    (rabbitmqctl 3.8.0-dev) lib/rabbitmq/cli/ctl/commands/status_command.ex:68: RabbitMQ.CLI.Ctl.Commands.StatusCommand.output/2
    (rabbitmqctl 3.8.0-dev) lib/rabbitmqctl.ex:153: RabbitMQCtl.maybe_run_command/3
    (rabbitmqctl 3.8.0-dev) lib/rabbitmqctl.ex:121: anonymous fn/5 in RabbitMQCtl.do_exec_parsed_command/5
    (rabbitmqctl 3.8.0-dev) lib/rabbitmqctl.ex:584: RabbitMQCtl.maybe_with_distribution/3
    (rabbitmqctl 3.8.0-dev) lib/rabbitmqctl.ex:93: RabbitMQCtl.exec_command/2
    (rabbitmqctl 3.8.0-dev) lib/rabbitmqctl.ex:31: RabbitMQCtl.main/1

My config file is the following:

% This file managed by Puppet
% Template Path: rabbitmq/templates/rabbitmq.config
[
  {rabbit, [
    {loopback_users, [<<"guest">>]},
    {tcp_listen_options, [
         binary,
         {packet,        raw},
         {reuseaddr,     true},
         {backlog,       128},
         {nodelay,       true},
         {linger,        {true, 0}},
         {exit_on_close, false}
    ]},
    {cluster_partition_handling, ignore},
    {disk_free_limit, {absolute, 52428800}},
    {vm_memory_high_watermark, {relative, 0.4}},
    {default_user, <<"guest">>},
    {default_pass, <<"guest">>}
  ]},
  {kernel, [
    
  ]}
,
  {rabbitmq_management, [
    {listener, [
      {port, 15672}
    ]}
  ]}
].
% EOF

It used to work fine on branch 3.7.x but not 3.8.x, and I already looked at the GIT history and saw a lot of changes related to memory watermark parsing but I already have all of them.

Regards, Adam.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions