Page 1 of 1

Error after authentication

PostPosted: Tue May 11, 2010 7:59 pm
by johnjhufnagle
After I enter my credentials to log into OMERO.web I get the following instead of the web client home page:

Traceback (most recent call last):

File "/Users/johnhufnagle/omero/omero_dist/lib/python/django/core/servers/basehttp.py", line 277, in run
self.result = application(self.environ, self.start_response)

File "/Users/johnhufnagle/omero/omero_dist/lib/python/django/core/servers/basehttp.py", line 634, in __call__
return self.application(environ, start_response)

File "/Users/johnhufnagle/omero/omero_dist/lib/python/django/core/handlers/wsgi.py", line 243, in __call__
response = middleware_method(request, response)

File "/Users/johnhufnagle/omero/omero_dist/lib/python/django/contrib/sessions/middleware.py", line 33, in process_response
request.session.save()

File "/Users/johnhufnagle/omero/omero_dist/lib/python/django/contrib/sessions/backends/db.py", line 58, in save
obj.save(force_insert=must_create)

File "/Users/johnhufnagle/omero/omero_dist/lib/python/django/db/models/base.py", line 307, in save
self.save_base(force_insert=force_insert, force_update=force_update)

File "/Users/johnhufnagle/omero/omero_dist/lib/python/django/db/models/base.py", line 358, in save_base
rows = manager.filter(pk=pk_val)._update(values)

File "/Users/johnhufnagle/omero/omero_dist/lib/python/django/db/models/query.py", line 429, in _update
return query.execute_sql(None)

File "/Users/johnhufnagle/omero/omero_dist/lib/python/django/db/models/sql/subqueries.py", line 117, in execute_sql
cursor = super(UpdateQuery, self).execute_sql(result_type)

File "/Users/johnhufnagle/omero/omero_dist/lib/python/django/db/models/sql/query.py", line 1700, in execute_sql
cursor.execute(sql, params)

File "/Users/johnhufnagle/omero/omero_dist/lib/python/django/db/backends/sqlite3/base.py", line 167, in execute
return Database.Cursor.execute(self, query, params)

OperationalError: unable to open database file

Re: Error after authentication

PostPosted: Tue May 11, 2010 9:42 pm
by carlos
Hello John,

That sounds like omero.web isn't completely configured. What omero version are you using, and did you do the "bin/omero web settings" step?

Regards,

Re: Error after authentication

PostPosted: Wed May 12, 2010 12:25 pm
by johnjhufnagle
Hi Carlos,

This 4.1.1 installation has been configured and working for the past 4 months without a problem. Just went south on me yesterday.

Thanks
John

Re: Error after authentication

PostPosted: Wed May 12, 2010 1:45 pm
by carlos
Ok, but what, if anything, changed in the past few days? The error you are seeing is django complaining about it's database (which is completely unrelated to Omero db) which lives in ${OMERODIST}/lib/python/omeroweb/db.sqlite3.

Three things can get you that error:
1) file was deleted or is corrupted
2) paths are wrong
3) exhausted open file descriptors available

So 1) is easy to check, by verifying if the file is actually there and opening it (assuming it is there) using the sqlite command line client.
2) is not probable, as you had everything running before.
The one I'd put my money on is 3) which should go away (temporarily) with a simple restart.

Hope it helps,

Carlos

Re: Error after authentication

PostPosted: Wed May 12, 2010 2:02 pm
by johnjhufnagle
Hi Carlos,

I had restarted OMERO.web a few times but get the same error.

The db file was there but pretty small 74k...is that what you would expect?
-rw-r--r-- 1 johnhufnagle staff 70656 May 12 10:00 lib/python/omeroweb/db.sqlite3

Here is the sqlite session...

John-Hufnagles-iMac:rails johnhufnagle$ sqlite3
SQLite version 3.6.21
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from sqlite_master;
sqlite> .databases
seq name file
--- --------------- ----------------------------------------------------------
0 main
sqlite> .exit

Re: Error after authentication

PostPosted: Wed May 12, 2010 2:03 pm
by carlos
Yes, small is fine. Can you post the result of .tables?

Re: Error after authentication

PostPosted: Wed May 12, 2010 2:06 pm
by johnjhufnagle
empty results

Re: Error after authentication

PostPosted: Wed May 12, 2010 2:31 pm
by carlos
Then that's your problem right there... you'll need to do a 'bin/omero web settings' but while this explains the traceback on the original post, I can't offer any explanation as to why it happened in the first place.

Can you think of anything that may have happened? Did you rebuild / upgrade, was there any disk inconsistency or server crash?

--
carlos

Re: Error after authentication

PostPosted: Thu May 13, 2010 2:39 pm
by johnjhufnagle
No the only new coding I had done was developing code to use the Exporter service and export an image to OME-TIF format. I wouldn't expect that would have had any influence on the web side of things?

Re: Error after authentication

PostPosted: Thu May 20, 2010 2:01 pm
by cxallan
Hi John,

Certainly shouldn't have. Is it possible that you ran a clean and had not move the SQLite database out of its default location in lib/omero/? When developing this will completely nuke the database file.