# RabbitMQ Hostname Mismatch

**URL:** <https://forum.ansible.com/t/rabbitmq-hostname-mismatch/27825>\
**Category:** Ansible Project\
**Created:** [June 19, 2018, 7:26pm UTC](https://forum.ansible.com/t/rabbitmq-hostname-mismatch/27825 "2018-06-19T19:26:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![muhammed](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@muhammed](https://forum.ansible.com/u/muhammed)\
**Post date:** [June 19, 2018, 7:26pm UTC](https://forum.ansible.com/t/rabbitmq-hostname-mismatch/27825/1 "2018-06-19T19:26:42Z")

</div>

Farily new to ansible, so apologies if I’m missing something obvious.

Ansible version: 2.5.5

Issue: My task throws a hostname mismatch error when adding a new vhost on a server that contains a fresh installation of rabbitMQ:

`

- name: Ensure RabbitMQ virtual host exists  
rabbitmq\_vhost:  
name: “{{ item.name|slugify }}”  
state: present  
when: inventory\_hostname in groups[‘db-servers’]

`

Error description:

`  
fatal: [my-server-address]: FAILED! =\> {“changed”: false, “cmd”: “/usr/sbin/rabbitmqctl -q -n rabbit list\_vhosts name tracing”, “msg”: "Error:\*\*\*\*\*\*\*\*@localhost’

- home dir: /var/lib/rabbitmq
- cookie hash: pD9UkaDbh5qROT8GfbNTrA==",  
“rc”: 69, “stderr”: "Error: unable to connect to node rabbit@localhost: nodedown

DIAGNOSTICS

---

<div class="post-metadata">

**Author:** ![Tchia04](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Post date:** [June 19, 2018, 9:06pm UTC](https://forum.ansible.com/t/rabbitmq-hostname-mismatch/27825/2 "2018-06-19T21:06:22Z")

</div>

Is SSL enabled on the rabbitmq server?

---

<div class="post-metadata">

**Author:** ![muhammed](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@muhammed](https://forum.ansible.com/u/muhammed)\
**Post date:** [June 19, 2018, 9:14pm UTC](https://forum.ansible.com/t/rabbitmq-hostname-mismatch/27825/3 "2018-06-19T21:14:15Z")

</div>

It’s a stock standard Ubuntu 18.04 server, all I did was install rabbitmq-server via apt. I have not changed any of the config files, so I’m assuming SSL is disabled by default.

---

<div class="post-metadata">

**Author:** ![Pcis](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pcis](https://forum.ansible.com/u/Pcis)\
**Post date:** [January 31, 2019, 11:33am UTC](https://forum.ansible.com/t/rabbitmq-hostname-mismatch/27825/4 "2019-01-31T11:33:02Z")

</div>

Did you manage to fix this issue, I’m having the same problem
