# \[SOLVED\] Two (or more) brokers in mqtt.cfg?

**URL:** <https://community.openhab.org/t/solved-two-or-more-brokers-in-mqtt-cfg/52252>\
**Category:** Installation\
**Tags:** mqtt\
**Created:** [September 25, 2018, 9:11am UTC](https://community.openhab.org/t/solved-two-or-more-brokers-in-mqtt-cfg/52252 "2018-09-25T09:11:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbubble62](https://community.openhab.org/user_avatar/community.openhab.org/bbubble62/32/69497_2.png) [@bbubble62](https://community.openhab.org/u/bbubble62)\
**Post date:** [September 25, 2018, 9:11am UTC](https://community.openhab.org/t/solved-two-or-more-brokers-in-mqtt-cfg/52252/1 "2018-09-25T09:11:11Z")

</div>

Hi Group,

Is it possible to have two or more brokers in the mqtt.cfg file (openhab 2.3.0) ?

mosquitto.url=tcp://localhost:1883  
mosquitto.user=mqtt  
mosquitto.pwd=xxxx  
mosquitto.qos=1

ttn.url=tcp://eu.thethings.network:1883  
ttn.user=thatsme  
ttn.pwd=xxxxx  
ttn.qos=1

User and password are correctly entered !!

After restart I see the following error in the log:

2018-09-25 11:00:15.613 [ERROR] [org.apache.felix.configadmin] - Cannot use configuration org.openhab.mqtt for [org.openhab.core.scriptengine.action.ActionService, org.osgi.service.cm.ManagedService, id=356, bundle=226/mvn:org.openhab.action/org.openhab.action.mqtt/1.12.0]: No visibility to configuration bound to mvn:org.openhab.io/org.openhab.io.transport.mqtt/1.12.0

When using mosquitto DIRECTLY form the command line all works fine:  
$ mosquitto\_sub -h eu.thethings.network -p 1883 -u ‘thatsme’ -P ‘xxxx’ -v -t ‘+/devices/+/up’

Any idea of what could be wrong?

-ben

---

<div class="post-metadata">

**Author:** ![vzorglub](https://community.openhab.org/user_avatar/community.openhab.org/vzorglub/32/17166_2.png) [@vzorglub](https://community.openhab.org/u/vzorglub)\
**Post date:** [September 25, 2018, 10:35am UTC](https://community.openhab.org/t/solved-two-or-more-brokers-in-mqtt-cfg/52252/2 "2018-09-25T10:35:23Z")

</div>

Do you have the mqtt action installed?  
If yes, uninstall it  
restart OH  
re-install it but only if you need it

---

<div class="post-metadata">

**Author:** ![bbubble62](https://community.openhab.org/user_avatar/community.openhab.org/bbubble62/32/69497_2.png) [@bbubble62](https://community.openhab.org/u/bbubble62)\
**Post date:** [September 25, 2018, 11:39am UTC](https://community.openhab.org/t/solved-two-or-more-brokers-in-mqtt-cfg/52252/3 "2018-09-25T11:39:44Z")

</div>

Yep, that solved the problem 🙂

Many thanks !

---

<div class="post-metadata">

**Author:** ![vzorglub](https://community.openhab.org/user_avatar/community.openhab.org/vzorglub/32/17166_2.png) [@vzorglub](https://community.openhab.org/u/vzorglub)\
**Post date:** [September 25, 2018, 12:58pm UTC](https://community.openhab.org/t/solved-two-or-more-brokers-in-mqtt-cfg/52252/4 "2018-09-25T12:58:46Z")

</div>

Please mark the thread as solved. Thanks
