Ask Your Question

puppetlabs/rabbitmq: Error User and Vhost already exists

asked 2014-11-18 11:05:36 -0500

berni gravatar image


I'm trying to configure a rabbitmq server using puppetlabs/rabbitmq module, and when its executed by the first time, it works, but next time it throws an error saying:

err: /Stage[main]/Rabbit::Config/Rabbitmq_user[some_user]/ensure: change from absent to present failed: Execution of '/usr/sbin/rabbitmqctl add_user some_user some_pass' returned 2: Creating user "some_user" ... Error: user_already_exists: some_user


err: /Stage[main]/Rabbit::Config/Rabbitmq_vhost[vhost_name]/ensure: change from absent to present failed: Execution of '/usr/sbin/rabbitmqctl add_vhost vhost_name' returned 2: Creating vhost "vhost_name" ... Error: vhost_already_exists: vhost_name

The code that I'm using:

rabbitmq_vhost { 'vhost_name': }

    rabbitmq_user { 'admin_user':
        admin    => true,
        password => 'pass,

    rabbitmq_user { 'some_user':
        password => 'some_pass',

    rabbitmq_user_permissions { 'admin_user@vhost_name':
        configure_permission => '.*',
        read_permission      => '.*',
        write_permission     => '.*',

    rabbitmq_user_permissions { 'some_user@vhost_name':
        configure_permission => '.*',
        read_permission      => '.*',
        write_permission     => '.*',

Current puppet version: 2.7

Current puppetlabs/rabbitmq module version: I tried several versions

edit retag flag offensive close merge delete


Same thing here, really annoying

tibo gravatar imagetibo ( 2014-11-27 22:21:13 -0500 )edit

Same thing here too... Looking for a solution

Seraf gravatar imageSeraf ( 2014-12-01 08:37:00 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-12-07 21:21:15 -0500

lathiat gravatar image

Looks like this is fixed but not yet released:

I pulled the module from git in my Puppetfile to work around the issue:

mod 'puppetlabs/rabbitmq', git: ''

edit flag offensive delete link more


With this fix now it works. Thanks!

berni gravatar imageberni ( 2015-02-11 05:08:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-11-18 10:33:27 -0500

Seen: 831 times

Last updated: Dec 07 '14