node-red / node-red-nodes

Extra nodes for Node-RED
Other
995 stars 595 forks source link

node-red-node-xmpp #786

Open Sellig28 opened 3 years ago

Sellig28 commented 3 years ago

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

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

THX.

dceejay commented 3 years ago

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 ?

hardillb commented 3 years ago

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

Sellig28 commented 3 years ago

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.

hardillb commented 3 years ago

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 user@xmpp.example.com rather than user@example.com?

Sellig28 commented 3 years ago

Hi Sorry for my late answer.

Yes I saw an attempt of connection with use@xmpp.example.com on my server despite a good setup for my prosody server.

aslmx commented 2 years ago

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...

meyerd commented 2 years ago

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

aslmx commented 2 years ago

@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...

meyerd commented 2 years ago

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

meyerd commented 2 years ago

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 user@jabberhost.com and not user@xmpp.jabberhost.com. 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.