# Datagerry: Cannot connect with Mongod. Tested working connection with mongosh

**URL:** <https://community.datagerry.com/t/datagerry-cannot-connect-with-mongod-tested-working-connection-with-mongosh/586>\
**Category:** Community Support\
**Created:** [April 30, 2024, 9:40am UTC](https://community.datagerry.com/t/datagerry-cannot-connect-with-mongod-tested-working-connection-with-mongosh/586 "2024-04-30T09:40:39Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![sink1](https://dub1.discourse-cdn.com/flex013/user_avatar/community.datagerry.com/sink1/32/790_2.png) [@sink1](https://community.datagerry.com/u/sink1)\
**Post date:** [May 14, 2024, 7:14am UTC](https://community.datagerry.com/t/datagerry-cannot-connect-with-mongod-tested-working-connection-with-mongosh/586/16 "2024-05-14T07:14:28Z")

</div>

Hi,

I changed the vhost settings for datagerry on Rabbitmq from . . .\* to .\* .\* .\*

I did get a login, but for some reason datagerry is trying to app / instead of the datagerry vhost on our test rabbbitmq server. Below is the configuration. Of note is that it will work if I use the guest user with access to /, but this is not actually permitted in a production environment nor best practive.

Does my following cmdb.conf look correct to access a RabbitMq vhost called datagerry?

```auto
[MessageQueueing]
host = 10.1.1.3
#host = 127.0.0.1
port = 5672
username = datagerry
password = redacted
#username = guest
#password = redacted
exchange = datagerry.eventbus
connection_attempts = 2
retry_delay = 6
;use_tls = true

```

Log file is here showing messages when I start datagerry up?

```auto
 08:25:03.461 [info] <0.12057.14> Successfully set permissions for 'datagerry' in virtual host 'datagerry' to '.*', '.*', '.*'
 09:05:46.777 [info] <0.15121.14> accepting AMQP connection <0.15121.14> (cmdb1.x.y:41306 -> rabbit1.x.y:5672)
 09:05:46.777 [info] <0.15124.14> accepting AMQP connection <0.15124.14> (cmdb1.x.y:41312 -> rabbit1.x.y:5672)
 09:05:46.780 [error] <0.15121.14> Error on AMQP connection <0.15121.14> (cmdb1.x.y:41306 -> rabbit1.x.y:5672, user: 'datagerry', state: opening):
access to vhost '/' refused for user 'datagerry'
 09:05:46.781 [error] <0.15124.14> Error on AMQP connection <0.15124.14> (cmdb1.x.y:41312 -> rabbit1.x.y:5672, user: 'datagerry', state: opening):
access to vhost '/' refused for user 'datagerry'
 09:05:46.781 [info] <0.15121.14> closing AMQP connection <0.15121.14> (cmdb1.x.y:41306 -> rabbit1.x.y:5672, vhost: 'none', user: 'datagerry')
 09:05:46.782 [info] <0.15124.14> closing AMQP connection <0.15124.14> (cmdb1.x.y:41312 -> rabbit1.x.y:5672, vhost: 'none', user: 'datagerry')
 09:05:46.783 [info] <0.15132.14> Closing all channels from connection 'cmdb1.x.y:41306 -> rabbit1.x.y:5672' because it has been closed
 09:05:46.783 [info] <0.15134.14> Closing all channels from connection 'cmdb1.x.y:41312 -> rabbit1.x.y:5672' because it has been closed
 09:05:47.032 [info] <0.15152.14> accepting AMQP connection <0.15152.14> (cmdb1.x.y:41322 -> rabbit1.x.y:5672)
 09:05:47.038 [error] <0.15152.14> Error on AMQP connection <0.15152.14> (cmdb1.x.y:41322 -> rabbit1.x.y:5672, user: 'datagerry', state: opening):
access to vhost '/' refused for user 'datagerry'
 09:05:47.039 [info] <0.15152.14> closing AMQP connection <0.15152.14> (cmdb1.x.y:41322 -> rabbit1.x.y:5672, vhost: 'none', user: 'datagerry')
 09:05:47.040 [info] <0.15160.14> Closing all channels from connection 'cmdb1.x.y:41322 -> rabbit1.x.y:5672' because it has been closed
 09:05:47.042 [info] <0.15155.14> accepting AMQP connection <0.15155.14> (cmdb1.x.y:41336 -> rabbit1.x.y:5672)
 09:05:47.056 [error] <0.15155.14> Error on AMQP connection <0.15155.14> (cmdb1.x.y:41336 -> rabbit1.x.y:5672, user: 'datagerry', state: opening):
access to vhost '/' refused for user 'datagerry'
 09:05:47.066 [info] <0.15155.14> closing AMQP connection <0.15155.14> (cmdb1.x.y:41336 -> rabbit1.x.y:5672, vhost: 'none', user: 'datagerry')
 09:05:47.067 [info] <0.15165.14> Closing all channels from connection 'cmdb1.x.y:41336 -> rabbit1.x.y:5672' because it has been closed

```

---

_[View the full topic](https://community.datagerry.com/t/datagerry-cannot-connect-with-mongod-tested-working-connection-with-mongosh/586)._
