Federation - Messages sent but not received

Hi guys, we are trying to set up a federation with 2 Rocket Chat servers in our LAN, we created the SRV and TXT records in our DNSs. Here are the DNS configurations for these domains:

$ dig txt rocketchat-public-key.domain1.com +short
"-----BEGIN PUBLIC KEY-----MIIBIjANBgkf[...]" "[...]ritpydbGSJ4PQIDAQAB-----END PUBLIC KEY-----"

$ dig srv _rocketchat._https.domain1.com +short
1 1 443 rchat.domain1.com.




$ dig txt rocketchat-public-key.domain2.com +short
"-----BEGIN PUBLIC KEY-----MIIBIjANBgkq[...]" "O+YZimjrelO1L[...]wnBaS+i0vuP" "QRLAWh[...]GIgcKnbT" "h0ko5ZZV[...]waTgXZoQgN3/u" "[...]DAQAB-----END PUBLIC KEY-----"

$ dig srv _rocketchat._https.domain2.com +short
1 1 443 rchat.domain2.com.

We configured the domains as “domain1.com” and “domain2.com” respectively in the Federation page.

Also the “Test setup” button show this message: “Your federation setup is working and other servers can find you!

So, here is issue: Even though we can search and find users from the other domains in the directory, when we try to message them, the message is never received on the other end.

Also, I ran a tcpdump in the rchat.domain1.com server and tried to message some user from the other domain. For some reason, instead of seeing packages from rchat.domain1.com to rchat.domain2.com, all I saw was rchat opening connections to itself (on TCP/443) to send those messages… :thinking:

I’ve seen other posts of people having the same federation issues with servers being able to send messages, but not receive. But it was usually some problem with the TXT records not being properly split.
I can’t find what’s wrong with our DNS entries, or if it is something else. Any help is appreciated. :slightly_smiling_face:

Server Setup Information

  • Version of Rocket.Chat Server: 3.4.2
  • Operating System: CentOS 8.2.2004
  • Deployment Method: tar
  • Number of Running Instances: 3, one in each domain
  • NodeJS Version: v12.14.0
  • MongoDB Version: 4.0.19
  • Proxy: apache
1 Like

I’m experiencing the same problem with 3.4.2. I subsummed the current situation in https://github.com/RocketChat/Rocket.Chat/issues/18432

1 Like

As you mentioned in your github issue, I believe there is a small mistake in the DNS configuration docs. I checked the sources and I believe the correct way to set up the SRV and TXT records is as stated above.

1 Like

Hey guys, I’m experiencing the same problem with versio n 3.5 in Ubuntu 20.04 Server.
So does this mean federation is not working at all? Does anyone managed to get this working properly?

1 Like

What do you mean? I don’t understand the “TXT records not properly split” part?!

I mean I found things like this thread: https://forums.rocket.chat/t/federation-problems/6892/11

They had a similar problem, but it was just because they didn’t split the long public key in several strings on the TXT record.

Here we are with the same problem. We have 4 internal servers that must communicate via federation to retire the current system in xmpp.

All domains are independent and in separate company networks, but accessible to each other.

We made an effort to upgrade the Rocket.Chat servers to version 3.5.2, but the problem remains.

It is possible to search for users from other domains in Directory - External Users, however when sending a message nothing happens. Users from other domains are always online in the client tool (any version).

It is a critical bug because it prevents the final implementation of the solution, as communication between domains is a minimum requirement.

I was able to fix my Domain issue by following your method, Now I can find users in both servers, Can send msg but other ends can’t receive.