clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
524 stars 29 forks source link

Not able to enable rabbitmq-server plugin #304

Open yongfengdu opened 6 years ago

yongfengdu commented 6 years ago

Describe the bug The rabbitmq-server runs ok, however, when I try to enable the rabbitmq_management plugin, it fails to start. To Reproduce Steps to reproduce the behavior:

  1. Systemctl start rabbitmq-server
  2. /usr/lib/rabbitmq-server/sbin/rabbitmq-plugins enable rabbitmq_management
  3. Restart rabbitmq-server

Expected behavior rabbitmq-server should start with management plugin enabled.

Screenshots ERROR log printed by rabbitmq: Error description: init:do_boot/3 init:start_em/1 rabbit:start_it/1 line 461 rabbit:broker_start/0 line 335 rabbit_plugins:prepare_plugins/1 line 307 rabbit_plugins:'-prepare_plugins/1-lc$^0/1-0-'/2 line 307 rabbit_plugins:prepare_plugin/2 line 504 throw:{failed_to_unzip_plugin,rabbitmq_management, "/usr/lib/rabbitmq-server/plugins/rabbitmq_management-3.7.9.ez", {bad_crc,"rabbitmq_management-3.7.9/priv/www/api/index.html"}} Log file(s) (may contain more information): /var/log/rabbitmq/rabbit@clear-25180.log /var/log/rabbitmq/rabbit@clear-25180_upgrade.log

{"init terminating in do_boot",{failed_to_unzip_plugin,rabbitmq_management,"/usr/lib/rabbitmq-server/plugins/rabbitmq_management-3.7.9.ez",{bad_crc,"rabbitmq_management-3.7.9/priv/www/api/index.html"}}} init terminating in do_boot ({failed_to_unzip_plugin,rabbitmq_management,/usr/lib/rabbitmq-server/plugins/rabbitmq_management-3.7.9.ez,{bad_crc,rabbitmq_management-3.7.9/priv/www/api/index.html}})

Environment (please complete the following information):

mrkz commented 6 years ago

To Reproduce Steps to reproduce the behavior:

1. Systemctl start rabbitmq-server

2. /usr/lib/rabbitmq-server/sbin/rabbitmq-plugins enable rabbitmq_management

This is the output I've got instead:


# /usr/lib/rabbitmq-server/sbin/rabbitmq-plugins  list
Configured: E = explicitly enabled; e = implicitly enabled
| Status: [failed to contact rabbit@localhost - status not shown]
|/
[  ] rabbitmq_amqp1_0                  3.7.9
[  ] rabbitmq_auth_backend_cache       3.7.9
[  ] rabbitmq_auth_backend_http        3.7.9
[  ] rabbitmq_auth_backend_ldap        3.7.9
[  ] rabbitmq_auth_mechanism_ssl       3.7.9
[  ] rabbitmq_consistent_hash_exchange 3.7.9
[  ] rabbitmq_event_exchange           3.7.9
[  ] rabbitmq_federation               3.7.9
[  ] rabbitmq_federation_management    3.7.9
[  ] rabbitmq_jms_topic_exchange       3.7.9
[  ] rabbitmq_management               3.7.9
[  ] rabbitmq_management_agent         3.7.9
[  ] rabbitmq_mqtt                     3.7.9
[  ] rabbitmq_peer_discovery_aws       3.7.9
[  ] rabbitmq_peer_discovery_common    3.7.9
[  ] rabbitmq_peer_discovery_consul    3.7.9
[  ] rabbitmq_peer_discovery_etcd      3.7.9
[  ] rabbitmq_peer_discovery_k8s       3.7.9
[  ] rabbitmq_random_exchange          3.7.9
[  ] rabbitmq_recent_history_exchange  3.7.9
[  ] rabbitmq_sharding                 3.7.9
[  ] rabbitmq_shovel                   3.7.9
[  ] rabbitmq_shovel_management        3.7.9
[  ] rabbitmq_stomp                    3.7.9
[  ] rabbitmq_top                      3.7.9
[  ] rabbitmq_tracing                  3.7.9
[  ] rabbitmq_trust_store              3.7.9
[  ] rabbitmq_web_dispatch             3.7.9
[  ] rabbitmq_web_mqtt                 3.7.9
[  ] rabbitmq_web_mqtt_examples        3.7.9
[  ] rabbitmq_web_stomp                3.7.9
[  ] rabbitmq_web_stomp_examples       3.7.9
# /usr/lib/rabbitmq-server/sbin/rabbitmq-plugins  enable rabbitmq_management
Error:
{:cannot_write_enabled_plugins_file, "/etc/rabbitmq/enabled_plugins", :enoent}

Did you configure something else prior to starting the rabbitmq-server? If so, can you please provide an example so I can reproduce easier your issue?


> 
>     3. Restart rabbitmq-server
> 
> 
> **Expected behavior**
> rabbitmq-server should start with management plugin enabled.
> 
> **Screenshots**
> ERROR log printed by rabbitmq:
> Error description:
> init:do_boot/3
> init:start_em/1
> rabbit:start_it/1 line 461
> rabbit:broker_start/0 line 335
> rabbit_plugins:prepare_plugins/1 line 307
> rabbit_plugins:'-prepare_plugins/1-lc$^0/1-0-'/2 line 307
> rabbit_plugins:prepare_plugin/2 line 504
> throw:{failed_to_unzip_plugin,rabbitmq_management,
> "/usr/lib/rabbitmq-server/plugins/rabbitmq_management-3.7.9.ez",
> {bad_crc,"rabbitmq_management-3.7.9/priv/www/api/index.html"}}
> Log file(s) (may contain more information):
> /var/log/rabbitmq/rabbit@clear-25180.log
> /var/log/rabbitmq/rabbit@clear-25180_upgrade.log
> 
> {"init terminating in do_boot",{failed_to_unzip_plugin,rabbitmq_management,"/usr/lib/rabbitmq-server/plugins/rabbitmq_management-3.7.9.ez",{bad_crc,"rabbitmq_management-3.7.9/priv/www/api/index.html"}}}
> init terminating in do_boot ({failed_to_unzip_plugin,rabbitmq_management,/usr/lib/rabbitmq-server/plugins/rabbitmq_management-3.7.9.ez,{bad_crc,rabbitmq_management-3.7.9/priv/www/api/index.html}})

looking at the `failed_to_unzip_plugin` might look like you're missing an unzip command, does adding the `unzip` bundle fixes the issue?
> 
> **Environment (please complete the following information):**
> 
>     * Clear Linux OS version:  26540
> 
>     * Bundles: Install this by "yum install rabbitmq-server"
I think you mean `swupd bundle-add openstack-common`? (this is the only bundle I saw providing rabbitmq-server)
yongfengdu commented 5 years ago

I guess your /etc/rabbitmq directory doesn't exist, I did this on my own: mkdir /etc/rabbitmq

For the second, yes, you can use the swupd bundle-add openstack-common to reproduce, that should be the same. FYI, I'm using the yum repo, which I installed "swupd bundle-add package-builder" and then configured the yum repo. (https://github.com/sirredbeard/yumonclearlinux)

ahkok commented 5 years ago

Using the linked yum method is not supported. Did you install rabbitmq-server through swupd or another method?

yongfengdu commented 5 years ago

Using "swupd bundle-add openstack-common" to install rabbitmq-server.

bryteise commented 5 years ago

@VictorRodriguez Would you know if something broke in rabbitmq-server.

VictorRodriguez commented 5 years ago

@bryteise works for me to run devstack in a CLR img, what I do as an internal test is :

@test "rabbit-basic" { export HOME=/root systemctl start epmd.service systemctl start rabbitmq-server cp /var/lib/rabbitmq/.erlang.cookie $HOME rabbitmqctl status }

yongfengdu commented 5 years ago

The rabbitmq works fine if not enabling any plugins. The problem is when I want to enable plugin, error occurs: /usr/lib/rabbitmq-server/sbin/rabbitmq-plugins enable rabbitmq_management