bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.9k stars 9.17k forks source link

[bitnami/rabbitmq] tracing cannot be opened from the GUI #27082

Closed andrewg78 closed 2 months ago

andrewg78 commented 3 months ago

Name and Version

bitnami/rabbitmq:14.4.1

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. helm install bitnami/rabbitmq
  2. replicas set to 3
  3. Wait for all pods to come online
  4. Open rabbit UI through the web browser
  5. Go to Admin
  6. Click Tracing

Are you using any custom parameters or values?

extraConfiguration: |-
  cluster_formation.target_cluster_size_hint = 3
extraPlugins: "rabbitmq_shovel rabbitmq_shovel_management rabbitmq_tracing rabbitmq_delayed_message_exchange rabbitmq_auth_mechanism_ssl"
communityPlugins: |
  https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/v3.13.0/rabbitmq_delayed_message_exchange-3.13.0.ez

What is the expected behavior?

Tracing panel is opened

What do you see instead?

Node 'rabbit@rabbitmq-0.(my-cluster-details).svc.cluster.local' could not be contacted: {badrpc,
{'EXIT',
{{badmatch,
{error,
erofs}},
[{rabbit_tracing_files,
list,
0,
[{file,
"rabbit_tracing_files.erl"},
{line,
18}]}]}}}

Additional information

Tracing works fine with the above configuration on older version 12.13.1

javsalgar commented 3 months ago

Hi!

Could you show the logs of the RabbitMQ instances to see if the plugin gets loaded?

javsalgar commented 3 months ago

Also, if the plugin requires a new port different from the default, you may need to edit the networkpolicy

andrewg78 commented 3 months ago

Hi!

Could you show the logs of the RabbitMQ instances to see if the plugin gets loaded?

this is what I get from rabbitmq-plugins list image

andrewg78 commented 3 months ago

Also, if the plugin requires a new port different from the default, you may need to edit the networkpolicy

How can I find out what changes were recently made to this plugin and what new port is required?

EDIT: I do not see anything potentially related to this issue on the plugin repo https://github.com/rabbitmq/rabbitmq-server/commits/main/deps/rabbitmq_tracing

javsalgar commented 3 months ago

Thank you so much for the information! It seems that the plugin is indeed installed and enabled. Then the Bitnami packaging is doing the expected commands. I would check with the upstream rabbitmq devs to see if there is an issue with the plugin.

razvanphp commented 3 months ago

I also get into this error, RabbitMQ 3.13.2, cluster with 3 nodes.

While looking into the source code of the plugin, the line 18 where the error is triggered:

    {ok, Dir} = application:get_env(rabbitmq_tracing, directory),
    ok = filelib:ensure_dir(Dir ++ "/a"),

... so the problem seems to be that the file system is read-only where the trace files should be saved, from the documentation:

Configuration options are under the rabbitmq_tracing app (config section, if you will):

directory: controls where the log files go. It defaults to "/var/tmp/rabbitmq-tracing". username: username to be used by tracing event consumers (default: <<"guest">>) password: password to be used by tracing event consumers (default: <<"guest">>)

Checked my node:

 {rabbitmq_tracing,
     [{directory,"/var/tmp/rabbitmq-tracing"},
      {password,<<"guest">>},
      {username,<<"guest">>}]},
I have no name!@rabbitmq-1:/$ touch /var/tmp/rabbitmq-tracing
touch: cannot touch '/var/tmp/rabbitmq-tracing': Read-only file system
razvanphp commented 3 months ago

I fixed it by using this in my chart values:

    advancedConfiguration: |-
      [
        {rabbitmq_tracing, [
          {directory, "/opt/bitnami/rabbitmq/.rabbitmq/traces"},
          {username, <<"remote">>},
          {password, <<"remote">>}
        ]}
      ].

For some reason, the new config format does not accept those settings...

michaelklishin commented 3 months ago

@razvanphp the reason is as simple as "no one has contributed it". You are welcome to do so, RabbitMQ is open source software you very likely get for free.

https://github.com/rabbitmq/rabbitmq-server/issues/11554 explains why exposing the path to rabbitmq.conf is the only approach to path validation Team RabbitMQ will accept and https://github.com/rabbitmq/rabbitmq-server/issues/11551#issuecomment-2187220140 explains how rabbitmq.conf schema extensions are tested.

github-actions[bot] commented 2 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 2 months ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.