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
ᐧ
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/F082892B-C97E-41A2-8B27-47FEBA30E1EC%40wustl.edu.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_di...@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.