# MQTT - Cannot connect to server

**URL:** <https://forum.inductiveautomation.com/t/mqtt-cannot-connect-to-server/86271>\
**Category:** Ignition\
**Created:** [February 23, 2024, 4:32pm UTC](https://forum.inductiveautomation.com/t/mqtt-cannot-connect-to-server/86271 "2024-02-23T16:32:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kcui](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcui/32/51446_2.png) [@kcui](https://forum.inductiveautomation.com/u/kcui)\
**Post date:** [February 23, 2024, 4:32pm UTC](https://forum.inductiveautomation.com/t/mqtt-cannot-connect-to-server/86271/1 "2024-02-23T16:32:43Z")

</div>

Hi - I am attempting to test some MQTT functionality. I have the Transmitter setup, but it cannot connect to the Chariot Server. I have the MQTT Transmission module installed.

Do I need the MQTT Distributor module to be installed as well?

Here are the log messages:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/7/a7e5e4c6a7a8ed0afe0cd54498b03b3d9268f0f7.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 23, 2024, 4:38pm UTC](https://forum.inductiveautomation.com/t/mqtt-cannot-connect-to-server/86271/2 "2024-02-23T16:38:34Z")

</div>

If you aren't using an external broker, yes.

---

<div class="post-metadata">

**Author:** ![kcui](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcui/32/51446_2.png) [@kcui](https://forum.inductiveautomation.com/u/kcui)\
**Post date:** [February 23, 2024, 5:08pm UTC](https://forum.inductiveautomation.com/t/mqtt-cannot-connect-to-server/86271/3 "2024-02-23T17:08:27Z")

</div>

Thanks.  
So MQTT Transmission doesn't automatically connect to the Ignition gateway / Tag Provider and grab the tags? The description of the Transmission module implied it didn't need anything else, hence my confusion. Sorry for the basic question, just want to make sure my understanding of the architecture is correct.

The MQTT / Edge architecture diagrams in the Ignition manual documents are also unclear on this point.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/3/3304bcf14bf074892dfb16daec1eb20d1fd6b4c2.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 23, 2024, 5:16pm UTC](https://forum.inductiveautomation.com/t/mqtt-cannot-connect-to-server/86271/4 "2024-02-23T17:16:16Z")

</div>

Well, it can connect to local tags, but to then do what? The point of MQTT is to transmit live values from one system to another.

See this architecture example:

[https://docs.chariot.io/display/CLD80/Getting+Started:+Two+Ignition+Architecture](https://docs.chariot.io/display/CLD80/Getting+Started:+Two+Ignition+Architecture)

Fundamentally, MQTT doesn't work without a broker **somewhere**.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 23, 2024, 5:20pm UTC](https://forum.inductiveautomation.com/t/mqtt-cannot-connect-to-server/86271/5 "2024-02-23T17:20:41Z")

</div>

> [@pturmel](#):
>
> Fundamentally, MQTT doesn't work without a broker **somewhere**.

I think this is the key thing to understand.

Many companies already have an MQTT broker in their infrastructure, but if not, the Distributor module can provide a pared down broker.

---

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [February 23, 2024, 5:24pm UTC](https://forum.inductiveautomation.com/t/mqtt-cannot-connect-to-server/86271/6 "2024-02-23T17:24:41Z")

</div>

If I'm reading [here](https://cirrus-link.com/mqtt-broker-iiot-mqtt-servers/) correctly, Chariot _is_ meant to be an MQTT broker? I guess in that case something else is going on.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 23, 2024, 5:25pm UTC](https://forum.inductiveautomation.com/t/mqtt-cannot-connect-to-server/86271/7 "2024-02-23T17:25:46Z")

</div>

> [@Felipe\_CRM](#):
>
> Chariot _is_ meant to be an MQTT broker?

It's a broker-as-a-service run by CL.

But OP must be mistaken, because his logs show him trying to connect to a broker at localhost.

---

<div class="post-metadata">

**Author:** ![kcui](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcui/32/51446_2.png) [@kcui](https://forum.inductiveautomation.com/u/kcui)\
**Post date:** [February 23, 2024, 5:25pm UTC](https://forum.inductiveautomation.com/t/mqtt-cannot-connect-to-server/86271/8 "2024-02-23T17:25:56Z")

</div>

Ok, I think I know where I am going wrong. I am misunderstanding the Server configuration page (and the architecture in general). My use case is to use Transmission to pull data from my Edge installation to a remote MQTT broker (ultimately, to a remote database or historian).

Currently, I do not have a "primary" machine - this would be client supplied if they wished to get data (and we would configure MQTT appropriately). This could be Ignition or some other third party broker.

So where I have gone wrong is:

- I thought the Server tab in the Transmission settings was to set the data source for the Transmitter. It seems like this is the destination(s) for the Transmitter data.
- I thought I could set up a Transmitter without a destination server just to see if I could browse the data but (silly me) I do need a broker to subscribe, and (I presume) it needs to be explicitly set in the Servers tab

Is this accurate?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/1/d1fee5b42114628b3a4d630ed84bf5f41bdeda1e.png)'

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/7/c79a57537f68c7d789f4b36647e8a3a7d75a874b.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 23, 2024, 5:29pm UTC](https://forum.inductiveautomation.com/t/mqtt-cannot-connect-to-server/86271/9 "2024-02-23T17:29:28Z")

</div>

> [@Felipe\_CRM](#):
>
> Chariot _is_ meant to be an MQTT broker?

Yes, but the OP's screenshot was trying to connect to a broker at _localhost_. And there wasn't one.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [February 23, 2024, 5:53pm UTC](https://forum.inductiveautomation.com/t/mqtt-cannot-connect-to-server/86271/10 "2024-02-23T17:53:52Z")

</div>

That is correct, you'll need a "primary" machine that can be 1 or 2 servers. For Ignition, you can run with just MQTT Engine and use a separate server for the MQTT Broker (EMQx, Mosquitto, etc), or use the MQTT Distributor module to run one directly on the Ignition server.
