# Can't receive XMPP messages (but sending works)

**URL:** <https://discourse.nodered.org/t/cant-receive-xmpp-messages-but-sending-works/19874>\
**Category:** General\
**Created:** [3 January 2020 17:28 UTC](https://discourse.nodered.org/t/cant-receive-xmpp-messages-but-sending-works/19874 "2020-01-03T17:28:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![eboettn](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@eboettn](https://discourse.nodered.org/u/eboettn)\
**Post date:** [3 January 2020 17:28 UTC](https://discourse.nodered.org/t/cant-receive-xmpp-messages-but-sending-works/19874/1 "2020-01-03T17:28:00Z")

</div>

Greetings!

I am using the xmpp node in hopes of being able to receive xmpp messages. I run an openfire xmpp server at home and everything runs fine outside of node-red. All clients receive messages and all clients can use the chat room I set up.

However, node-red doesn't receive said messages. The node says it's connected but no messages ever come in. I CAN send... but just can NOT receive. Right now, it's simple - just the xmpp in node connected to a debug output.

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [3 January 2020 18:57 UTC](https://discourse.nodered.org/t/cant-receive-xmpp-messages-but-sending-works/19874/2 "2020-01-03T18:57:58Z")

</div>

Did you set the debug output to "complete msg object" and does it make difference ?

---

<div class="post-metadata">

**Author:** ![eboettn](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@eboettn](https://discourse.nodered.org/u/eboettn)\
**Post date:** [3 January 2020 20:03 UTC](https://discourse.nodered.org/t/cant-receive-xmpp-messages-but-sending-works/19874/3 "2020-01-03T20:03:13Z")

</div>

What I have figured out is that it needs something to "force it" - it's like it doesn't stay listening to messages coming in, if that makes sense.

If I make a chance on my flow, and then big deploy - the last message will come through. (Doesn't matter if chance the debug output to complete msg object or not.)

But that's not what I want - I want it to always listen and automatically fire off when it gets a message. Do I just misunderstand how it works? I'm a newbie to node-red AND xmpp so I'm really lost..... 🙂

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [3 January 2020 20:13 UTC](https://discourse.nodered.org/t/cant-receive-xmpp-messages-but-sending-works/19874/4 "2020-01-03T20:13:02Z")

</div>

Could you please post your flow here, it might help us to help you.

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [3 January 2020 20:16 UTC](https://discourse.nodered.org/t/cant-receive-xmpp-messages-but-sending-works/19874/5 "2020-01-03T20:16:35Z")

</div>

Another thought, is your router configured to forward xmpp ports?

---

<div class="post-metadata">

**Author:** ![eboettn](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@eboettn](https://discourse.nodered.org/u/eboettn)\
**Post date:** [3 January 2020 20:36 UTC](https://discourse.nodered.org/t/cant-receive-xmpp-messages-but-sending-works/19874/6 "2020-01-03T20:36:07Z")

</div>

```auto
Here you go. I redacted my xmpp server specfics (username) and you'll see *USER* and *MYDOMAIN* in replace of it.

[{"id":"d48d24a8.3f8a08","type":"xmpp in","z":"881ed9d4.6d7318","name":"XMPP IN","server":"ab703856.c0ba98","to":"[weather@*MYDOMAIN*.com](mailto:weather@*MYDOMAIN*.com)","join":false,"x":159,"y":2610,"wires":[["1907b379.81993d"],[]]},{"id":"1907b379.81993d","type":"debug","z":"881ed9d4.6d7318","name":"xmpp debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":369,"y":2607,"wires":[]},{"id":"ab703856.c0ba98","type":"xmpp-server","z":"","user":"[*USER*@*MYDOMAIN*.com](mailto:*USER*@*MYDOMAIN*.com)","nickname":"[*USER*@*MYDOMAIN*.com](mailto:*USER*@*MYDOMAIN*.com)"}]

```

---

<div class="post-metadata">

**Author:** ![eboettn](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@eboettn](https://discourse.nodered.org/u/eboettn)\
**Post date:** [3 January 2020 20:36 UTC](https://discourse.nodered.org/t/cant-receive-xmpp-messages-but-sending-works/19874/7 "2020-01-03T20:36:58Z")

</div>

I have set up port forwarding to make the server work in general. (Which runs on the same Linux VM as node-red).

ALL other clients can get the messages. It's only node-red that's giving me heartache.

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [3 January 2020 20:46 UTC](https://discourse.nodered.org/t/cant-receive-xmpp-messages-but-sending-works/19874/8 "2020-01-03T20:46:29Z")

</div>

> [@eboettn](#):
>
> Which runs on the same Linux VM as node-red

Which platform is the VM running on?

---

<div class="post-metadata">

**Author:** ![eboettn](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@eboettn](https://discourse.nodered.org/u/eboettn)\
**Post date:** [3 January 2020 21:35 UTC](https://discourse.nodered.org/t/cant-receive-xmpp-messages-but-sending-works/19874/9 "2020-01-03T21:35:53Z")

</div>

Not sure if this matters, but both node-red and openfire are running in docker. That VM is ubuntu.

All of my VMs are on proxmox.

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [3 January 2020 22:11 UTC](https://discourse.nodered.org/t/cant-receive-xmpp-messages-but-sending-works/19874/10 "2020-01-03T22:11:12Z")

</div>

Oh, I'm sure it does matter somehow. I cannot help you directly as I have no XMPP instances I could test, but I am sure others will be able to.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [3 January 2020 23:22 UTC](https://discourse.nodered.org/t/cant-receive-xmpp-messages-but-sending-works/19874/11 "2020-01-03T23:22:35Z")

</div>

I have mine configured more like this (just a public xmpp serverI found)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/25b72ce8f8b74ffd389b5dfd52db4afb7b72c5da.png)  
and  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e92e42b1b33c5c8e01586a23d3a777382a1d80ef.png)

It should receive messages right away.
