Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #10905 (closed)

Opened 11 years ago

Closed 10 years ago

Bug: omeroweb takes out exclusive lock on config.xml

Reported by: jamoore Owned by: jamoore
Priority: major Milestone: 5.0.2
Component: Web Version: 4.4.8
Keywords: n.a. Cc: wmoore, atarkowska, bpindelski, khgillen, rleigh
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

See: https://chat.glencoesoftware.com/chatlogs/devteam/2013-05-15.html#11:40:51.566169

On launching bin/omero admin diagnostics from two terminals, it's possible to get the error:

portalocker.LockException: (1, 'Resource temporarily unavailable')

At least one occurrence of this was caused by omeroweb/settings.py taking an exclusive lock on config.xml. By passing exclusive=False to the omero.config.Config constructor, this won't happen.

Note: there may be other code paths that are doing the same thing.

Change History (4)

comment:1 Changed 11 years ago by wmoore

I noticed a similar issue when doing:

$ bin/omero admin restart

in one terminal window while simultaneously starting web manually in another:

/OmeroWeb/omeroweb $ python manage.py runserver
$ python manage.py runserver
Traceback (most recent call last):
  File "manage.py", line 34, in <module>
    import settings # Assumed to be in the same directory.
  File "/Users/will/Desktop/OMERO/components/tools/OmeroWeb/omeroweb/settings.py", line 146, in <module>
    raise exctype, value
portalocker.LockException: (1, 'Resource temporarily unavailable')

After making the suggested edit, https://github.com/will-moore/openmicroscopy/tree/settings.py_locks_config.xml_10905

I no-longer get an error running web server, BUT I do get a new error in OMERO restart terminal

$ bin/omero admin restart                                    # THEN do $ python manage.py runserver in another terminal...
Waiting on shutdown. Use CTRL-C to exit
.No descriptor given. Using etc/grid/default.xml
Waiting on startup. Use CTRL-C to exit
ERROR:ConfigXml:Failed to removed lock file, ignoring
Traceback (most recent call last):
  File "/Users/will/Desktop/OMERO/dist/lib/python/omero/config.py", line 154, in _close_lock
    os.remove("%s.lock" % self.filename)
OSError: [Errno 2] No such file or directory: '/Users/will/Desktop/OMERO/dist/etc/grid/config.xml.lock'

comment:2 Changed 11 years ago by wmoore

  • Owner changed from web-team@… to jamoore

comment:3 Changed 11 years ago by jamoore

  • Milestone changed from OMERO-4.4.9 to OMERO-4.4.x
  • Priority changed from critical to major
  • Version set to 4.4.8

After attempts by Will, pushing and lowering priority.

comment:4 Changed 10 years ago by jamoore

  • Milestone changed from 5.x to 5.0.2
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.64384 sec.)

We're Hiring!