[Zope] Xron Issue

Tim Owen timowen@voyager.net
Tue, 5 Feb 2002 05:49:03 -0500


I have two Xron issues that I am seeking assistance with:

1. I am getting the following error when the email_reminder_job gets
triggered by the Xron scheduler.  I also included a thread with Loren for
additional context below the events.log contents as well.  Anyone have ideas
on what I am doing wrong?  The event is scheduled for 5:30 AM EST, 10:30 AM
GMT.  It looks like it tried to run but got a bci.NotAvailable with a
connection refused error.  I have the admin folder secured but set the job
up with manager, owner, and authenticated proxy rights.  I also made the
security rights not be acquired, but allowed all rights to the manager,
owner, and authenticated users.  After the job gets triggered and fails, it
says it fails to disarm the event but the event disappears when I click on
the schedule object in the ZMI after the job fails.

2. I recatalogged this morning at 5:56 AM which causes a conflict error and
the dispatcher thread to die.  Not sure what the conflict is unless it
relates to the fact that I have another folder
(http://www.iresolve.com:8080/iResolve-tim/admin/email_reminder_job) an
XronDTMLMethod object with the same name.  The second one is for testing
purposes and is currently turned off.  I renamed the second one and
recatalogged again with the same error.  I am using ZEO if that matters.

Log messages:

2002-02-05T10:30:00 PROBLEM(100) Products.Xron.Loggerr
Trigger event:
http://www.iresolve.com:8080/iResolve/admin/email_reminder_job
Trigger time: 2002/02/05 05:30:00 US/Eastern
Failed to trigger event.
Type=bci.NotAvailable
Val=(61, 'Connection refused') (File:
http://www.iresolve.com:8080/iResolve/admin/email_reminder_job/trigger Line:
[])
None None for None
------
2002-02-05T10:30:01 PROBLEM(100) Products.Xron.Loggerr Failed to disarm
event
------
2002-02-05T10:56:42 (302) Products.Xron.Loggerr Cannot access catalog.
Suspending operation.
Traceback (most recent call last):
  File "/usr/local/zope/instance/Products/Xron/Dispatcher.py", line 97, in
Timer
    (atime, aurl)=Schedule.armed_event() # Get next armed event
  File "/usr/local/zope/instance/Products/Xron/Schedule.py", line 126, in
armed_event
    for event in self._catalog.searchResults(
  File "/usr/local/zope/2.4.3/lib/python/ZODB/Connection.py", line 535, in
setstate
    raise ConflictError(`oid`, `object.__class__`)
ConflictError: ("'\\x00\\x00\\x00\\x00\\x00\\x00gT'", '<extension class
Products.ZCatalog.Catalog.Catalog at 865d500>')
Traceback (innermost last):
  File /usr/local/zope/instance/Products/Xron/Dispatcher.py, line 97, in
Timer
  File /usr/local/zope/instance/Products/Xron/Schedule.py, line 126, in
armed_event
    (Object: Schedule)
  File /usr/local/zope/2.4.3/lib/python/ZODB/Connection.py, line 535, in
setstate
ConflictError: ("'\\x00\\x00\\x00\\x00\\x00\\x00gT'", '<extension class
Products.ZCatalog.Catalog.Catalog at 865d500>')


------
2002-02-05T10:56:42 PROBLEM(100) Products.Xron.Loggerr Dispatcher thread is
terminating.
------
2002-02-05T10:59:31 ERROR(200) Catalog uncatalogObject unsuccessfully
attempted to uncatalog an object with a uid of /i
Resolve/admin/email_reminder_job.

>>>>>>
Previous thread with Loren Stafford:

From: Loren Stafford
Sent: Monday, February 04, 2002 12:47 PM
To: Tim Owen [mailto:timowen@voyager.net]
Subject: Re: Xron Question

It should not be difficult to manually create your Xron DTML Method on the
production server (carefully, in a version), thereby ruling out problems in
zsysc'ing.

A copyied Xron DTML Method won't get put in the schedule, because cataloging
only occurrs when the method is created or updated. You can get it in the
schedule by editing it's trigger time in the XMI. You don't actually have to
change it, just get Zope to think you changed it.

2002-02-03T16:16:33 PROBLEM(100) Products.Xron.Loggerr
Trigger event:
http://www.iresolve.com:8080/iResolve-tim/admin/email_reminder_job
Trigger time: 2002/02/03 05:30:00 US/Eastern
Failed to trigger event.
Type=bci.NotAvailable
Val=(61, 'Connection refused') (File:
http://www.iresolve.com:8080/iResolve-tim/admin/email_reminder_job/tri
gger Line: [])
None None for None

This is pretty serious. It indicates that the socket that Client.py uses to
fire a scheduled method is not working. That would be a system-depended
problem. I would try:

1) tracing with PDB, starting with the dispatcher and following it into
client.py, to see if there's any obvious reason the connection is not
working. You can uncomment relevant trace statements in Xron code.

2) making a little Client.py application to try to isolate that problem.
There's a How-To on that subject somewhere on www.zope.org.

That may be the cause of the errors that show later in the log. In any case,
Xron won't work if Client.py doesn't work. Client.py is a standard part of
Zope that Xron calls to simulate a client request for the Xron DTML Method.
There used to be a problem using it with port designators in the URL, but
that problem was fixed in an earlier version of Zope. Still, I haven't
upgraded to 2.4.3, so I can't testify that Xron works there.

You should copy these messages to the zope@zope.org list. Maybe somebody
there has prior knowledge of the problem. But no HTML-encoded messages are
allowed there. I'll leave that up to you.

-- Loren

-----Original Message-----
From: Tim Owen [mailto:timowen@voyager.net]
Sent: Monday, February 04, 2002 2:35 AM
To: Loren Stafford
Subject: Re: Xron Question


I think this is either a permissions error or an error due to copying the
XronDTMLMethod from my development server to the production server.  I used
Zsyncer to move it to the production server then copied to the production
folder.  The reference to D:\Program
Files\iResolve\lib\python\Products\Xron\Dispatcher.py and other Python files
on the D: drive refers to my development Windows drive and directory.  I
deploy on an iMeme hosted server running FreeBSD.

The iResolve-tim folder is a test folder on the production server.  The
production folder is iResolve.  In the scheduler it actually only finds and
catalogs the copy in the production admin folder not the test folder.
Should I recreate the scheduled job in the production folder?

Here is the error I get after successfully creating the new schedule:

------
2002-02-03T16:16:33 PROBLEM(100) Products.Xron.Loggerr
Trigger event:
http://www.iresolve.com:8080/iResolve-tim/admin/email_reminder_job
Trigger time: 2002/02/03 05:30:00 US/Eastern
Failed to trigger event.
Type=bci.NotAvailable
Val=(61, 'Connection refused') (File:
http://www.iresolve.com:8080/iResolve-tim/admin/email_reminder_job/tri
gger Line: [])
None None for None
------
2002-02-03T16:16:33 PROBLEM(100) Products.Xron.Loggerr Failed to disarm
event
------
2002-02-03T16:32:42 (302) Products.Xron.Loggerr Cannot access catalog.
Suspending operation.
Traceback (most recent call last):
  File "D:\Program Files\iResolve\lib\python\Products\Xron\Dispatcher.py",
line 97, in Timer
  File "D:\Program Files\iResolve\lib\python\Products\Xron\Schedule.py",
line 129, in armed_event
  File "/usr/local/zope/2.4.3/lib/python/Products/ZCatalog/Catalog.py", line
650, in searchResults
    used=self._indexedSearch(kw, sort_index, r.append, used)
  File "/usr/local/zope/2.4.3/lib/python/Products/ZCatalog/Catalog.py", line
538, in _indexedSearch
    r=index._apply_index(request)
  File
"/usr/local/zope/2.4.3/lib/python/Products/PluginIndexes/common/UnIndex.py",
line 421, in _apply_inde
x
    setlist = index.items(lo)
  File "/usr/local/zope/2.4.3/lib/python/ZODB/Connection.py", line 535, in
setstate
    raise ConflictError(`oid`, `object.__class__`)
ConflictError: ("'\\x00\\x00\\x00\\x00\\x00\\x00gb'", '<extension class
BTrees.OOBTree.OOBTree at 28324ea0>'
)
Traceback (innermost last):
  File D:\Program Files\iResolve\lib\python\Products\Xron\Dispatcher.py,
line 97, in Timer
  File D:\Program Files\iResolve\lib\python\Products\Xron\Schedule.py, line
129, in armed_event
    (Object: Schedule)
  File /usr/local/zope/2.4.3/lib/python/Products/ZCatalog/Catalog.py, line
650, in searchResults
  File /usr/local/zope/2.4.3/lib/python/Products/ZCatalog/Catalog.py, line
538, in _indexedSearch
  File
/usr/local/zope/2.4.3/lib/python/Products/PluginIndexes/common/UnIndex.py,
line 421, in _apply_index
    (Object: nextEventTime)
  File /usr/local/zope/2.4.3/lib/python/ZODB/Connection.py, line 535, in
setstate
ConflictError: ("'\\x00\\x00\\x00\\x00\\x00\\x00gb'", '<extension class
BTrees.OOBTree.OOBTree at 28324ea0>'
)

------
2002-02-03T16:32:42 PROBLEM(100) Products.Xron.Loggerr Dispatcher thread is
terminating.

___________________
Tim Owen
Cell: 517.285.7071
Home: 989.224.4905
eFax: 425.940.5905