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

Enabling new plugin fails #566

Closed
rmestrum opened this issue Aug 23, 2017 · 2 comments
Closed

Enabling new plugin fails #566

rmestrum opened this issue Aug 23, 2017 · 2 comments
Labels
bug Something isn't working

Comments

@rmestrum
Copy link

When i try to enable a extra plugin, the plugin is enabled bot not running.

When executing the command that the provider uses (/usr/lib/rabbitmq/bin/rabbitmq-plugins) manually an error shows up

[root@rmq ~]# rabbitmq-plugins list
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status:   * = running on rabbit@rmq
 |/
[e*] amqp_client                       3.6.5
[  ] cowboy                            1.0.3
[  ] cowlib                            1.0.1
[e*] mochiweb                          2.13.1
[  ] rabbitmq_amqp1_0                  3.6.5
[  ] rabbitmq_auth_backend_ldap        3.6.5
[  ] rabbitmq_auth_mechanism_ssl       3.6.5
[  ] rabbitmq_consistent_hash_exchange 3.6.5
[  ] rabbitmq_event_exchange           3.6.5
[  ] rabbitmq_federation               3.6.5
[  ] rabbitmq_federation_management    3.6.5
[  ] rabbitmq_jms_topic_exchange       3.6.5
[E*] rabbitmq_management               3.6.5
[e*] rabbitmq_management_agent         3.6.5
[  ] rabbitmq_management_visualiser    3.6.5
[  ] rabbitmq_mqtt                     3.6.5
[  ] rabbitmq_recent_history_exchange  1.2.1
[  ] rabbitmq_sharding                 0.1.0
[  ] rabbitmq_shovel                   3.6.5
[  ] rabbitmq_shovel_management        3.6.5
[  ] rabbitmq_stomp                    3.6.5
[  ] rabbitmq_top                      3.6.5
[  ] rabbitmq_tracing                  3.6.5
[  ] rabbitmq_trust_store              3.6.5
[e*] rabbitmq_web_dispatch             3.6.5
[  ] rabbitmq_web_stomp                3.6.5
[  ] rabbitmq_web_stomp_examples       3.6.5
[  ] sockjs                            0.3.4
[e*] webmachine                        1.10.3
[root@rmq ~]# /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_web_stomp
The following plugins have been enabled:
  rabbitmq_stomp
  cowlib
  cowboy
  sockjs
  rabbitmq_web_stomp

Applying plugin configuration to rabbit@rmq... failed.
 * Could not contact node rabbit@rmq.
   Changes will take effect at broker restart.
 * Options: --online  - fail if broker cannot be contacted.
            --offline - do not try to contact broker.
[root@rmq ~]# /usr/lib/rabbitmq/bin/rabbitmq-plugins list
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status:   [failed to contact rabbit@rmq - status not shown]
 |/
[e ] amqp_client                       3.6.5
[e ] cowboy                            1.0.3
[e ] cowlib                            1.0.1
[e ] mochiweb                          2.13.1
[  ] rabbitmq_amqp1_0                  3.6.5
[  ] rabbitmq_auth_backend_ldap        3.6.5
[  ] rabbitmq_auth_mechanism_ssl       3.6.5
[  ] rabbitmq_consistent_hash_exchange 3.6.5
[  ] rabbitmq_event_exchange           3.6.5
[  ] rabbitmq_federation               3.6.5
[  ] rabbitmq_federation_management    3.6.5
[  ] rabbitmq_jms_topic_exchange       3.6.5
[E ] rabbitmq_management               3.6.5
[e ] rabbitmq_management_agent         3.6.5
[  ] rabbitmq_management_visualiser    3.6.5
[  ] rabbitmq_mqtt                     3.6.5
[  ] rabbitmq_recent_history_exchange  1.2.1
[  ] rabbitmq_sharding                 0.1.0
[  ] rabbitmq_shovel                   3.6.5
[  ] rabbitmq_shovel_management        3.6.5
[e ] rabbitmq_stomp                    3.6.5
[  ] rabbitmq_top                      3.6.5
[  ] rabbitmq_tracing                  3.6.5
[  ] rabbitmq_trust_store              3.6.5
[e ] rabbitmq_web_dispatch             3.6.5
[E ] rabbitmq_web_stomp                3.6.5
[  ] rabbitmq_web_stomp_examples       3.6.5
[e ] sockjs                            0.3.4
[e ] webmachine                        1.10.3
[root@rmq ~]#

The start the plugin i must restart the rabbitmq-server service

When i execute the command that's shown on the site of rabbitmq (rabbitmq-plugins) to enable a plugin the command succeeds and the the plugin is enabled and running without restarting the rabbitmq-server service

[root@rmq ~]# rabbitmq-plugins list
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status:   * = running on rabbit@rmq
 |/
[e*] amqp_client                       3.6.5
[  ] cowboy                            1.0.3
[  ] cowlib                            1.0.1
[e*] mochiweb                          2.13.1
[  ] rabbitmq_amqp1_0                  3.6.5
[  ] rabbitmq_auth_backend_ldap        3.6.5
[  ] rabbitmq_auth_mechanism_ssl       3.6.5
[  ] rabbitmq_consistent_hash_exchange 3.6.5
[  ] rabbitmq_event_exchange           3.6.5
[  ] rabbitmq_federation               3.6.5
[  ] rabbitmq_federation_management    3.6.5
[  ] rabbitmq_jms_topic_exchange       3.6.5
[E*] rabbitmq_management               3.6.5
[e*] rabbitmq_management_agent         3.6.5
[  ] rabbitmq_management_visualiser    3.6.5
[  ] rabbitmq_mqtt                     3.6.5
[  ] rabbitmq_recent_history_exchange  1.2.1
[  ] rabbitmq_sharding                 0.1.0
[  ] rabbitmq_shovel                   3.6.5
[  ] rabbitmq_shovel_management        3.6.5
[  ] rabbitmq_stomp                    3.6.5
[  ] rabbitmq_top                      3.6.5
[  ] rabbitmq_tracing                  3.6.5
[  ] rabbitmq_trust_store              3.6.5
[e*] rabbitmq_web_dispatch             3.6.5
[  ] rabbitmq_web_stomp                3.6.5
[  ] rabbitmq_web_stomp_examples       3.6.5
[  ] sockjs                            0.3.4
[e*] webmachine                        1.10.3
[root@rmq ~]# rabbitmq-plugins enable rabbitmq_web_stomp
The following plugins have been enabled:
  rabbitmq_stomp
  cowlib
  cowboy
  sockjs
  rabbitmq_web_stomp

Applying plugin configuration to rabbit@rmq... started 5 plugins.
[root@rmq ~]# rabbitmq-plugins list
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status:   * = running on rabbit@rmq
 |/
[e*] amqp_client                       3.6.5
[e*] cowboy                            1.0.3
[e*] cowlib                            1.0.1
[e*] mochiweb                          2.13.1
[  ] rabbitmq_amqp1_0                  3.6.5
[  ] rabbitmq_auth_backend_ldap        3.6.5
[  ] rabbitmq_auth_mechanism_ssl       3.6.5
[  ] rabbitmq_consistent_hash_exchange 3.6.5
[  ] rabbitmq_event_exchange           3.6.5
[  ] rabbitmq_federation               3.6.5
[  ] rabbitmq_federation_management    3.6.5
[  ] rabbitmq_jms_topic_exchange       3.6.5
[E*] rabbitmq_management               3.6.5
[e*] rabbitmq_management_agent         3.6.5
[  ] rabbitmq_management_visualiser    3.6.5
[  ] rabbitmq_mqtt                     3.6.5
[  ] rabbitmq_recent_history_exchange  1.2.1
[  ] rabbitmq_sharding                 0.1.0
[  ] rabbitmq_shovel                   3.6.5
[  ] rabbitmq_shovel_management        3.6.5
[e*] rabbitmq_stomp                    3.6.5
[  ] rabbitmq_top                      3.6.5
[  ] rabbitmq_tracing                  3.6.5
[  ] rabbitmq_trust_store              3.6.5
[e*] rabbitmq_web_dispatch             3.6.5
[E*] rabbitmq_web_stomp                3.6.5
[  ] rabbitmq_web_stomp_examples       3.6.5
[e*] sockjs                            0.3.4
[e*] webmachine                        1.10.3

After some investigation is found out that the correct path to the rabbitmq-plugins script should be /usr/sbin/rabbitmq-plugins in stead of /usr/lib/rabbitmq/bin/rabbitmq-plugins

In commit ec5aff0 the path is changed for the Redhat OS

OS: {"name"=>"RedHat", "family"=>"RedHat", "release"=>{"full"=>"6.7", "major"=>"6", "minor"=>"7"}}
Rabbitmq: 3.6.5
Erlang: 19.0.4
Puppet: 3.6.2
Rabbitmq module: 5.4.0

@wyardley
Copy link
Contributor

wyardley commented Aug 26, 2017

Also odd that the RPM from epel ships two different versions:

[root@centos-7-x64 ~]# sha1sum `which rabbitmq-plugins`
d563b0ff5e629dc242e1f7d6421ac7d8be01cd33  /sbin/rabbitmq-plugins
[root@centos-7-x64 ~]# rpm -qf `which rabbitmq-plugins`
rabbitmq-server-3.3.5-34.el7.noarch
[root@centos-7-x64 ~]# sha1sum /usr/lib/rabbitmq/bin/rabbitmq-plugins 
cbf75da49e85da1e497c5070523e8ad3186846bc  /usr/lib/rabbitmq/bin/rabbitmq-plugins
[root@centos-7-x64 ~]# rpm -qf /usr/lib/rabbitmq/bin/rabbitmq-plugins 
rabbitmq-server-3.3.5-34.el7.noarch

Same seems true with the one from the official repo:

[root@centos-7-x64 tmp]# sha1sum /usr/lib/rabbitmq/bin/rabbitmq-plugins 
cc5c3c9c130ca41dfaa3e721969a4f9367fe0096  /usr/lib/rabbitmq/bin/rabbitmq-plugins
[root@centos-7-x64 tmp]# sha1sum `which rabbitmq-plugins`
49b3a63b4c2a426573f9c0385f1dfab9c8307774  /sbin/rabbitmq-plugins
[root@centos-7-x64 tmp]# rpm -qf /usr/lib/rabbitmq/bin/rabbitmq-plugins 
rabbitmq-server-3.6.11-1.el7.noarch
[root@centos-7-x64 tmp]# rpm -qf `which rabbitmq-plugins`
rabbitmq-server-3.6.11-1.el7.noarch

Both are shell scripts; it seems like the one in /sbin is a shared wrapper used to call various programs in the lib directory. For versions with this setup, I think that one would definitely be preferred.

Reverting ec5aff0 would be easy enough, but maybe the one in /sbin doesn't exist in some versions? I'm not sure if we need to keep the second path as a backup vs. just reverting entirely?

wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue Aug 26, 2017
wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue Aug 26, 2017
wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue Aug 30, 2017
wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue Sep 1, 2017
wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue Sep 1, 2017
wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue Sep 4, 2017
wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue Sep 12, 2017
wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue Sep 12, 2017
wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue Sep 12, 2017
wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue Sep 12, 2017
wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue Sep 12, 2017
@wyardley wyardley added the bug Something isn't working label Sep 12, 2017
@wyardley
Copy link
Contributor

I updated the fix in #570 and it seems to work even with the old RMQ version on RHEL 6. We'll have to cut another major release for the module soon, so will try to get this included.

Thanks a lot for the detailed report / information.

bastelfreak added a commit that referenced this issue Sep 13, 2017
Switch back to using rabbitmq-plugins from system path (#566)
slm0n87 pushed a commit to slm0n87/puppet-rabbitmq that referenced this issue Mar 7, 2019
slm0n87 pushed a commit to slm0n87/puppet-rabbitmq that referenced this issue Mar 7, 2019
Switch back to using rabbitmq-plugins from system path (voxpupuli#566)
cegeka-jenkins pushed a commit to cegeka/puppet-rabbitmq that referenced this issue Mar 26, 2021
cegeka-jenkins pushed a commit to cegeka/puppet-rabbitmq that referenced this issue Mar 26, 2021
Switch back to using rabbitmq-plugins from system path (voxpupuli#566)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants