Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

Five registerPackage results in unresolved ConflictError

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


sasha.vincic at gmail

May 16, 2008, 3:03 AM

Post #1 of 10 (386 views)
Permalink
Five registerPackage results in unresolved ConflictError

Hi
On a server we have a ZEO server with 6 clients. When we start/restart the
server we often get on random instance an AttributeError @@plone and all
other browser pages. I have tracked it down to a ConflictError when
installing Five on startup. See traceback bellow. To solve this I tried to
set enable-product-installation = off to all except one instance but I still
got errors.
For now we restart the broken instances until they work, I have tried to set
sleeping times up to couple seconds between the instances but it didn't make
any difference.

Five fails when it tries to execute the registerPackage in zcml files. Not
the same product every time.
First I thought it didn't respect the enable-product-instalation but that is
checked in App.Product.initializeProduct method.
So I played in fiveconfigure.py with transaction.savepoint() but no success
but if I manually check App.Product.doInstall like in the diff below

Now my question is if this is correct solution for the problem or will it
have other side effects that I am not aware of? How do I write tests for an
ConflicError during startup?

/Sasha

Index: fiveconfigure.py


===================================================================


--- fiveconfigure.py (revision 86781)


+++ fiveconfigure.py (working copy)


@@ -23,7 +23,7 @@


import warnings





import App.config


-from App.Product import initializeProduct


+from App.Product import initializeProduct, doInstall


from App.ProductContext import ProductContext


import Products


from zLOG import LOG, ERROR


@@ -265,6 +265,8 @@


if not hasattr(module_, '__path__'):


raise ValueError("Must be a package and the " \


"package must be filesystem based")


+ if not doInstall():


+ return





app = Zope2.app()


try:




2008-05-16 11:48:17 ERROR Zope Couldn't install Five
Traceback (most recent call last):
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
line 783, in install_product
initmethod(context)
File
"/Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py",
line 31, in initialize
zcml.load_site()
File "/Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py",
line 41, in load_site
_context = xmlconfig.file(file)
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
line 560, in file
context.execute_actions()
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py",
line 612, in execute_actions
callable(*args, **kw)
File
"/Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py",
line 285, in _registerPackage
transaction.commit()
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py",
line 96, in commit
return self.get().commit(sub, deprecation_wng=False)
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
line 380, in commit
self._saveCommitishError() # This raises!
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
line 378, in commit
self._commitResources()
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
line 433, in _commitResources
rm.commit(self)
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
line 484, in commit
self._commit(transaction)
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
line 518, in _commit
raise ConflictError(object=obj)
ConfigurationExecutionError: ZODB.POSException.ConflictError: database
conflict error (oid 0x28f61f, class App.Product.Product)
in:
File
"/Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml",
line 5.4-5.65
<five:registerPackage package="." initialize=".initialize" />

Traceback (most recent call last):
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py",
line 56, in ?
run()
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py",
line 21, in run
starter.prepare()
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py",
line 98, in prepare
self.startZope()
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py",
line 257, in startZope
Zope2.startup()
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/__init__.py",
line 47, in startup
_startup()
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/App/startup.py",
line 103, in startup
OFS.Application.initialize(application)
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
line 304, in initialize
initializer.initialize()
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
line 333, in initialize
self.install_products()
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
line 605, in install_products
return install_products(app)
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
line 636, in install_products
folder_permissions, raise_exc=debug_mode)
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
line 783, in install_product
initmethod(context)
File
"/Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py",
line 31, in initialize
zcml.load_site()
File "/Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py",
line 41, in load_site
_context = xmlconfig.file(file)
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
line 560, in file
context.execute_actions()
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py",
line 612, in execute_actions
callable(*args, **kw)
File
"/Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py",
line 285, in _registerPackage
transaction.commit()
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py",
line 96, in commit
return self.get().commit(sub, deprecation_wng=False)
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
line 380, in commit
self._saveCommitishError() # This raises!
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
line 378, in commit
self._commitResources()
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
line 433, in _commitResources
rm.commit(self)
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
line 484, in commit
self._commit(transaction)
File
"/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
line 518, in _commit
raise ConflictError(object=obj)
zope.configuration.config.ConfigurationExecutionError:
ZODB.POSException.ConflictError: database conflict error (oid 0x28f61f,
class App.Product.Product)
in:
File
"/Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml",
line 5.4-5.65
<five:registerPackage package="." initialize=".initialize" />


sasha.vincic at gmail

May 20, 2008, 1:29 AM

Post #2 of 10 (345 views)
Permalink
Re: Five registerPackage results in unresolved ConflictError [In reply to]

Forgot to say that this is Zope 2.9.8, Five 1.4 branch from svn, Plone 2.5.5

/Sasha

On Fri, May 16, 2008 at 12:03 PM, Sasha Vincic <sasha.vincic[at]gmail.com>
wrote:

> Hi
> On a server we have a ZEO server with 6 clients. When we start/restart the
> server we often get on random instance an AttributeError @@plone and all
> other browser pages. I have tracked it down to a ConflictError when
> installing Five on startup. See traceback bellow. To solve this I tried to
> set enable-product-installation = off to all except one instance but I still
> got errors.
> For now we restart the broken instances until they work, I have tried to
> set sleeping times up to couple seconds between the instances but it didn't
> make any difference.
>
> Five fails when it tries to execute the registerPackage in zcml files. Not
> the same product every time.
> First I thought it didn't respect the enable-product-instalation but that
> is checked in App.Product.initializeProduct method.
> So I played in fiveconfigure.py with transaction.savepoint() but no success
> but if I manually check App.Product.doInstall like in the diff below
>
> Now my question is if this is correct solution for the problem or will it
> have other side effects that I am not aware of? How do I write tests for an
> ConflicError during startup?
>
> /Sasha
>
> Index: fiveconfigure.py
>
>
> ===================================================================
>
>
> --- fiveconfigure.py (revision 86781)
>
>
> +++ fiveconfigure.py (working copy)
>
>
> @@ -23,7 +23,7 @@
>
>
> import warnings
>
>
>
>
>
> import App.config
>
>
> -from App.Product import initializeProduct
>
>
> +from App.Product import initializeProduct, doInstall
>
>
> from App.ProductContext import ProductContext
>
>
> import Products
>
>
> from zLOG import LOG, ERROR
>
>
> @@ -265,6 +265,8 @@
>
>
> if not hasattr(module_, '__path__'):
>
>
> raise ValueError("Must be a package and the " \
>
>
> "package must be filesystem based")
>
>
> + if not doInstall():
>
>
> + return
>
>
>
>
>
> app = Zope2.app()
>
>
> try:
>
>
>
>
> 2008-05-16 11:48:17 ERROR Zope Couldn't install Five
> Traceback (most recent call last):
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
> line 783, in install_product
> initmethod(context)
> File
> "/Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py",
> line 31, in initialize
> zcml.load_site()
> File "/Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py",
> line 41, in load_site
> _context = xmlconfig.file(file)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 560, in file
> context.execute_actions()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py",
> line 612, in execute_actions
> callable(*args, **kw)
> File
> "/Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py",
> line 285, in _registerPackage
> transaction.commit()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py",
> line 96, in commit
> return self.get().commit(sub, deprecation_wng=False)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
> line 380, in commit
> self._saveCommitishError() # This raises!
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
> line 378, in commit
> self._commitResources()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
> line 433, in _commitResources
> rm.commit(self)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
> line 484, in commit
> self._commit(transaction)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
> line 518, in _commit
> raise ConflictError(object=obj)
> ConfigurationExecutionError: ZODB.POSException.ConflictError: database
> conflict error (oid 0x28f61f, class App.Product.Product)
> in:
> File
> "/Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml",
> line 5.4-5.65
> <five:registerPackage package="." initialize=".initialize" />
>
> Traceback (most recent call last):
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py",
> line 56, in ?
> run()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py",
> line 21, in run
> starter.prepare()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py",
> line 98, in prepare
> self.startZope()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py",
> line 257, in startZope
> Zope2.startup()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/__init__.py",
> line 47, in startup
> _startup()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/App/startup.py",
> line 103, in startup
> OFS.Application.initialize(application)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
> line 304, in initialize
> initializer.initialize()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
> line 333, in initialize
> self.install_products()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
> line 605, in install_products
> return install_products(app)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
> line 636, in install_products
> folder_permissions, raise_exc=debug_mode)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
> line 783, in install_product
> initmethod(context)
> File
> "/Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py",
> line 31, in initialize
> zcml.load_site()
> File "/Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py",
> line 41, in load_site
> _context = xmlconfig.file(file)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 560, in file
> context.execute_actions()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py",
> line 612, in execute_actions
> callable(*args, **kw)
> File
> "/Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py",
> line 285, in _registerPackage
> transaction.commit()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py",
> line 96, in commit
> return self.get().commit(sub, deprecation_wng=False)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
> line 380, in commit
> self._saveCommitishError() # This raises!
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
> line 378, in commit
> self._commitResources()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
> line 433, in _commitResources
> rm.commit(self)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
> line 484, in commit
> self._commit(transaction)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
> line 518, in _commit
> raise ConflictError(object=obj)
> zope.configuration.config.ConfigurationExecutionError:
> ZODB.POSException.ConflictError: database conflict error (oid 0x28f61f,
> class App.Product.Product)
> in:
> File
> "/Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml",
> line 5.4-5.65
> <five:registerPackage package="." initialize=".initialize" />
>
>
>
>


philipp at weitershausen

May 20, 2008, 10:25 AM

Post #3 of 10 (340 views)
Permalink
Re: Five registerPackage results in unresolved ConflictError [In reply to]

Believe something very very rotten in Five's registerPackage was fixed
by Rocky in r72986 [1]. As far as I can tell this was never merged to
the 1.4 branch, but I could we wrong.


[1] http://svn.zope.org/?rev=72986&view=rev


Sasha Vincic wrote:
> Forgot to say that this is Zope 2.9.8, Five 1.4 branch from svn, Plone 2.5.5
>
> /Sasha
>
> On Fri, May 16, 2008 at 12:03 PM, Sasha Vincic <sasha.vincic[at]gmail.com
> <mailto:sasha.vincic[at]gmail.com>> wrote:
>
> Hi
>
> On a server we have a ZEO server with 6 clients. When we
> start/restart the server we often get on random instance an
> AttributeError @@plone and all other browser pages. I have tracked
> it down to a ConflictError when installing Five on startup. See
> traceback bellow. To solve this I tried to set
> enable-product-installation = off to all except one instance but I
> still got errors.
> For now we restart the broken instances until they work, I have
> tried to set sleeping times up to couple seconds between the
> instances but it didn't make any difference.
>
> Five fails when it tries to execute the registerPackage in zcml
> files. Not the same product every time.
> First I thought it didn't respect the enable-product-instalation but
> that is checked in App.Product.initializeProduct method.
> So I played in fiveconfigure.py with transaction.savepoint() but no
> success but if I manually check App.Product.doInstall like in the
> diff below
>
> Now my question is if this is correct solution for the problem or
> will it have other side effects that I am not aware of? How do I
> write tests for an ConflicError during startup?
>
> /Sasha
>
> Index: fiveconfigure.py
>
>
> ===================================================================
>
>
> --- fiveconfigure.py (revision 86781)
>
>
> +++ fiveconfigure.py (working copy)
>
>
> @@ -23,7 +23,7 @@
>
>
> import warnings
>
>
>
>
>
> import App.config
>
>
> -from App.Product import initializeProduct
>
>
> +from App.Product import initializeProduct, doInstall
>
>
> from App.ProductContext import ProductContext
>
>
> import Products
>
>
> from zLOG import LOG, ERROR
>
>
> @@ -265,6 +265,8 @@
>
>
> if not hasattr(module_, '__path__'):
>
>
> raise ValueError("Must be a package and the " \
>
>
> "package must be filesystem based")
>
>
> + if not doInstall():
>
>
> + return
>
>
>
>
>
> app = Zope2.app()
>
>
> try:
>
>
>
>
> 2008-05-16 11:48:17 ERROR Zope Couldn't install Five
> Traceback (most recent call last):
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
> line 783, in install_product
> initmethod(context)
> File
> "/Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py",
> line 31, in initialize
> zcml.load_site()
> File
> "/Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py",
> line 41, in load_site
> _context = xmlconfig.file(file)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 560, in file
> context.execute_actions()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py",
> line 612, in execute_actions
> callable(*args, **kw)
> File
> "/Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py",
> line 285, in _registerPackage
> transaction.commit()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py",
> line 96, in commit
> return self.get().commit(sub, deprecation_wng=False)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
> line 380, in commit
> self._saveCommitishError() # This raises!
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
> line 378, in commit
> self._commitResources()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
> line 433, in _commitResources
> rm.commit(self)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
> line 484, in commit
> self._commit(transaction)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
> line 518, in _commit
> raise ConflictError(object=obj)
> ConfigurationExecutionError: ZODB.POSException.ConflictError:
> database conflict error (oid 0x28f61f, class App.Product.Product)
> in:
> File
> "/Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml",
> line 5.4-5.65
> <five:registerPackage package="." initialize=".initialize" />
>
> Traceback (most recent call last):
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py",
> line 56, in ?
> run()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py",
> line 21, in run
> starter.prepare()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py",
> line 98, in prepare
> self.startZope()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py",
> line 257, in startZope
> Zope2.startup()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/__init__.py",
> line 47, in startup
> _startup()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/App/startup.py",
> line 103, in startup
> OFS.Application.initialize(application)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
> line 304, in initialize
> initializer.initialize()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
> line 333, in initialize
> self.install_products()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
> line 605, in install_products
> return install_products(app)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
> line 636, in install_products
> folder_permissions, raise_exc=debug_mode)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
> line 783, in install_product
> initmethod(context)
> File
> "/Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py",
> line 31, in initialize
> zcml.load_site()
> File
> "/Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py",
> line 41, in load_site
> _context = xmlconfig.file(file)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 560, in file
> context.execute_actions()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py",
> line 612, in execute_actions
> callable(*args, **kw)
> File
> "/Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py",
> line 285, in _registerPackage
> transaction.commit()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py",
> line 96, in commit
> return self.get().commit(sub, deprecation_wng=False)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
> line 380, in commit
> self._saveCommitishError() # This raises!
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
> line 378, in commit
> self._commitResources()
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
> line 433, in _commitResources
> rm.commit(self)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
> line 484, in commit
> self._commit(transaction)
> File
> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
> line 518, in _commit
> raise ConflictError(object=obj)
> zope.configuration.config.ConfigurationExecutionError:
> ZODB.POSException.ConflictError: database conflict error (oid
> 0x28f61f, class App.Product.Product)
> in:
> File
> "/Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml",
> line 5.4-5.65
> <five:registerPackage package="." initialize=".initialize" />
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Zope-Dev maillist - Zope-Dev[at]zope.org
> http://mail.zope.org/mailman/listinfo/zope-dev
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope )

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


ra at burningman

May 20, 2008, 11:30 AM

Post #4 of 10 (337 views)
Permalink
Re: Five registerPackage results in unresolved ConflictError [In reply to]

Philipp von Weitershausen wrote:
> Believe something very very rotten in Five's registerPackage was fixed
> by Rocky in r72986 [1]. As far as I can tell this was never merged to
> the 1.4 branch, but I could we wrong.

i can confirm that this seems to be helping. there's an easier way to
generate the error that Sasha is seeing... you can reliably reproduce it on
Zope 2.9.x w/ Five 1.4 just by starting a zeo server with no Data.fs file, and
then trying to connect with a zeo client. if you have any
<five:registerPackage> tags, the first connection will _always_ fail with a
ConflictError. subsequent connections will work, but the initial one will
fail. (we've had to put a './zopectl run do_nothing.py' steps into our build
code... :-P)

anyway, the error is not happening with Zope 2.10 and Five 1.5.6. glad to
know it's been resolved. :-)

-r


> [1] http://svn.zope.org/?rev=72986&view=rev
>
>
> Sasha Vincic wrote:
>> Forgot to say that this is Zope 2.9.8, Five 1.4 branch from svn, Plone
>> 2.5.5
>>
>> /Sasha
>>
>> On Fri, May 16, 2008 at 12:03 PM, Sasha Vincic <sasha.vincic[at]gmail.com
>> <mailto:sasha.vincic[at]gmail.com>> wrote:
>>
>> Hi
>>
>> On a server we have a ZEO server with 6 clients. When we
>> start/restart the server we often get on random instance an
>> AttributeError @@plone and all other browser pages. I have tracked
>> it down to a ConflictError when installing Five on startup. See
>> traceback bellow. To solve this I tried to set
>> enable-product-installation = off to all except one instance but I
>> still got errors.
>> For now we restart the broken instances until they work, I have
>> tried to set sleeping times up to couple seconds between the
>> instances but it didn't make any difference.
>>
>> Five fails when it tries to execute the registerPackage in zcml
>> files. Not the same product every time.
>> First I thought it didn't respect the enable-product-instalation but
>> that is checked in App.Product.initializeProduct method. So I
>> played in fiveconfigure.py with transaction.savepoint() but no
>> success but if I manually check App.Product.doInstall like in the
>> diff below
>> Now my question is if this is correct solution for the problem or
>> will it have other side effects that I am not aware of? How do I
>> write tests for an ConflicError during startup?
>>
>> /Sasha
>>
>> Index: fiveconfigure.py
>>
>>
>> ===================================================================
>>
>>
>> --- fiveconfigure.py (revision
>> 86781)
>>
>>
>> +++ fiveconfigure.py (working
>> copy)
>>
>>
>> @@ -23,7 +23,7 @@
>>
>>
>> import
>> warnings
>>
>>
>>
>>
>>
>> import
>> App.config
>>
>>
>> -from App.Product import
>> initializeProduct
>>
>>
>> +from App.Product import initializeProduct, doInstall
>>
>>
>> from App.ProductContext import
>> ProductContext
>>
>>
>> import
>> Products
>>
>>
>> from zLOG import LOG,
>> ERROR
>>
>>
>> @@ -265,6 +265,8 @@
>>
>>
>> if not hasattr(module_, '__path__'):
>>
>>
>> raise ValueError("Must be a package and the "
>> \
>>
>>
>> "package must be filesystem based")
>>
>>
>> + if not
>> doInstall():
>>
>>
>> + return
>>
>>
>>
>>
>>
>> app =
>> Zope2.app()
>>
>>
>> try:
>>
>>
>>
>> 2008-05-16 11:48:17 ERROR Zope Couldn't install Five
>> Traceback (most recent call last):
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
>>
>> line 783, in install_product
>> initmethod(context)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py",
>> line 31, in initialize
>> zcml.load_site()
>> File
>> "/Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py",
>> line 41, in load_site
>> _context = xmlconfig.file(file)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
>>
>> line 560, in file
>> context.execute_actions()
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py",
>>
>> line 612, in execute_actions
>> callable(*args, **kw)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py",
>>
>> line 285, in _registerPackage
>> transaction.commit()
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py",
>>
>> line 96, in commit
>> return self.get().commit(sub, deprecation_wng=False)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
>>
>> line 380, in commit
>> self._saveCommitishError() # This raises!
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
>>
>> line 378, in commit
>> self._commitResources()
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
>>
>> line 433, in _commitResources
>> rm.commit(self)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
>>
>> line 484, in commit
>> self._commit(transaction)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
>>
>> line 518, in _commit
>> raise ConflictError(object=obj)
>> ConfigurationExecutionError: ZODB.POSException.ConflictError:
>> database conflict error (oid 0x28f61f, class App.Product.Product)
>> in:
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml",
>>
>> line 5.4-5.65
>> <five:registerPackage package="." initialize=".initialize" />
>>
>> Traceback (most recent call last):
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py",
>>
>> line 56, in ?
>> run()
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py",
>>
>> line 21, in run
>> starter.prepare()
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py",
>>
>> line 98, in prepare
>> self.startZope()
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py",
>>
>> line 257, in startZope
>> Zope2.startup()
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/__init__.py",
>>
>> line 47, in startup
>> _startup()
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/App/startup.py",
>>
>> line 103, in startup
>> OFS.Application.initialize(application)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
>>
>> line 304, in initialize
>> initializer.initialize()
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
>>
>> line 333, in initialize
>> self.install_products()
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
>>
>> line 605, in install_products
>> return install_products(app)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
>>
>> line 636, in install_products
>> folder_permissions, raise_exc=debug_mode)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
>>
>> line 783, in install_product
>> initmethod(context)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py",
>> line 31, in initialize
>> zcml.load_site()
>> File
>> "/Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py",
>> line 41, in load_site
>> _context = xmlconfig.file(file)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
>>
>> line 560, in file
>> context.execute_actions()
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py",
>>
>> line 612, in execute_actions
>> callable(*args, **kw)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py",
>>
>> line 285, in _registerPackage
>> transaction.commit()
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py",
>>
>> line 96, in commit
>> return self.get().commit(sub, deprecation_wng=False)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
>>
>> line 380, in commit
>> self._saveCommitishError() # This raises!
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
>>
>> line 378, in commit
>> self._commitResources()
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
>>
>> line 433, in _commitResources
>> rm.commit(self)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
>>
>> line 484, in commit
>> self._commit(transaction)
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
>>
>> line 518, in _commit
>> raise ConflictError(object=obj)
>> zope.configuration.config.ConfigurationExecutionError:
>> ZODB.POSException.ConflictError: database conflict error (oid
>> 0x28f61f, class App.Product.Product)
>> in:
>> File
>>
>> "/Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml",
>>
>> line 5.4-5.65
>> <five:registerPackage package="." initialize=".initialize" />
>>

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


sasha.vincic at gmail

May 21, 2008, 3:47 AM

Post #5 of 10 (327 views)
Permalink
Re: Re: Five registerPackage results in unresolved ConflictError [In reply to]

On Tue, May 20, 2008 at 8:30 PM, Rob Miller <ra[at]burningman.com> wrote:

> Philipp von Weitershausen wrote:
>
>> Believe something very very rotten in Five's registerPackage was fixed by
>> Rocky in r72986 [1]. As far as I can tell this was never merged to the 1.4
>> branch, but I could we wrong.
>>
>
This seams to work when you start instances without debug, which production
is but it still fails the same way with debug on.


>
> i can confirm that this seems to be helping. there's an easier way to
> generate the error that Sasha is seeing... you can reliably reproduce it on
> Zope 2.9.x w/ Five 1.4 just by starting a zeo server with no Data.fs file,
> and then trying to connect with a zeo client. if you have any
> <five:registerPackage> tags, the first connection will _always_ fail with a
> ConflictError. subsequent connections will work, but the initial one will
> fail. (we've had to put a './zopectl run do_nothing.py' steps into our
> build code... :-P)
>

So you run ./zopectl run do_nothing.py before you started each instance? Is
that better then my doInstall() check?

/Sasha


>
> anyway, the error is not happening with Zope 2.10 and Five 1.5.6. glad to
> know it's been resolved. :-)
>
> -r
>
>
>
> [1] http://svn.zope.org/?rev=72986&view=rev
>>
>>
>> Sasha Vincic wrote:
>>
>>> Forgot to say that this is Zope 2.9.8, Five 1.4 branch from svn, Plone
>>> 2.5.5
>>>
>>> /Sasha
>>>
>>> On Fri, May 16, 2008 at 12:03 PM, Sasha Vincic <sasha.vincic[at]gmail.com<mailto:
>>> sasha.vincic[at]gmail.com>> wrote:
>>>
>>> Hi
>>>
>>> On a server we have a ZEO server with 6 clients. When we
>>> start/restart the server we often get on random instance an
>>> AttributeError @@plone and all other browser pages. I have tracked
>>> it down to a ConflictError when installing Five on startup. See
>>> traceback bellow. To solve this I tried to set
>>> enable-product-installation = off to all except one instance but I
>>> still got errors.
>>> For now we restart the broken instances until they work, I have
>>> tried to set sleeping times up to couple seconds between the
>>> instances but it didn't make any difference.
>>>
>>> Five fails when it tries to execute the registerPackage in zcml
>>> files. Not the same product every time.
>>> First I thought it didn't respect the enable-product-instalation but
>>> that is checked in App.Product.initializeProduct method. So I
>>> played in fiveconfigure.py with transaction.savepoint() but no
>>> success but if I manually check App.Product.doInstall like in the
>>> diff below
>>> Now my question is if this is correct solution for the problem or
>>> will it have other side effects that I am not aware of? How do I
>>> write tests for an ConflicError during startup?
>>>
>>> /Sasha
>>>
>>> Index: fiveconfigure.py
>>>
>>>
>>> ===================================================================
>>>
>>> ---
>>> fiveconfigure.py (revision 86781)
>>>
>>> +++ fiveconfigure.py
>>> (working copy)
>>>
>>> @@ -23,7 +23,7 @@
>>>
>>>
>>> import warnings
>>>
>>>
>>>
>>>
>>> import App.config
>>>
>>>
>>> -from App.Product import
>>> initializeProduct
>>>
>>> +from App.Product import initializeProduct,
>>> doInstall
>>>
>>> from App.ProductContext import ProductContext
>>>
>>>
>>> import Products
>>>
>>> from zLOG import
>>> LOG, ERROR
>>>
>>> @@ -265,6 +265,8 @@
>>>
>>>
>>> if not hasattr(module_, '__path__'):
>>>
>>>
>>> raise ValueError("Must be a package and the " \
>>>
>>>
>>> "package must be filesystem based")
>>>
>>> + if not doInstall():
>>>
>>>
>>> + return
>>>
>>>
>>>
>>>
>>> app =
>>> Zope2.app()
>>>
>>> try:
>>>
>>>
>>>
>>> 2008-05-16 11:48:17 ERROR Zope Couldn't install Five
>>> Traceback (most recent call last):
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
>>>
>>> line 783, in install_product
>>> initmethod(context)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py",
>>> line 31, in initialize
>>> zcml.load_site()
>>> File
>>> "/Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py",
>>> line 41, in load_site
>>> _context = xmlconfig.file(file)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
>>>
>>> line 560, in file
>>> context.execute_actions()
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py",
>>>
>>> line 612, in execute_actions
>>> callable(*args, **kw)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py",
>>>
>>> line 285, in _registerPackage
>>> transaction.commit()
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py",
>>>
>>> line 96, in commit
>>> return self.get().commit(sub, deprecation_wng=False)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
>>>
>>> line 380, in commit
>>> self._saveCommitishError() # This raises!
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
>>>
>>> line 378, in commit
>>> self._commitResources()
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
>>>
>>> line 433, in _commitResources
>>> rm.commit(self)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
>>>
>>> line 484, in commit
>>> self._commit(transaction)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
>>>
>>> line 518, in _commit
>>> raise ConflictError(object=obj)
>>> ConfigurationExecutionError: ZODB.POSException.ConflictError:
>>> database conflict error (oid 0x28f61f, class App.Product.Product)
>>> in:
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml",
>>>
>>> line 5.4-5.65
>>> <five:registerPackage package="." initialize=".initialize" />
>>>
>>> Traceback (most recent call last):
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py",
>>>
>>> line 56, in ?
>>> run()
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py",
>>>
>>> line 21, in run
>>> starter.prepare()
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py",
>>>
>>> line 98, in prepare
>>> self.startZope()
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py",
>>>
>>> line 257, in startZope
>>> Zope2.startup()
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/__init__.py",
>>>
>>> line 47, in startup
>>> _startup()
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/App/startup.py",
>>>
>>> line 103, in startup
>>> OFS.Application.initialize(application)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
>>>
>>> line 304, in initialize
>>> initializer.initialize()
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
>>>
>>> line 333, in initialize
>>> self.install_products()
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
>>>
>>> line 605, in install_products
>>> return install_products(app)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
>>>
>>> line 636, in install_products
>>> folder_permissions, raise_exc=debug_mode)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py",
>>>
>>> line 783, in install_product
>>> initmethod(context)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py",
>>> line 31, in initialize
>>> zcml.load_site()
>>> File
>>> "/Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py",
>>> line 41, in load_site
>>> _context = xmlconfig.file(file)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
>>>
>>> line 560, in file
>>> context.execute_actions()
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py",
>>>
>>> line 612, in execute_actions
>>> callable(*args, **kw)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py",
>>>
>>> line 285, in _registerPackage
>>> transaction.commit()
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py",
>>>
>>> line 96, in commit
>>> return self.get().commit(sub, deprecation_wng=False)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
>>>
>>> line 380, in commit
>>> self._saveCommitishError() # This raises!
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
>>>
>>> line 378, in commit
>>> self._commitResources()
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py",
>>>
>>> line 433, in _commitResources
>>> rm.commit(self)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
>>>
>>> line 484, in commit
>>> self._commit(transaction)
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py",
>>>
>>> line 518, in _commit
>>> raise ConflictError(object=obj)
>>> zope.configuration.config.ConfigurationExecutionError:
>>> ZODB.POSException.ConflictError: database conflict error (oid
>>> 0x28f61f, class App.Product.Product)
>>> in:
>>> File
>>>
>>> "/Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml",
>>>
>>> line 5.4-5.65
>>> <five:registerPackage package="." initialize=".initialize" />
>>>
>>>
> _______________________________________________
> Zope-Dev maillist - Zope-Dev[at]zope.org
> http://mail.zope.org/mailman/listinfo/zope-dev
> ** No cross posts or HTML encoding! **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope )
>


slinkp at gmail

May 21, 2008, 6:06 AM

Post #6 of 10 (324 views)
Permalink
Re: Re: Five registerPackage results in unresolved ConflictError [In reply to]

On Wed, May 21, 2008 at 12:47:58PM +0200, Sasha Vincic wrote:
> So you run ./zopectl run do_nothing.py before you started each
> instance?

We do it just once, right after building a new instance; the instance
starts up fine forever after that.

> Is that better then my doInstall() check?

Well, no, it's just a workaround, so it's certainly not better
than a fix to the underlying problem.


--

Paul Winkler
http://www.slinkp.com
_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


dieter at handshake

May 21, 2008, 11:20 PM

Post #7 of 10 (315 views)
Permalink
Re: Re: Five registerPackage results in unresolved ConflictError [In reply to]

Sasha Vincic wrote at 2008-5-21 12:47 +0200:
>On Tue, May 20, 2008 at 8:30 PM, Rob Miller <ra[at]burningman.com> wrote:
>
>> Philipp von Weitershausen wrote:
>>
>>> Believe something very very rotten in Five's registerPackage was fixed by
>>> Rocky in r72986 [1]. As far as I can tell this was never merged to the 1.4
>>> branch, but I could we wrong.
>>>
>>
>This seams to work when you start instances without debug, which production
>is but it still fails the same way with debug on.

This looks like the misfeature "Zope does not start in debug mode
when a single product import fails". In non debug mode, product
import failures are logged but Zope nevertheless starts.



--
Dieter
_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


mh at gocept

May 22, 2008, 1:59 AM

Post #8 of 10 (311 views)
Permalink
Re: Re: Five registerPackage results in unresolved ConflictError [In reply to]

Am 22.05.2008 um 08:20 schrieb Dieter Maurer:
> [...]
> This looks like the misfeature "Zope does not start in debug mode
> when a single product import fails". In non debug mode, product
> import failures are logged but Zope nevertheless starts.


I don't think that this is a misfeature because in debug mode you want
to know if something fails as early as possible, so you can fix it.

Yours sincerely,
--
Michael Howitz · mh[at]gocept.com · software developer
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1
Zope and Plone consulting and development

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


sasha.vincic at gmail

May 22, 2008, 3:15 AM

Post #9 of 10 (305 views)
Permalink
Re: Re: Five registerPackage results in unresolved ConflictError [In reply to]

On Thu, May 22, 2008 at 8:20 AM, Dieter Maurer <dieter[at]handshake.de> wrote:

> Sasha Vincic wrote at 2008-5-21 12:47 +0200:
> >On Tue, May 20, 2008 at 8:30 PM, Rob Miller <ra[at]burningman.com> wrote:
> >
> >> Philipp von Weitershausen wrote:
> >>
> >>> Believe something very very rotten in Five's registerPackage was fixed
> by
> >>> Rocky in r72986 [1]. As far as I can tell this was never merged to the
> 1.4
> >>> branch, but I could we wrong.
> >>>
> >>
> >This seams to work when you start instances without debug, which
> production
> >is but it still fails the same way with debug on.
>
> This looks like the misfeature "Zope does not start in debug mode
> when a single product import fails". In non debug mode, product
> import failures are logged but Zope nevertheless starts.


Well the thing is it doesn't fail in non debug mode. Before it said "Failed
to install Five" and everything in that instance was broken but with this
change the instance works fine in non debug mode.

/Sasha


dieter at handshake

May 23, 2008, 11:17 AM

Post #10 of 10 (287 views)
Permalink
Re: Re: Five registerPackage results in unresolved ConflictError [In reply to]

Michael Howitz wrote at 2008-5-22 10:59 +0200:
> ...
>Am 22.05.2008 um 08:20 schrieb Dieter Maurer:
>> [...]
>> This looks like the misfeature "Zope does not start in debug mode
>> when a single product import fails". In non debug mode, product
>> import failures are logged but Zope nevertheless starts.
>
>
>I don't think that this is a misfeature because in debug mode you want
>to know if something fails as early as possible, so you can fix it.

I know that I do *not* want a failing Zope start -- especially
due to the other misfeature that startup problems are difficult to
analyse (as they are not logged).

Especially, I hate major differences between production and development
versions -- along the line of this thread (works only in production,
not in development version).



--
Dieter
_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.