We're Hiring!

Error after authentication

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Error after authentication

Postby johnjhufnagle » Tue May 11, 2010 7:59 pm

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
johnjhufnagle
 
Posts: 34
Joined: Tue Dec 15, 2009 8:50 pm

Re: Error after authentication

Postby carlos » Tue May 11, 2010 9:42 pm

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,
carlos
 
Posts: 6
Joined: Fri May 29, 2009 1:42 pm

Re: Error after authentication

Postby johnjhufnagle » Wed May 12, 2010 12:25 pm

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
johnjhufnagle
 
Posts: 34
Joined: Tue Dec 15, 2009 8:50 pm

Re: Error after authentication

Postby carlos » Wed May 12, 2010 1:45 pm

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
carlos
 
Posts: 6
Joined: Fri May 29, 2009 1:42 pm

Re: Error after authentication

Postby johnjhufnagle » Wed May 12, 2010 2:02 pm

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
johnjhufnagle
 
Posts: 34
Joined: Tue Dec 15, 2009 8:50 pm

Re: Error after authentication

Postby carlos » Wed May 12, 2010 2:03 pm

Yes, small is fine. Can you post the result of .tables?
carlos
 
Posts: 6
Joined: Fri May 29, 2009 1:42 pm

Re: Error after authentication

Postby johnjhufnagle » Wed May 12, 2010 2:06 pm

empty results
johnjhufnagle
 
Posts: 34
Joined: Tue Dec 15, 2009 8:50 pm

Re: Error after authentication

Postby carlos » Wed May 12, 2010 2:31 pm

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
carlos
 
Posts: 6
Joined: Fri May 29, 2009 1:42 pm

Re: Error after authentication

Postby johnjhufnagle » Thu May 13, 2010 2:39 pm

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?
johnjhufnagle
 
Posts: 34
Joined: Tue Dec 15, 2009 8:50 pm

Re: Error after authentication

Postby cxallan » Thu May 20, 2010 2:01 pm

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.
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest