collective / sauna.reload

Instant code reloading for Plone using a fork loop.
http://pypi.python.org/pypi/sauna.reload/
Other
11 stars 5 forks source link

AttributeError: 'ClientStorage' object has no attribute '_lock_acquire' #1

Closed alexdante closed 12 years ago

alexdante commented 13 years ago

I'm running Plone 4.1.2 on Centos 5.6. Using the version of sauna.reload currently in the repo, and following the setup instructions provided, I get these sauna.reload errors during start up:

2011-11-09 18:53:16 INFO sauna.reload.parent Fork loop starting on parent. PID 28669
2011-11-09 18:53:16 INFO sauna.reload.child Forked new child. Installing reloadable products...
Traceback (most recent call last):
  File "/opt/plone41/buildout-cache/eggs/Zope2-2.13.10-py2.6.egg/Zope2/Startup/run.py", line 72, in <module>
    run()
  File "/opt/plone41/buildout-cache/eggs/Zope2-2.13.10-py2.6.egg/Zope2/Startup/run.py", line 21, in run
    starter.prepare()
  File "/opt/plone41/buildout-cache/eggs/Zope2-2.13.10-py2.6.egg/Zope2/Startup/__init__.py", line 96, in prepare
    self.sendEvents()
  File "/opt/plone41/buildout-cache/eggs/Zope2-2.13.10-py2.6.egg/Zope2/Startup/__init__.py", line 69, in sendEvents
    notify(ProcessStarting())
  File "/opt/plone41/buildout-cache/eggs/zope.event-3.5.1-py2.6.egg/zope/event/__init__.py", line 31, in notify
    subscriber(event)
  File "/opt/plone41/buildout-cache/eggs/zope.component-3.9.5-py2.6.egg/zope/component/event.py", line 24, in dispatch
    zope.component.subscribers(event, None)
  File "/opt/plone41/buildout-cache/eggs/zope.component-3.9.5-py2.6.egg/zope/component/_api.py", line 136, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/opt/plone41/buildout-cache/eggs/zope.component-3.9.5-py2.6.egg/zope/component/registry.py", line 321, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/opt/plone41/buildout-cache/eggs/zope.interface-3.6.7-py2.6-linux-x86_64.egg/zope/interface/adapter.py", line 585, in subscribers
    subscription(*objects)
  File "/opt/plone41/zeocluster/src/sauna.reload/sauna/reload/eventhandlers.py", line 69, in startForkLoop
    forkloop.start()
  File "/opt/plone41/zeocluster/src/sauna.reload/sauna/reload/forkloop.py", line 103, in start
    self.loop()
  File "/opt/plone41/zeocluster/src/sauna.reload/sauna/reload/forkloop.py", line 160, in loop
    self._prepareNewChild()
  File "/opt/plone41/zeocluster/src/sauna.reload/sauna/reload/forkloop.py", line 186, in _prepareNewChild
    self.storage_index.restore()
  File "/opt/plone41/zeocluster/src/sauna.reload/sauna/reload/db.py", line 41, in restore
    self.storage._lock_acquire()
AttributeError: 'ClientStorage' object has no attribute '_lock_acquire'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/opt/plone41/Python-2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/opt/plone41/zeocluster/src/sauna.reload/sauna/reload/forkloop.py", line 246, in _childExitHandler
    self.storage_index.save()
  File "/opt/plone41/zeocluster/src/sauna.reload/sauna/reload/db.py", line 34, in save
    self.storage._lock_acquire()
AttributeError: 'ClientStorage' object has no attribute '_lock_acquire'
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/opt/plone41/Python-2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/opt/plone41/zeocluster/src/sauna.reload/sauna/reload/forkloop.py", line 246, in _childExitHandler
    self.storage_index.save()
  File "/opt/plone41/zeocluster/src/sauna.reload/sauna/reload/db.py", line 34, in save
    self.storage._lock_acquire()
AttributeError: 'ClientStorage' object has no attribute '_lock_acquire'
2011-11-09 18:53:16 INFO SignalHandler Caught signal SIGCLD

Child died on bootup. Pausing fork loop for now.
Fix possible errors and save edits and we'll try booting again.
Waiting...

At this point it hangs until killed.

miohtama commented 13 years ago

Are you using ZEO? sauna.reload supports only development mode in non-ZEO clustered mode. We should add a warning of unsupported configuration.

alexdante commented 13 years ago

Ah, of course, that does make sense. And all of the doc examples do show it starting a single instance. But yes, a warning would be nice :) This is week 2 of Plone for me, so I'm not yet always aware of what I need to be aware of.

Thanks for the quick response, too, much appreciated.

On Thu, Nov 10, 2011 at 7:11 PM, Mikko Ohtamaa < reply@reply.github.com>wrote:

Are you using ZEO? sauna.reload supports only development mode in non-ZEO clustered mode. We should add a warning of unsupported configuration.


Reply to this email directly or view it on GitHub: https://github.com/collective/sauna.reload/issues/1#issuecomment-2693038

datakurre commented 13 years ago

Thanks for reporting that. I think, we should keep this issue open, until we have a warning about trying to use sauna.reload with ZEO.

(Even better would be to make it work with ZEO. Actually, it should be even easier than making it work with ZODB, but the current codebase would need some refactoring before we can try it.)

datakurre commented 12 years ago

I'm afraid that we can support ZEO-client only on Plone 4.1 and later, because only ZODB 3.10. supports forked processes.