Readstate read/unread notifications and tracking across chat clients not working for Hipchat Server and Data Center

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

Users reporting that read/unread(readstate) message tracking and notifications across chat clients are not working.

Use Case Scenario: A user working in the Web Client receive some messages from another user. After reading the messages in the web client
other chat clients will still see the messages as unread. As the readstate was not updated.


診断

In the /var/log/hipchat/coral.log you will see WARN in regards to the readstate request that is was skipped

2018-07-05T07:26:12.502069+00:00 chat coral-1: [/readstate#REQQX5YzR] WARN: last read timestamp info [u'd6925a42-6e1e-4d15-9b2f-90206864b3a8', u'1528110874.879949'] for user 44 and jid 1_verti_2.2.2.@XXX.XXX.hipchat.com was skipped.

In the above log entry we can /readstate#<request id> WARN. We can also see that user ID 44 is the one with the issue and at the very end of the line we see it was skipped.
There will also be correlating logs in the /var/log/nginx/access.log and /var/log/hipchat/nginx.log too:

<Client IP Address>- - [05/Jul/2018:07:26:12 +0000] "/readstate" 502 5 "-" "HipChat/4030005.1672 Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.7.0 Chrome/49.0.2623.111 Safari/537.36" "-" -

Here we can see the readstate request returns a *502* http error code. You can also see this from the web client too. Using your browsers Developers Tools > Networking tab select a readstate header and check the status code and you will see:

原因

Redis cache readstate hash and data was not removed.

ソリューション

To resolve this problem we can manually delete the Redis hash and its data.

The first step is to identify a user with the problem and find their ID. You can that by using one of the following commands:

sudo dont-blame-hipchat
DBPASS=$(awk '/"pass"/ {gsub(/[",]/,"");print $2}' /hipchat/config/site.json) && mysql -uroot -p$DBPASS hipchat -e "SELECT * FROM users where email='users-email-address-goes-here';" 

This is will return the users information with the ID being the first column. With the users information we can move on to the next step.

Connect to Reids:

redis-cli -p 6380 HGETALL "readstate:<ID from query>"

The above command should return a set of data that looks similar to this:

root@hcs240:/home/admin# redis-cli -p 6380 HGETALL "readstate:1"

1) "1_myroom@conf.btf.hipchat.com"
2) "[\"ca553600-c830-4d84-9389-38a4efa6f670\", \"1531484138.823086\"]"
3) "1_4@chat.btf.hipchat.com"
4) "[\"\", \"1531484126.761390\"]"

The next step is to delete the readstate hash and associated data:

del "readstate:<ID from query>" 

Have user with issues logout, clear thier client's cache and login back in: 


For additional questions or concerns please open a ticket with Atlassian Support 

最終更新日 2018 年 11 月 2 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.