-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Clustering not working when using a ROOT_URL with a subpath #13200
Description
Description:
When configuring a ROOT_URL for Rocket.Chat on a subpath (ex: https://awsome.tld/rocketchat1), the clustering feature does not seem to work properly. The instances are discovered, but the broadcast status as displayed in the admin's information page ("Current Status > Connected") is always empty and the "Current Status > Status" is either set to "waiting" or "connecting" but never "connected". I tried activating the debug & info logs in the server settings and saw this:
StreamBroadcast ➔ Auth.info prevent self connect 10.42.11.126:3000
StreamBroadcast ➔ Connection.info connecting in 10.42.12.64:3000
If I change the ROOT_URL to https://awsome.tld, I start to see these logs:
StreamBroadcast ➔ Connection.info connecting in 10.42.12.64:3000
StreamBroadcast ➔ Auth.info Authorizing with 10.42.12.64:3000
StreamBroadcast ➔ Auth.info broadcastAuth with 10.42.12.64:3000 true
and the instances seem to be communicating correctly again in the Admin's Information page.
--
Steps to reproduce:
- Set a ROOT_URL with a subpath
- Create a Cluster with several instances of Rocket.Chat
Expected behavior:
The broadcast cluster should work event with a subpath.
Actual behavior:
The Rocket.Chat instances see each other but do no communicate an broadcast notifications to each other.
Server Setup Information:
- Version of Rocket.Chat Server: 0.73.1
- Operating System: PhotonOS 2.0
- Deployment Method: docker
- Number of Running Instances: 3
- DB Replicaset Oplog: Enabled
- NodeJS Version: 8.11.3
- MongoDB Version: 4.0.5