bird-house / pyramid-phoenix

Phoenix is a Pyramid web-application to make it easy to interact with WPS services
http://pyramid-phoenix.readthedocs.io/en/latest/
Apache License 2.0
7 stars 10 forks source link

Could not read status document after 5 retries. Giving up. #140

Closed cehbrecht closed 7 years ago

cehbrecht commented 7 years ago

sometimes the wps reponse can't not be parsed by owslib, see celery log:

$ less var/log/supervisor/celery.log

[2017-05-11 10:45:37,748: ERROR/Worker-3] phoenix.tasks.execute.execute_process[dd623852-efd3-4fff-9d82-6e4fd39a7d56]: Could not read status xml document for job dd623852-efd3-4fff-9d82-6e4fd39a7d56. Trying again ...
Traceback (most recent call last):
  File "/home/Shared/pingu/sandbox/birdhouse/pyramid-phoenix/phoenix/tasks/execute.py", line 51, in execute_process
    sleep_secs=wait_secs(run_step))
  File "/home/Shared/pingu/sandbox/birdhouse/pyramid-phoenix/phoenix/wps.py", line 40, in check_status
    execution.checkStatus(response=xml, sleepSecs=sleep_secs)
  File "/home/pingu/.conda/envs/pyramid-phoenix/lib/python2.7/site-packages/owslib/wps.py", line 702, in checkStatus
    response = reader.readFromString(response)
  File "/home/pingu/.conda/envs/pyramid-phoenix/lib/python2.7/site-packages/owslib/wps.py", line 449, in readFromString
    return etree.fromstring(string)
  File "src/lxml/lxml.etree.pyx", line 3213, in lxml.etree.fromstring (src/lxml/lxml.etree.c:79010)
  File "src/lxml/parser.pxi", line 1848, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:118341)
  File "src/lxml/parser.pxi", line 1736, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:117021)
  File "src/lxml/parser.pxi", line 1102, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:111265)
  File "src/lxml/parser.pxi", line 595, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:105109)
  File "src/lxml/parser.pxi", line 706, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:106817)
  File "src/lxml/parser.pxi", line 635, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:105671)
XMLSyntaxError: Opening and ending tag mismatch: hr line 5 and body, line 6, column 8 (line 6)
[2017-05-11 10:45:38,751: ERROR/Worker-3] phoenix.tasks.execute.execute_process[dd623852-efd3-4fff-9d82-6e4fd39a7d56]: Failed to run Job
Traceback (most recent call last):
  File "/home/Shared/pingu/sandbox/birdhouse/pyramid-phoenix/phoenix/tasks/execute.py", line 48, in execute_process
    raise Exception("Could not read status document after 5 retries. Giving up.")
Exception: Could not read status document after 5 retries. Giving up.
cehbrecht commented 7 years ago

In this case due false pywps config a status document was not written.

cehbrecht commented 7 years ago

due to a pywps-4 bug with the sqlite database the pywps service might not write a status document.

One can remote the sqlite database and restart:

$ make stop
$ rm var/lib/pywps/db/hummingbird/sqlite_db.log
$ make start
cehbrecht commented 7 years ago

pywps-4 is now patched.