# Connection failed to broker: mqtt://192.168.0.136:1883

**URL:** <https://discourse.nodered.org/t/connection-failed-to-broker-mqtt-192-168-0-136-1883/53506>\
**Category:** General\
**Created:** [10 November 2021 13:51 UTC](https://discourse.nodered.org/t/connection-failed-to-broker-mqtt-192-168-0-136-1883/53506 "2021-11-10T13:51:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hiba](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@hiba](https://discourse.nodered.org/u/hiba)\
**Post date:** [10 November 2021 13:51 UTC](https://discourse.nodered.org/t/connection-failed-to-broker-mqtt-192-168-0-136-1883/53506/1 "2021-11-10T13:51:09Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/3/43f64884b31d5d6f4071397641482f4cf3872bf2.png)  
I've read posts on forums but haven't found anything that solves my problem, I'm using version 2.x,  
please help me it is for my course

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [10 November 2021 13:58 UTC](https://discourse.nodered.org/t/connection-failed-to-broker-mqtt-192-168-0-136-1883/53506/2 "2021-11-10T13:58:06Z")

</div>

> [@Connection to MQTT broker not possible](https://discourse.nodered.org/t/connection-to-mqtt-broker-not-possible/42455/5):
>
> What version of mosquitto do you have installed ? In your mosquitto.conf file add the lines below because by default the new version 2.0 doesnt allow remote connections by default. [Link](https://mosquitto.org/blog/2020/12/version-2-0-0-released/) allow\_anonymous true listener 1883

---

<div class="post-metadata">

**Author:** ![hiba](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@hiba](https://discourse.nodered.org/u/hiba)\
**Post date:** [11 November 2021 01:32 UTC](https://discourse.nodered.org/t/connection-failed-to-broker-mqtt-192-168-0-136-1883/53506/3 "2021-11-11T01:32:26Z")

</div>

I installed version 2.0

---

<div class="post-metadata">

**Author:** ![hiba](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@hiba](https://discourse.nodered.org/u/hiba)\
**Post date:** [11 November 2021 01:50 UTC](https://discourse.nodered.org/t/connection-failed-to-broker-mqtt-192-168-0-136-1883/53506/4 "2021-11-11T01:50:56Z")

</div>

how to add the lines below to mosquitto.conf file? and what are the lines below? I've read the link but, I still don't understand, what should I do, I sorry sir, because I am an amateur in this case

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [11 November 2021 07:47 UTC](https://discourse.nodered.org/t/connection-failed-to-broker-mqtt-192-168-0-136-1883/53506/5 "2021-11-11T07:47:03Z")

</div>

Do you know where the config file is? If so then open it with a text editor (not a word processor) and add those lines to the end.

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [11 November 2021 08:51 UTC](https://discourse.nodered.org/t/connection-failed-to-broker-mqtt-192-168-0-136-1883/53506/6 "2021-11-11T08:51:38Z")

</div>

also we understand from your screenshot, you are running the Mosquitto MQTT broker on the same machine as Node-red.

can you confirm that the internal IP of your computer is indeed 192.168.0.136  
by running `ipconfig` in windows command prompt

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [11 November 2021 08:55 UTC](https://discourse.nodered.org/t/connection-failed-to-broker-mqtt-192-168-0-136-1883/53506/7 "2021-11-11T08:55:12Z")

</div>

Also, if the broker is on the same machine as node red and you don't want to access the broker from other machines on your network then you can specify `localhost` instead of the IP address, and then you don't need to change the config file.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [10 January 2022 08:55 UTC](https://discourse.nodered.org/t/connection-failed-to-broker-mqtt-192-168-0-136-1883/53506/8 "2022-01-10T08:55:28Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
