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

Incorrect presence (everyone is present)

Open maluhub opened this issue 2 years ago • 19 comments

Description:

Since last update, everyone is present 24/7. When someone changes his status it works well, but when it comes to logging off Rocketchat or turning off the computer, the presence doesn't get updated.

Steps to reproduce:

  1. Go to members list:

Expected behavior:

This is deep nigth, only few of members should show green icon.

Actual behavior:

Everyone is green: image

Server Setup Information:

  • Version of Rocket.Chat Server: 5.2.0
  • Operating System: Ubuntu 22.04LTS
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog: enabled
  • NodeJS Version: v14.19.3
  • MongoDB Version: 4.4.15 / wiredTiger (optlog enabled)

Client Setup Information

  • Desktop App or Browser Version: both
  • Operating System: Windows 10, Windows 11

Additional context

The issue is likely to be present since last update

Relevant logs:

Server logs:

{"level":40,"time":"2022-10-28T07:43:16.740Z","pid":1076,"hostname":"rocketchat","name":"VoIPService","msg":"Voip is not enabled. Cant start the service"}
{"level":40,"time":"2022-10-28T07:43:26.629Z","pid":1076,"hostname":"rocketchat","name":"VoIPService","msg":"VoIP service already stopped"}
{"level":51,"time":"2022-10-28T07:43:27.584Z","pid":1076,"hostname":"rocketchat","name":"Migrations","msg":"Not migrating, already at version 281"}
ufs: temp directory created at "/tmp/ufs"
[DatabaseWatcher] Using change streams
+-------------------------------------------------+
| SERVER RUNNING |
+-------------------------------------------------+
| |
| Rocket.Chat Version: 5.2.0 |
| NodeJS Version: 14.19.3 - x64 |
| MongoDB Version: 4.4.15 |
| MongoDB Engine: wiredTiger |
| Platform: linux |
| Process Port: 3000 |
| Site URL: [XXX] |
| ReplicaSet OpLog: Enabled |
| Commit Hash: 08f03cc9d8 |
| Commit Branch: HEAD |
| |
+-------------------------------------------------+
Loaded the Apps Framework and loaded a total of 2 Apps!
{"level":50,"time":"2022-10-28T07:44:43.018Z","pid":1076,"hostname":"rocketchat","name":"System","msg":"Exception while invoking method autoTranslate.getSupportedLanguages 'Auto-Translate is disabled [error-autotranslate-disabled]'"}
{"level":50,"time":"2022-10-28T07:44:50.832Z","pid":1076,"hostname":"rocketchat","name":"System","msg":"Exception while invoking method autoTranslate.getSupportedLanguages 'Auto-Translate is disabled [error-autotranslate-disabled]'"}

Application logs:

DevTools failed to load source map: Could not parse content for file:///C:/Users/user/AppData/Local/Programs/Rocket.Chat/resources/app.asar/app/html-parse-stringify.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not parse content for file:///C:/Users/user/AppData/Local/Programs/Rocket.Chat/resources/app.asar/app/fuselage.development.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not parse content for file:///C:/Users/user/AppData/Local/Programs/Rocket.Chat/resources/app.asar/app/index.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not parse content for file:///C:/Users/user/AppData/Local/Programs/Rocket.Chat/resources/app.asar/app/stylis.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not parse content for file:///C:/Users/user/AppData/Local/Programs/Rocket.Chat/resources/app.asar/app/focus-within-polyfill.js.map: Unexpected end of JSON input

maluhub avatar Oct 28 '22 08:10 maluhub

I cannot replicate this issue in our test environment with RC 5.2.0. I also tried with native oplog on and off. RHEL8 with tar installation, two nodes setup.

Gummikavalier avatar Oct 28 '22 17:10 Gummikavalier

We have a similiar issue, but instead of online some of our users stay "offline" even when they are active.

grafik

Our RC instance (single instance, Docker):

grafik

tobiasreinhard avatar Nov 03 '22 08:11 tobiasreinhard

Problem solved by deleting stuck sessions from RocketChat DB: https://github.com/RocketChat/Rocket.Chat/issues/27187#issuecomment-1303826402

maluhub avatar Nov 04 '22 17:11 maluhub

I've tried your suggestion, but it does not work in our environment.

tobiasreinhard avatar Nov 07 '22 11:11 tobiasreinhard

I have the same problem, version RC 5.3, deleting stuck sessions from the database did not help.

kertiskz avatar Nov 20 '22 04:11 kertiskz

Same with 5.3.2. It is working correctly if I sign out from rocket chat. But it looks like it is not timing out if I'm just closing the electron for example.

TimmiORG avatar Nov 23 '22 08:11 TimmiORG

I have the same problem after updating from 5.2.0 to 5.3.2.

JohnDorianMD avatar Nov 24 '22 11:11 JohnDorianMD

Same problem here after updating from 5.1.3 to 5.3.2.

santos525 avatar Nov 28 '22 09:11 santos525

We are facing the same issue after upgrading from 3.18.2 => 4.0.0 => 5.3.1, we are using LDAP. Neither works if i log out

  • Version 5.3.1
  • Application engine version 1.35.0
  • node version v14.19.3
  • Database migration 281 (November 23, 2022 11:53 AM)
  • MongoDB 5.0.13 / wiredTiger (oplog Enabled)

jsanchezba avatar Nov 29 '22 08:11 jsanchezba

Same here after upgrading from 5.1.2 to 5.3.3

Docker with MongoDB 5.0.14

klepptor avatar Nov 29 '22 09:11 klepptor

the same here.

affected only docker HA installation.

4 instances with DISABLE_PRESENCE_MONITOR=true 1 instance - without DISABLE_PRESENCE_MONITOR=true

User not going to offline / away. Always - online

https://forums.rocket.chat/t/userpresence-not-working-correctly/15782 - topic with logs / docker-compose.yml

andys448 avatar Jan 16 '23 12:01 andys448

still not fixed yet, very disappointing.

tobiasreinhard avatar Jan 18 '23 20:01 tobiasreinhard

Same here. Status of all users are stuck. Using with mongo cluster under docker. I'd be thankful for a patch while waiting for the official fix.

ZsBT avatar Jan 30 '23 09:01 ZsBT

The problem persists on version 5.4.3. I hope there is still time to fix this on version 6.0+?

rrmt23 avatar Mar 01 '23 09:03 rrmt23

I'm experimenting right now. On version 5.4.5: The problem is present if the user session is on an instance that has DISABLE_PRESENCE_MONITOR enabled. If you set DISABLE_PRESENCE_MONITOR=no on all instances, then this issue does not exist. On version 6.0.1: On the first instance DISABLE_PRESENCE_MONITOR=no is set, on the other three DISABLE_PRESENCE_MONITOR=yes. The reverse proxy redirects client requests to the last three instances, the presence instance does not process client requests. In this case, "Auto Away" works. It looks like this issue has been fixed in version 6 👍

shevchukma avatar Mar 27 '23 12:03 shevchukma

Same here after upgrading to 6.0.0. Docker with MongoDB 6.0.5.

grpanho avatar May 08 '23 11:05 grpanho

The issue is still in 5.4.10 and the UsersSessions cleanup didn't solve the problem. Setting DISABLE_PRESENCE_MONITOR=no didn't solve it neither. We're still facing the issue with only one instance.

bseclier avatar Jun 20 '23 09:06 bseclier

This is currently effecting my server running v6.1.8

aphick avatar Jul 11 '23 14:07 aphick

I also experienced this issue after upgrading to 6.6.0 as I mentioned in a related ticket and I'm sharing a quick script to help with resetting until it's done

#!/bin/bash
docker exec -it rocketchat-mongo-1 mongo --eval "\
    db = db.getSiblingDB('rocketchat'); \
    db.usersSessions.deleteMany({}); \
    db.users.updateMany({status:'online'},{'\$set':{status:'offline'}});"

pythys avatar Feb 16 '24 05:02 pythys

Yep. Same here after upgrading to 6.6.0...

KIDS-interactive avatar Feb 19 '24 07:02 KIDS-interactive

the presence status issues on 6.6.0 were fixed on 6.6.1

sampaiodiego avatar Feb 20 '24 19:02 sampaiodiego

I've upgraded to 6.6.1 and the issue seems to be still not resolved.

pythys avatar Feb 22 '24 17:02 pythys