Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Desktop notifications not working between instances

Open N4IR0 opened this issue 9 years ago • 9 comments

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: github-graph-rocketchat

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

N4IR0 avatar Jul 04 '17 10:07 N4IR0

we have the same problem: #6341

bbrauns avatar Jul 04 '17 12:07 bbrauns

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?

jasoncscott avatar Jul 04 '17 13:07 jasoncscott

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?

N4IR0 avatar Jul 04 '17 15:07 N4IR0

Also the messages are displayed instantly, only the desktop notifications are not working. There are no error messages in the logfiles of the instances.

N4IR0 avatar Jul 04 '17 15:07 N4IR0

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.

jasoncscott avatar Jul 04 '17 21:07 jasoncscott

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 avatar Jul 11 '17 06:07 N4IR0

@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 avatar Jul 11 '17 10:07 TheReal1604

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

N4IR0 avatar Jul 11 '17 10:07 N4IR0

Hopefully you got this resolved. Going to go ahead and close since no activity

geekgonecrazy avatar Sep 17 '20 00:09 geekgonecrazy