Desktop notifications not working between instances
Rocket.Chat Version: 0.57.0 Running Instances: 3 DB Replicaset OpLog: enabled Node Version: v4.8.1
Desktop notifications are not working, if a user is currently on another instance than me. When a user is on the same instance the desktop notification is working without issues.
We are using three instances on different locations. All instances are shown with status 'waiting' on the admin page, also each instance is only reachable through https.
Our setup:

Docker-Compose file for each instance:
version: '3'
services:
rocketchat:
restart: always
image: rocketchat/rocket.chat:0.57.0
volumes:
- ./uploads:/app/uploads
environment:
- PORT=443
- INSTANCE_IP=<EXTERNAL IP>
- NODE_TLS_REJECT_UNAUTHORIZED=0
- ROOT_URL=https://<MAIN DOMAIN>
- MONGO_URL=mongodb://user:password@node1:27017,node2:27017,node3:27017/rocketchat?ssl=true&replicaSet=rs0&authSource=admin
- MONGO_OPLOG_URL=mongodb://user:password@<MONGODB ON SAME HOST>:27017/local?ssl=true&authSource=admin
ports:
- "127.0.0.1:3000:443"
logging:
driver: syslog
options:
syslog-facility: daemon
we have the same problem: #6341
I'm trying to remember the specifics, but we had multiple instances running (4 at the time) and were having inconsistent behavior w.r.t. notifications until we set INSTANCE_IP. Similar issues seem to be:
- https://github.com/RocketChat/Rocket.Chat/issues/4019
- https://github.com/RocketChat/Rocket.Chat/issues/4085
- https://github.com/RocketChat/Rocket.Chat/issues/4299
Have you tried setting INSTANCE_IP?
We already set the INSTANCE_IP environment variable in our docker-compose file (see the example below the image in my first post) or is there an issue with this?
Also the messages are displayed instantly, only the desktop notifications are not working. There are no error messages in the logfiles of the instances.
Right--sorry I missed that above. Yes, our messages went through as well--just like yours, it was the notifications. Sorry I can't be of more help--just wanted to share what worked for us.
I have found out that this issue only appears if the inter-connect between the instances is going through https. If we speak plain http between the instances the desktop notifications are working.
So maybe SSL support for inter-connection should be implemented.
@N4IR0 how do you set that the connection is done via ssl? We have an really identical setup for our rocket.chat cluster, but set the "Instance-IP" to the corresponding LAN-IP of the webserver. Did you checked this? If i remember right, they connect through Port 3000 to each other.
@TheReal1604 I have not found an option to enable SSL for the inter-connection. We had set port 443, so they tried to connect through port 443 and for this SSL is enabled in NGINX, but that did not work. We also set the external ip of the instance as "INSTANCE_IP". They connect to the port you enter in the environment variable "PORT" which is also the internal port in the docker container. Currently we are using a plain connection for the broadcast between the instances, but we also thinking about a stunnel setup (which is not really scalable). The question is what is transfered through this broadcasts, is there a need to encrypt the data.
Hopefully you got this resolved. Going to go ahead and close since no activity