[ome-users] sessionid files in /tmp
Kenneth Gillen
k.h.gillen at dundee.ac.uk
Wed Jun 25 18:40:11 BST 2014
Hi John,
You probably already know this, or would have come across it anyway, but I
would just like to add that if you do go down the route of Memcached (as a
cache backend on a single host) then it¹s port should be firewalled off
from the rest of the network. There is no authentication required by
default, so any user that can access the Memcached port of 11211 can
read/write to the cache and clear the entire cache via telnet.
See http://blog.couchbase.com/memcached-security for more information.
Best regards,
Kenny
--
Kenneth Gillen
OME System Administrator
Wellcome Trust Centre for Gene Regulation & Expression
College of Life Sciences
MSI/WTB/JBC Complex
University of Dundee
Dow Street
Dundee DD1 5EH
United Kingdom
Tel: +44 (0) 1382 386364
Skype: kennethgillen
http://www.twitter.com/openmicroscopy
From: Aleksandra Tarkowska <A.Tarkowska at dundee.ac.uk>
Date: Wednesday, 25 June 2014 15:08
To: "John Webber (NBI)" <John.Webber at nbi.ac.uk>
Cc: "ome-users at lists.openmicroscopy.org.uk"
<ome-users at lists.openmicroscopy.org.uk>
Subject: Re: [ome-users] sessionid files in /tmp
Dear John
As users create new sessions on the OMERO.web, session data can accumulate
in your session store. Because OMERO.web uses the file based backend, your
temporary directory will contain an increasing number of files. Django
does not provide automatic purging of
expired sessions. Therefore, it¹s your job to purge expired sessions on a
regular basis. Django provides a clean-up management command for this
purpose: clear sessions. It¹s recommended to call this command on a
regular basis, for example as a daily cron job.
cd OMERO/lib/python/omeroweb
python manage.py clearsessions
Note that the cache backend isn¹t vulnerable to this problem, because
caches automatically delete stale data.
If you wish to change it to cache based, first install
Memcached and a memcached binding. There are several python memcached
bindings available; the two most common are python-memcached and pylibmc.
Then set the following
$ bin/omero web stop
$ bin/omero config set omero.web.caches '{"default": { "BACKEND":
"django.core.cache.backends.memcached.MemcachedCache", "LOCATION":
"127.0.0.1:11211", "TIMEOUT": "86400" } }'
$ bin/omero config set omero.web.session_engine
"django.contrib.sessions.backends.cache"
$ bin/omero web start
I hope it will help
Kind regards
Ola
From: "John Webber (NBI)" <John.Webber at nbi.ac.uk>
Date: Mon, 23 Jun 2014 11:20:08 +0000
To: William Moore <will at lifesci.dundee.ac.uk>
Cc: "ome-users at lists.openmicroscopy.org.uk"
<ome-users at lists.openmicroscopy.org.uk>
Subject: Re: [ome-users] sessionid files in /tmp
Hi Will,
Thanks for the response.
I have done some more tests but am still experiencing the same issue. I
have restarted HTTPD, Omero and Omero_web. I have also rebooted the server
itself.
These files are created when we restart omero web. When omero web is not
running the files are not created.
I am running exactly the same python versions, omero versions and ice
versions across two servers. The main difference I can see on these
servers
is that the one which has ³sessionid² files gathering in ³/tmp² has a
later version of httpd as follows:
Server without issue:
Server with sessionID issue:
httpd-2.2.3-82.el5.centos
httpd-2.2.3-83.el5.centos
httpd-devel-2.2.3-82.el5.centos
httpd-devel-2.2.3-83.el5.centos
I have attached a complete list of the different RPMs, but not sure
whether any of the others are relevant.
Please can you give me a pointer as to why this is occurring. Is it
something that can be corrected, or do I need to set up a cron job to
remove
the session ID files?
Thanks
John
From: William Moore [mailto:will at lifesci.dundee.ac.uk]
Sent: 20 June 2014 10:46
To: John Webber (NBI)
Cc: ome-users at lists.openmicroscopy.org.uk
Subject: Re: [ome-users] sessionid files in /tmp
Hi John,
It's probably the Django web server that is creating these files in /tmp.
See
https://docs.djangoproject.com/en/dev/topics/http/sessions/#using-file-base
d-sessions
and
http://stackoverflow.com/questions/10197880/django-file-based-session-doesn
t-expire
These are sessions between the browser and the Django server and have
nothing to do with OMERO sessions.
Are you aware of any difference in the web server configurations or
browser connections between your servers that could explain this behaviour?
Regards,
Will.
On 19 Jun 2014, at 16:38, "John Webber (NBI)" <John.Webber at nbi.ac.uk>
wrote:
Hi all,
On one of my Omero servers I am seeing ³sessionid² files in /tmp, which
are generated every 10 minutes and not removed. These files are called
something like ³sessionideb93037246a7b1efe7e01f6eec735cef².
On other Omero servers, one or two of these files might exist, but they
are not created every 10 minutes or so! These are only small, but there
are a lot of them!
Can anyone advise why these are being left behind? This is the SAME
server where I was experiencing the ³Server
error[500]² errors, which have now stopped.
Thanks
John
---------------------------------------------------------------------------
-----------------------------------------------------------------
John Webber
Computing and Information Services
NBI Partnership Ltd
Norwich Research park
Colney Lane
Norwich
NR4 7UH
E-Mail: john.webber at nbi.ac.uk
Web: http://www.nbi.ac.uk <http://www.nbi.ac.uk/>
Tel:
+44(0)1603 450 818
Helpdesk (Tel): 1234
HPC Support (Web): http://hpc.nbi.ac.uk <http://hpc.nbi.ac.uk/>
(NBI internal)
HPC Support (Tel):
2003 (NBI internal)
The NBI Partnership Ltd provides non-scientific services to the Institute
of Food Research, the John Innes Centre, The Genome Analysis Centre
and The Sainsbury Laboratory
_______________________________________________
ome-users mailing list
ome-users at lists.openmicroscopy.org.uk
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
_______________________________________________ ome-users mailing list
ome-users at lists.openmicroscopy.org.uk
<mailto:ome-users at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
<http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users>
The University of Dundee is a registered Scottish Charity, No: SC015096
The University of Dundee is a registered Scottish Charity, No: SC015096
More information about the ome-users
mailing list