node-red-nodes icon indicating copy to clipboard operation
node-red-nodes copied to clipboard

node-red-node-xmpp

Open Sellig28 opened this issue 4 years ago • 10 comments

To help us understand the issue, please fill-in as much of the following information as you can: -->

Which node are you reporting an issue on?

node-red-node-xmpp

What are the steps to reproduce?

in node red xmpp, setup an xmpp server with domain like usually.

What happens?

the redirected domain is taken instead of the dns record domain

What do you expect to happen?

if example.com is my domain and my dns record is xmpp.example.com then the xmpp client must keep example.com domain for asking to xmpp server. the pb there it asked for xmpp.example.com to my xmpp server.

Please tell us about your environment:

node red under docker container

  • [ ] Node-RED version:1.03
  • [ ] node.js version:??
  • [ ] npm version:??
  • [ ] Platform/OS: docker
  • [ ] Browser:brave

Tell me if you need more information or if not clear.

THX.

Sellig28 avatar Mar 27 '21 09:03 Sellig28

Yes please - can you point to exactly which fields you are setting that you think are wrong ? If you set a server as foo.example.com I would expect it to connect to that - why should it do otherwise ?

dceejay avatar Mar 28 '21 14:03 dceejay

Also just to clarify, are you talking about SRV records? as described here: https://wiki.xmpp.org/web/SRV_Records

hardillb avatar Mar 28 '21 14:03 hardillb

Thank you for having a look.

@hardillb : Yes, if the domain is example.com and in my srv records I have a dns name like xmpp.example.com. xmpp.example.com is taken for xmpp domain whereas it is example.com.

@dceejay : I setup my domain in sever field with example.com but I saw in my prosody server that it try a connection with xmpp.example.com.

Sellig28 avatar Mar 29 '21 18:03 Sellig28

Just to be clear, where/how are you seeing the xmpp.example.com being used?

The node appears to be correctly looking up the SRV record for example.com and finding xmpp.example.com and then connecting to this device, which is the correct behaviour.

Do you mean that it is then trying to connect to xmpp.example.com as [email protected] rather than [email protected]?

hardillb avatar Mar 29 '21 18:03 hardillb

Hi Sorry for my late answer.

Yes I saw an attempt of connection with [email protected] on my server despite a good setup for my prosody server.

Sellig28 avatar Apr 10 '21 11:04 Sellig28

I have a similar problem. The A and AAAA records of my domain "example.com" point to a webserver of the company i registered this domain with. I have setup SRV records as per the XMPP specs and the SRV will point to xmpp.example.com which will point to (CNAME) dyndns.example.com which is a A record to my server at home. This setup is working fine for 6 years now and it works with multiple clients and also other s2s connections. However, Nodered running in docker seems to ignore the SRV records and instead will try to connect to the A records from example.com - which of course fails.

I'm currently investigating DNS and Docker - because funnily my old NodeRed running on a VM directly without Docker, does not have this problem.

I'll update this if i can figure it out, but thought I add this info here...

aslmx avatar Dec 26 '21 18:12 aslmx

@aslmx did you find anything that is causing this. I suspect that I have exactly the same problem running in a docker container.

meyerd avatar Jan 04 '22 13:01 meyerd

@aslmx did you find anything that is causing this. I suspect that I have exactly the same problem running in a docker container.

Nope. Haven't yet come around to find a solution.

Funnily, wheni put xmpp.example.com into the /etc/hosts of the docker host, it works somehow. Can't yet understand whats going on. Might not even be related to Nodered in the end. Keep you posted...

aslmx avatar Jan 04 '22 18:01 aslmx

Could it be an issue with ip4 inside the container and the server being ip4+ip6. However the dns returns the ip4 address ...

meyerd avatar Jan 11 '22 14:01 meyerd

Update: It only works, if I put a entry

1.2.3.4 jabberhost.com

but with the ip of xmpp.jabberhost.com where the server is really running. The userid is [email protected] and not [email protected]. So I guess there is some check for the domain name and if you put a different host to connect to from the jabber id it does not work.

meyerd avatar Jan 11 '22 14:01 meyerd