Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't crash listing listeners when a node is shutting down (backport #6719) #6721

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Dec 20, 2022

This is an automatic backport of pull request #6719 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

Previously a management api request could crash as below while the overview
page was open during a node restart.

```
crasher:
  initial call: cowboy_stream_h:request_process/3
  pid: <0.1902.0>
  registered_name: []
  exception error: bad argument
    in operator  ++/2
       called as {badrpc,
                  {'EXIT',
                   {badarg,
                    [{ets,match_object,
                      [rabbit_listener_ets,'_'],
                      [{error_info,
                        #{cause => id,module => erl_stdlib_errors}}]},
                     {ets,tab2list,1,[{file,"ets.erl"},{line,771}]}]}}}
                 ++
                 [{listener,'rabbit@<hostname>',http,
                      "<hostname>",
                      {0,0,0,0,0,0,0,0},
                      15672,
                      [{cowboy_opts,[{sendfile,false}]},
                       {ip,"0.0.0.0"},
                       {port,15672},
                       {ssl,false}]},
...
    in call from lists:append/1 (lists.erl, line 155)
    in call from rabbit_mgmt_wm_overview:listeners/0 (rabbit_mgmt_wm_overview.erl, line 111)
    in call from rabbit_mgmt_wm_overview:to_json/2 (rabbit_mgmt_wm_overview.erl, line 66)
    in call from cowboy_rest:call/3 (src/cowboy_rest.erl, line 1575)
    in call from cowboy_rest:set_resp_body/2 (src/cowboy_rest.erl, line 1464)
    in call from cowboy_rest:upgrade/4 (src/cowboy_rest.erl, line 284)
    in call from cowboy_stream_h:execute/3 (src/cowboy_stream_h.erl, line 300)
```

(cherry picked from commit d42f7c6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants