Discussion:
http erreur 500 au lancement d'une external method
(too old to reply)
Malika LB
2009-08-07 13:33:12 UTC
Permalink
Bonjour

j'essaie d'effectuer une opération d'archivage de documents d'un site vers
un autre (ces 2 sites sont sur la même zodb/data.fs) et j'ai une erreur http
500.

pour info ce qui remonte des logs :
*

/home/prodweb/archivelog/archive_20090624_010001.log
*

--01:00:01--
http://webprod10.ac750.recouv:8080/iliadarchive/ask_archived_document

=> `-'

Resolving webprod10.ac750.recouv... 167.9.16.181

Connecting to webprod10.ac750.recouv|167.9.16.181|:8080... connected.

HTTP request sent, awaiting response... 500 Internal Server Error

01:05:39 ERROR 500: Internal Server Error.
*

Z2.log
*

prod pb (prod10 i1)

165.9.16.181 - MLB [22/Jun/2009:02:04:59 +0200] "GET
/iliadarchive/ask_archived_document HTTP/1.0" *500* 3398 "" "Wget/1.10.2
(Red Hat modified)"

165.9.16.181 - admin [22/Jun/2009:02:30:05 +0200] "GET
/iliad/portal_repository/manage_purgeDeletedRevisions HTTP/1.0" 302 *557* ""
"Wget/1.10.2 (Red Hat modified)"

165.9.16.181 - admin [22/Jun/2009:02:30:05 +0200] "GET
/iliad/portal_repository/manage_repoInfo?manage_tabs_message=Purged.&details=1
HTTP/1.0" 200 10424 "" "Wget/1.10.2 (Red Hat modified)"



165.9.16.145 - MLB [24/Jun/2009:02:48:56 +0200] "GET
/iliadarchive/ask_archived_document HTTP/1.0" *200* 6659 "" "Wget/1.10.2
(Red Hat modified)"

165.9.16.145 - admin [24/Jun/2009:03:18:31 +0200] "GET
/iliad/portal_repository/manage_purgeDeletedRevisions HTTP/1.0" 302 542 ""
"Wget/1.10.2 (Red Hat modified)"

165.9.16.145 - admin [24/Jun/2009:03:18:33 +0200] "GET
/iliad/portal_repository/manage_repoInfo?manage_tabs_message=Purged.&details=1
HTTP/1.0" 200 10408 "" "Wget/1.10.2 (Red Hat modified)"

Envirronnement de validation ok (webint05) : ici tout ce passe bien sur
notre serveur de test :

165.9.16.145 - MLB [22/Jun/2009:05:52:33 +0200] "GET
/iliadarchive/ask_archived_document HTTP/1.0" *503* 3397 "" "Wget/1.10.2
(Red Hat modified)"

165.9.16.145 - admin [22/Jun/2009:06:19:27 +0200] "GET
/iliad/portal_repository/manage_purgeDeletedRevisions HTTP/1.0" 302 *542* ""
"Wget/1.10.2 (Red Hat modified)"

165.9.16.145 - admin [22/Jun/2009:06:19:30 +0200] "GET
/iliad/portal_repository/manage_repoInfo?manage_tabs_message=Purged.&details=1
HTTP/1.0" 200 10408 "" "Wget/1.10.2 (Red Hat modified)"

pour info voici les 2 scripts utilisés pour lancer l'external method dans
un cron :

*l' archivage :*
DATE=`date +%Y%m%d_%H%M%S`
wget --http-user=MLB --http-passwd=COP --proxy=off --timeout=1000000
http://webprod10.ac750.recouv:8080/iliadarchive/ask_archived_document -O - >
/home/prodweb/archivelog/archive_${DATE}.log 2>&1

*la purge :*
DATE=`date +%Y%m%d_%H%M%S`
wget --http-user=admin --http-passwd=admin --proxy=off --timeout=1000000
http://webprod10.ac750.recouv:8080/iliad/portal_repository/manage_purgeDeletedRevisions-O
- >/home/prodweb/archivelog/purge_${DATE}.log 2>&1


Voici le début du source de l'external method :


def ask_archived_document(self):
""" """
archive_portal = self.portal_url.getPortalObject()
connect_string = 'http://' + archive_portal.instance_admin_login_target
+ ':' + \
archive_portal.instance_admin_password_target + '@' + \
archive_portal.portal_target + ':' + \
archive_portal.port_portal_target + '/'
## pr(connect_string)

server = xmlrpclib.ServerProxy(connect_string)
cpsmcat = archive_portal.Localizer.default
## pr(str(server))
## pr(archive_portal.instance_name_target)
portal_target = getattr(server,archive_portal.instance_name_target)
docs_to_archive = portal_target.get_expired_document_list_ids()
rtool = archive_portal.portal_repository
## pr(rtool.absolute_url())
## pr(archive_portal.absolute_url())
rootsection = archive_portal.sections

rpaths_to_purge = []
pr('Liste des documents archivés')
for doc_info in docs_to_archive[:nbItemToArchive]:
docid__rev = doc_info['docid']
test=portal_target.get_pickled_document(docid__rev)
## pr(str(test))
doc = pickle.loads(test)
## pr(str(doc))
ProxyDoc = pickle.loads(doc_info['proxy'])

etc.

merci d'avance

Environment : Zope/(Zope 2.7.4-0, python 2.3.4, linux2) ZServer/1.1 CPS/3.2
2 machines clients zope webprod04 et 10 et un zeo server webprod11.

Malika LB.
ACOSS

Loading...