Re: Re: [Zope] Mouting + Logging Errors after Zope Upgrade 2.7.4 --> 2.11.1

2008-08-10 Thread Dieter Maurer
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

2008-08-04 Thread Wolfgang Lausenhammer
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

2008-08-02 Thread Dieter Maurer
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

2008-08-01 Thread Wolfgang Lausenhammer
> 
> 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

2008-08-01 Thread Chris Withers

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 )


[Zope] Mouting + Logging Errors after Zope Upgrade 2.7.4 --> 2.11.1

2008-08-01 Thread Wolfgang Lausenhammer
Hello!

My company wants me to upgrade the timeworn zope-2.7.4 to one of the 
newest ones available.
I decided to take zope-2.11.1 but after installing and running it in 
debug-mode i get the following error-messages:

2008-08-01T09:04:39 ERROR Zope.ZODBMountPoint Failed to mount database. 
ZODB.lock_file.LockError (Couldn't lock 
'D:\\workspace_zope\\xla-2008/var/Stdcontainer_o.fs.lock')
Traceback (most recent call last):
  File 
"D:\zope\2.11.1\Zope\lib\python\Products\ZODBMountPoint\MountedObject.py", 
line 257, in _getOrOpenObject
  File 
"D:\zope\2.11.1\Zope\lib\python\Products\ZODBMountPoint\MountedObject.py", 
line 147, in _getMountedConnection
  File 
"D:\zope\2.11.1\Zope\lib\python\Products\ZODBMountPoint\MountedObject.py", 
line 157, in _getDB
  File "D:\zope\2.11.1\Zope\lib\python\Zope2\Startup\datatypes.py", line 
288, in getDatabase
db = factory.open(name, self.databases)
  File "D:\zope\2.11.1\Zope\lib\python\Zope2\Startup\datatypes.py", line 
186, in open
DB = self.createDB(database_name, databases)
  File "D:\zope\2.11.1\Zope\lib\python\Zope2\Startup\datatypes.py", line 
183, in createDB
return ZODBDatabase.open(self, databases)
  File "D:\zope\2.11.1\Zope\lib\python\ZODB\config.py", line 97, in open
  File "D:\zope\2.11.1\Zope\lib\python\ZODB\config.py", line 135, in open
  File "D:\zope\2.11.1\Zope\lib\python\ZODB\FileStorage\FileStorage.py", 
line 113, in __init__
  File "D:\zope\2.11.1\Zope\lib\python\ZODB\lock_file.py", line 80, in 
__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'



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()


These are not the only ones, I get the first one for 5/18 databases and 
the second one 6 times when running the /manage site
Do I have to be worried about those error messages or not?

Another thing is that those messages appear only once every restart but 
the functionality of the pages hostet isn't affected...

Hope you can help me,
-- 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 )