Rocket.Chat's Community Open Call 🎤 Dec 15, 2021 Join us!

Rocketchat federation

Description

Hi I have to rocketchat servers and I want to use federation to connect two server.
I setup the federation correctly and when I hit test setup button on the federation page it says your federation setup is working but when I want to find users of another server is throws an error. the error is

Could not find the peer using DNS or Hub [federation-error-peer-no-found-using-dns]

Server Setup Information

  • Version of Rocket.Chat Server: 4.2.0-develop
  • Operating System: linux UNUNTU 20.04
  • Deployment Method: using development repo
  • Number of Running Instances: 2
  • DB Replicaset Oplog:
  • NodeJS Version: 12
  • MongoDB Version: 5
  • Proxy: nginx
  • Firewalls involved: no

Hi! Welcome to our forums.

This is the line where your error is coming from:

I really can’t tell why the test was ok but it now gives this error.

One wild guess it comes to my mind is:

Have you restarted the server after the federation configuration? Not that is necessary, but I have seen some configurations only taking effect after a server restart.

Also, can you confirm you can resolve the DNS name of the server from onde peer to another?

Hi and thanks for your help. I`ve Done your suggestions and here the result:

my first server domain is xxxx.com and another is chat.xxxx.xxxx.us
I tested the DNS from xxxx.com server and the result is:

dig srv _rocketchat._https.chat.xxxx.xxxx.us

DiG 9.16.1-Ubuntu <<>> srv _rocketchat._https.chat.xxxx.xxxx.us
Got answer:
flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
_rocketchat._https.chat.xxxx.xxxx.us. IN        SRV

ANSWER SECTION:
_rocketchat._https.chat.xxxx.xxxx.us. 3510 IN SRV 1 1 443 xxxx.com.

this is the SRV record. and here is TXT record:

dig txt rocketchat-public-key.chat.xxxx.xxxx.us

DiG 9.16.1-Ubuntu <<>> txt rocketchat-public-key.chat.xxxx.xxxx.us

Got answer:

QUESTION SECTION:
rocketchat-public-key.chat.xxxx.xxxx.us.        IN TXT

ANSWER SECTION:
rocketchat-public-key.chat.xxxx.xxxx.us. 3154 IN TXT "-----BEGIN PUBLIC KEY----- PUBLIC key-----END PUBLIC KEY-----"

I am still getting The error

UPDATE
this is the error that server throws
{"level":50,"time":"2021-11-19T09:26:17.448Z","pid":9678,"name":"Federation","section":"dns","err":{"type":"Error","message":"failed [404] Not Found","stack":"Error: failed [404] Not Found\n at Object.exports.makeErrorByStatus (packages/http.js:177:10)\n at Request._callback (packages/http.js:141:24)\n at Request.self.callback (/opt/unichat/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:185:22)\n at Request.emit (events.js:315:20)\n at Request.EventEmitter.emit (domain.js:483:12)\n at Request.<anonymous> (/opt/unichat/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:1161:10)\n at Request.emit (events.js:315:20)\n at Request.EventEmitter.emit (domain.js:483:12)\n at IncomingMessage.<anonymous> (/opt/unichat/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:1083:12)\n at Object.onceWrapper (events.js:421:28)\n at IncomingMessage.emit (events.js:327:22)\n at IncomingMessage.EventEmitter.emit (domain.js:483:12)\n at endReadableNT (_stream_readable.js:1220:12)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)","response":{"statusCode":404,"content":"Not Found","headers":{"content-length":"9","content-type":"text/plain; charset=utf-8","date":"Fri, 19 Nov 2021 09:26:17 GMT","etag":"W/\"9-0gXL1ngzMqISxa6S1zx3F4wtLyg\"","x-powered-by":"Express","connection":"close"},"data":null}},"msg":"failed [404] Not Found"}

UPDATE
this is the error that server throws
{"level":50,"time":"2021-11-19T09:26:17.448Z","pid":96788,"hostname":"vitess-us","name":"Federation","section":"dns","err":{"type":"Error","message":"failed [404] Not Found","stack":"Error: failed [404] Not Found\n at Object.exports.makeErrorByStatus (packages/http.js:177:10)\n at Request._callback (packages/http.js:141:24)\n at Request.self.callback (/opt/unichat/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:185:22)\n at Request.emit (events.js:315:20)\n at Request.EventEmitter.emit (domain.js:483:12)\n at Request.<anonymous> (/opt/unichat/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:1161:10)\n at Request.emit (events.js:315:20)\n at Request.EventEmitter.emit (domain.js:483:12)\n at IncomingMessage.<anonymous> (/opt/unichat/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:1083:12)\n at Object.onceWrapper (events.js:421:28)\n at IncomingMessage.emit (events.js:327:22)\n at IncomingMessage.EventEmitter.emit (domain.js:483:12)\n at endReadableNT (_stream_readable.js:1220:12)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)","response":{"statusCode":404,"content":"Not Found","headers":{"content-length":"9","content-type":"text/plain; charset=utf-8","date":"Fri, 19 Nov 2021 09:26:17 GMT","etag":"W/\"9-0gXL1ngzMqISxa6S1zx3F4wtLyg\"","x-powered-by":"Express","connection":"close"},"data":null}},"msg":"failed [404] Not Found"}