question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RabbitMQ Module Incompatible with Rabbit 3.8+

See original GitHub issue

Description of Issue

When creating a user with Salt in RabbitMQ 3.8.0 I receive the following error:

2019-11-20 10:56:30,492 [salt.state       :322 ][ERROR   ][28696] Error: RabbitMQ command failed: Error:
{:undef, [{:rabbit_auth_backend_internal, :check_user_login, ["admin", [password: "adminPassword1"]], []}, {:erl_eval, :do_apply, 6, [file: 'erl_eval.erl', line: 680]}, {:rpc, :"-handle_call_call/6-fun-0-", 5, [file: 'rpc.erl', line: 197]}]}

This issue is partly because rabbit_auth_backend was renamed in 3.5.7 but it is being used in 3.8 because of an output format change.

The test for version is here: https://github.com/saltstack/salt/blob/master/salt/modules/rabbitmq.py#L459 (But it fails for 3.8)

This looks like one of the problems, as the format of rabbitmqctl status changed in 3.8 so this regex no longer works: https://github.com/saltstack/salt/blob/master/salt/modules/rabbitmq.py#L445

And it falls back to https://github.com/saltstack/salt/blob/master/salt/modules/rabbitmq.py#L486

Rabbitmq Status before 3.8

$ rabbitmqctl status
[{pid,305}, {running_applications,
    [{rabbit,"RabbitMQ","3.7.21"},

RabbitMQ status in 3.8

$ rabbitmqctl status
Status of node rabbit ...
Runtime

OS PID: 4712
OS: Linux
Uptime (seconds): 3294202
RabbitMQ version: 3.8.0
Node name: rabbit@dev-g-rbt1-01
Erlang configuration: Erlang/OTP 22 [erts-10.5.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:64] [hipe]
Erlang processes: 539 used, 1048576 limit
Scheduler run queue: 1
Cluster heartbeat timeout (net_ticktime): 60

One thing that works is:

rabbitmqctl eval 'rabbit_access_control:check_user_login(<<"admin">>, [{password, <<"adminPassword1">>}]).'

Setup

rabbitadminUser:
  rabbitmq_user.present:
    - name: admin
    - password: "adminPassword1"
    - tags:
      - administrator
    - perms:
      - '/':
        - ".*"
        - ".*"
        - ".*"

Steps to Reproduce Issue

(Include debug logs if possible and relevant.)

Run a RabbitMQ 3.8 and try to create a user with Salt RabbitMQ user provider.

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

$ salt-minion -V
/usr/lib/python2.7/site-packages/salt/scripts.py:198: DeprecationWarning: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date.  Salt will drop support for Python 2.7 in the Sodium release or later.
Salt Version:
           Salt: 2019.2.0

Dependency Versions:
           cffi: 1.6.0
       cherrypy: Not Installed
       dateutil: 2.6.0
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.16 (default, Sep 13 2019, 20:28:21)
   python-gnupg: Not Installed
         PyYAML: 3.10
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist:
         locale: UTF-8
        machine: x86_64
        release: 4.14.146-119.123.amzn2.x86_64
         system: Linux
        version: Not Installed

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
L4rS6commented, Jan 20, 2020

Remove stale tag. This should definitely be fixed.

0reactions
sagetheragecommented, May 20, 2020

fixed in above PR will be released in Sodium - closing

Read more comments on GitHub >

github_iconTop Results From Across the Web

RabbitMQ Erlang Version Requirements
Unsupported RabbitMQ Series Minimum required Erlang/OTP Maximum supported Erlang... 3.8.8; 3.8.7; 3.8.6; 3.8.5; 3.8.4 21.3 23.x 3.8.3; 3.8.2; 3.8.1; 3.8.0 21.3 22.x 3.7.18; 3.7.17; 3.7.16; 3.7.15...
Read more >
Rolling upgrade from 3.7.18 to 3.8.0 failed, error due to feature ...
Rolling upgrades are possible only between compatible RabbitMQ and Erlang versions. Starting RabbitMQ 3.8 RabbitMQ 3.8.0 comes with a feature ...
Read more >
What is the RabbitMQ feature flag? - CloudAMQP
Feature flags are new to RabbitMQ version 3.8. These flags define a RabbitMQ node's ability to become a part of a cluster.
Read more >
Installs, configures, and manages RabbitMQ. - Puppet Forge
The rabbitmq module sets up rabbitmq and has a number of providers to manage everything from vhosts to exchanges after setup. This module...
Read more >
Unable to start plugins for RabbitMQ - Stack Overflow
PS C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.0\sbin> .\rabbitmq-plugins.bat enable rabbitmq_management The directory name is invalid.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found