It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

User gets message "too many sessions" in Hipchat

User has 10 hipchat sessions and nothing happens when try to disconnect sessions.   I can duplicate on my account with two dead sessions. 

2 answers

0 votes

Hi James, 

We strongly suggest you reach out to our team through https://support.atlassian.com/contact/#/ so we can further identify what's happening with the HipChat sessions in your account. 

Thank you!

Also, you can try to disconnect active sessions via https://hipchat.com/account/sessions

0 votes
AhmadDanial Atlassian Team Jul 20, 2018

Hi, James.

On top of the suggestions provided by Nagila, you can also give the following method a try if you are running on HipChat Server / Data Center:

HipChat Data Center

  1. Obtain root access
    sudo dont-blame-hipchat
  2. Set Postgres vars:
    PGHOST=$(cat /hipchat/config/site.json | jq -r '.databases.hipchat_postgres.servers[0]' | cut -d: -f1) && PGUSER=$(cat /hipchat/config/site.json | jq -r '.databases.hipchat_postgres.user') && PGSCHEMA=$(cat /hipchat/config/site.json | jq -r '.databases.hipchat_postgres.schema') && export PG_CONNECT="psql -h $PGHOST -U $PGUSER -d $PGSCHEMA" && export PGPASSWORD=$(cat /hipchat/config/site.json | jq -r '.databases.hipchat_postgres.pass')
  3. Set Redis vars:
    RHOST=$($PG_CONNECT -t -c "SELECT value FROM configurations WHERE key='redishostname';") && RPORT=$($PG_CONNECT -t -c "SELECT value FROM configurations WHERE key='redisport';") && RPWD=$($PG_CONNECT -t -c "SELECT value FROM configurations WHERE key='redispass';") && export REDIS_CONNECT="redis-cli -h $RHOST -p $RPORT -a $RPWD"
  4. Locate user ID:
    $PG_CONNECT -c "SELECT id,email FROM users WHERE email LIKE '%email@example.com%';"
  5. Clear all sessions for this user, be sure to replace <user_id> with the actual user ID:
    for key in `$REDIS_CONNECT KEYS '*' | grep -iE "session|^mobile:" | grep -w <user_id> | cut -d" " -f2`; do echo "Deleting $key"; $REDIS_CONNECT DEL $key; done

     

HipChat Server

  1. Obtain root access
    sudo dont-blame-hipchat
  2. Locate user ID:
    DBPASS=$(awk '/"pass"/ {gsub(/[",]/,"");print $2}' /hipchat/config/site.json) && mysql -uroot -p$DBPASS hipchat -e "SELECT id,email FROM users WHERE email LIKE '%email@example.com%';"
  3. Clear all sessions for this user, be sure to replace <user_id> with the actual user ID:
    for key in `redis-cli KEYS '*' | grep -iE "session|^mobile:" | grep -w <user_id> | cut -d" " -f2`; do echo "Deleting $key"; redis-cli DEL $key; done 

Let us know how it goes for you. Thanks.

I had found a script online to clear sessions for all users and that was successful but next time will try the script for the user with the issue.

 

Thanks

 

James

AhmadDanial Atlassian Team Jul 22, 2018

Hi, James.

You are most welcome. Would you mind sharing the script you came across so other might be able to benefit from it in case they run into the same issue too? Thanks.

For all Users:

Login to hipchat server as admin and run the following script:

for key in `redis-cli KEYS '*' | grep -iE "session|^mobile:"`; do echo "Deleting $key"; redis-cli DEL $key; done

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Hipchat

Hipchat Cloud and Stride have reached End of Life (updated)

All good things come to an end - thanks to all our customers and partners who have been along the Hipchat and Stride journey with us.  As of Feb 15th 2019, Hipchat Cloud and Stride have reached ...

35,256 views 9 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you