Re: Re: [Zope] Mouting + Logging Errors after Zope Upgrade 2.7.4 --> 2.11.1
Wolfgang Lausenhammer wrote at 2008-8-4 09:56 +0200: >I just tried to lock the file manually and it works >But I recognized when zope reports those errors with locking, the reported >file can't be opened in the filesystem also, so it is really locked. It >seems that zope doesn't unlock it and so if zope tries to access it again Zope locks the file to prevent concurrent use of the storage (which is not supported and would corrupt the storage). Thus, while a process accessing a storage is running, another process is prevented from opening it. When a process finished, the operating system would automatically release the lock (when the process has not done it itself). >Altough the error doesn't have any effect on the website I'm running... >Kinda strange.. Looks like there was a running Zope process -- the lock of which prevented the start of a new one -- as it should be... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: Re: [Zope] Mouting + Logging Errors after Zope Upgrade 2.7.4 --> 2.11.1
Thank you for your answer. I just tried to lock the file manually and it works But I recognized when zope reports those errors with locking, the reported file can't be opened in the filesystem also, so it is really locked. It seems that zope doesn't unlock it and so if zope tries to access it again (thus locking it again) it can't because it is locked... (I never call the locking-function manually) Altough the error doesn't have any effect on the website I'm running... Kinda strange.. -- Wolfgang "Dieter Maurer" <[EMAIL PROTECTED]> schrieb am 02.08.2008 09:45:50: > > Wolfgang Lausenhammer wrote at 2008-8-1 09:20 +0200: > > ... > >__init__ > > File "D:\zope\2.11.1\Zope\lib\python\ZODB\lock_file.py", line 42, in > >_lock_file > >LockError: Couldn't lock > >'D:\\workspace_zope\\xla-2008/var/Stdcontainer_o.fs.lock' > > A look at the code reveals: > > # Windows > def _lock_file(file): > # Lock just the first byte > try: > msvcrt.locking(file.fileno(), msvcrt.LK_NBLCK, 1) > except IOError: > raise LockError("Couldn't lock %r" % file.name) > > Thus, your Windows operating system reported a problem > in "msvcrt.locking". > > Emulate the operation in an interactive Python interpreter > and more carefully look at the error indication. > Consult your OS documentation to find out the reasons for the problem. > > > > -- > Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Mouting + Logging Errors after Zope Upgrade 2.7.4 --> 2.11.1
Wolfgang Lausenhammer wrote at 2008-8-1 09:20 +0200: > ... >__init__ > File "D:\zope\2.11.1\Zope\lib\python\ZODB\lock_file.py", line 42, in >_lock_file >LockError: Couldn't lock >'D:\\workspace_zope\\xla-2008/var/Stdcontainer_o.fs.lock' A look at the code reveals: # Windows def _lock_file(file): # Lock just the first byte try: msvcrt.locking(file.fileno(), msvcrt.LK_NBLCK, 1) except IOError: raise LockError("Couldn't lock %r" % file.name) Thus, your Windows operating system reported a problem in "msvcrt.locking". Emulate the operation in an interactive Python interpreter and more carefully look at the error indication. Consult your OS documentation to find out the reasons for the problem. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: Re: [Zope] Mouting + Logging Errors after Zope Upgrade 2.7.4 --> 2.11.1
> > Wolfgang Lausenhammer wrote: > > > > LockError: Couldn't lock > > 'D:\\workspace_zope\\xla-2008/var/Stdcontainer_o.fs.lock' > > Can the user the zope process is running as write to this file? > (or create it, since it likely doesn't exist?) The file is existing. I tried to delete all the .index, .lock, .tmp files in the var-folder and zope re-creates them on calling the /manage site, so there shouldn't be a problem with writing-permissions > > TypeError: not all arguments converted during string formatting > > Traceback (most recent call last): > > File "D:\zope\2.11.1\Python\Lib\logging\__init__.py", line 731, in emit > > File "D:\zope\2.11.1\Python\Lib\logging\__init__.py", line 617, in format > > File "D:\zope\2.11.1\Python\Lib\logging\__init__.py", line 405, in format > > > > File "D:\zope\2.11.1\Python\Lib\logging\__init__.py", line 276, in > > getMessage > > self.cfg.eventlog() > > This looks like a bug. Would be good to find where the incorrect logging > call is and fix it :-S With the old 2.7.4 version it does work. I also tried to upgrade it in steps, with zope-2.8.6 it still works and none of those two error messages appear. With zope-2.9.8 at least one of these errors appeared. Has there anything changed in the interface within those versions? The changelog of 2.9.0 says: "Zope now utilizes ZODB 3.6. It had previously used ZODB 3.4. As a result, the DBTab package was removed, as ZODB 3.6 has multidatabase support that makes DBTab unnecessary." Could this cause those errors? -- Wolfgang___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Mouting + Logging Errors after Zope Upgrade 2.7.4 --> 2.11.1
Wolfgang Lausenhammer wrote: LockError: Couldn't lock 'D:\\workspace_zope\\xla-2008/var/Stdcontainer_o.fs.lock' Can the user the zope process is running as write to this file? (or create it, since it likely doesn't exist?) TypeError: not all arguments converted during string formatting Traceback (most recent call last): File "D:\zope\2.11.1\Python\Lib\logging\__init__.py", line 731, in emit File "D:\zope\2.11.1\Python\Lib\logging\__init__.py", line 617, in format File "D:\zope\2.11.1\Python\Lib\logging\__init__.py", line 405, in format File "D:\zope\2.11.1\Python\Lib\logging\__init__.py", line 276, in getMessage self.cfg.eventlog() This looks like a bug. Would be good to find where the incorrect logging call is and fix it :-S cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )