Task #10905 (closed)
Opened 6 years ago
Closed 5 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 6 years ago by wmoore
comment:2 Changed 6 years ago by wmoore
- Owner changed from web-team@… to jamoore
comment:3 Changed 6 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 5 years ago by jamoore
- Milestone changed from 5.x to 5.0.2
- Resolution set to fixed
- Status changed from new to closed
This should now be handled (minimally for web's usage):
I noticed a similar issue when doing:
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'