infinite redirects with "user session ended" problem referenced before on this lisst

211 views
Skip to first unread message

Katie Surrence

unread,
Apr 30, 2019, 9:47:31 PM4/30/19
to xnat_di...@googlegroups.com
Dear all,

I updated to the most recent XNAT, 1.7.5.3.  I'm trying to run XNAT on the Vagrant virtual machine.  I haven't changed a thing about the out of the box configuration.  I have the infinite redirect problem described by some other users, in which I repeatedly get the "user session ended' message.

I've tried to read through old threads, and one basic thing I tried was opening up a private browser to see if the cache was an issue.  It did not make a difference to the behavior.  

Does anyone have an idea about a next debugging step?

Best,
Katie

Herrick, Rick

unread,
May 1, 2019, 11:59:53 AM5/1/19
to xnat_di...@googlegroups.com

Most likely, the time on the VM is incorrect. This can happen when the VM goes to sleep (e.g. you shut your laptop) or suspended. The session control in XNAT gets its timeout value from the server, which sticks a timestamp in the session cookies. The browser looks at that, looks at the local time in the browser, and, if the local time is greater than the timeout value, tells you that the session has ended. If the server is behind the real time, you can start your session already “expired”.

 

Here are some good tips on getting the server time reset, setting up time sync:

 

https://www.digitalocean.com/community/tutorials/how-to-set-up-time-synchronization-on-ubuntu-16-04

 

The next update of the XNAT Vagrant project will install chrony, which is a newer clock management daemon that better handles situations where your internet connection and clock service may be intermittent (e.g. a VM that gets suspended and paused frequently). You can install this on your VM pretty easily if you’d like. Run these commands as root (i.e. sudo -i):

 

$ apt -y install chrony

$ systemctl stop chrony.service

$ mv /etc/chrony/chrony.conf /etc/chrony/chrony.conf.bak

$ wget -O /etc/chrony/chrony.conf https://bitbucket.org/rherrick/xnat-vagrant/raw/09295f0527a26981efec3fb8b570dc37b1f8531f/templates/chrony.conf.tmpl

$ systemctl start chrony.service

$ timedatectl set-timezone America/Chicago

 

Obviously set the timezone to wherever you’re at (you can do timedatectl list-timezones to get a list of the available timezones).

 

Once you have this running, you can reset the clock like this:

 

$ systemctl stop chrony.service

$ chronyd -q

2019-05-01T15:59:13Z chronyd version 2.1.1 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP -DEBUG +ASYNCDNS +IPV6 +SECHASH)

2019-05-01T15:59:13Z Frequency 5.057 +/- 0.211 ppm read from /var/lib/chrony/chrony.drift

2019-05-01T15:59:22Z System clock wrong by 0.007484 seconds (step)

2019-05-01T15:59:22Z chronyd exiting

$ systemctl start chrony.service

 

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

Phone: +1 (314) 273-1645

Image removed by sender.

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at https://groups.google.com/group/xnat_discussion.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/CACsYFYzfd9dca%2BkxfJf-nfYcngX2VnZ6stXtLoPUUYN9FnWSwg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Katie Surrence

unread,
May 1, 2019, 8:05:52 PM5/1/19
to xnat_di...@googlegroups.com
Thanks very much -- resetting my clock solved the problem.

xnat dev

unread,
Jan 13, 2020, 12:57:39 PM1/13/20
to xnat_discussion
Hi,

Same problem : the server was 5 min late, and the session timeout was 5 mintues.

tmp fix : sudo date --set "13 Jan 2020 18:45:00"
perm fix : use chrony

To unsubscribe from this group and stop receiving emails from it, send an email to xnat_di...@googlegroups.com.

Guus Kolpa

unread,
Oct 10, 2022, 10:49:25 AM10/10/22
to xnat_discussion
  Hi just to add,

I encountered the same issue. Upon inspection, it had to do with a double request COOKIE:

Cookie: SESSION_DIALOG_OPEN=false; SESSION_DIALOG_CANCELLED=false; WARNING_BAR=OPEN; guest=true; SESSION_ACTIVE=true; SESSION_TIMED_OUT=false; SESSION_TIMEOUT_TIME=1665401255893; SESSION_EXPIRATION_TIME="1665405318997,900000"; guest=false; JSESSIONID=68E176B41F4B2D0B9BF92A8AE1E3A2E3; SESSION_ACTIVE=false; JSESSIONID=ED1F7ED8E08527B84F10531ED6BCB327; SESSION_EXPIRATION_TIME="1665400355893,900000"

You can see the second SESSION_EXPIRATION_TIME cookie, which would never change.
Resetting my clock didn't fix the issue; clearing cookies and resetting the browser did.
This message may contain confidential or privileged information. If you are not the addressee, please notify the sender and delete it from your files.
Reply all
Reply to author
Forward
0 new messages