Sahara PyDev Remote Debug Setup

asked 2014-08-11 15:03:07 -0600

Nastooh gravatar image

Trying to remote debug Sahara with PyDev, under Eclipse Juno, and am running to "Error reading ThreadSuspensed", with following details:

 Error logged from Pydev Debug: 
  Unexpected XML error reading:<xml><thread id="pid3399_seq1" stop_reason="111"><frame id="139696500300368" name="acquire" file="/home/navesta/UbuntuMaas/OpenStack/sahara/.tox/venv/lib/python2.7/site-packages/eventlet/semaphore.py" line="60">"</frame><frame id="139696500020720" name="GetThreadId" file="/home/navesta/UbuntuMaas/OpenStack/sahara/pysrc/pydevd_constants.py" line="158">"</frame><frame id="139696500039760" name="sendBreakpointConditionException" file="/home/navesta/UbuntuMaas/OpenStack/sahara/pysrc/pydevd.py" line="1037">"</frame><frame id="139696500002048" name="setSuspend" file="/home/navesta/UbuntuMaas/OpenStack/sahara/pysrc/pydevd.py" line="1030">"</frame><frame id="21030368" name="_locked_settrace" file="/home/navesta/UbuntuMaas/OpenStack/sahara/pysrc/pydevd.py" line="1655">"</frame><frame id="27197568" name="settrace" file="/home/navesta/UbuntuMaas/OpenStack/sahara/pysrc/pydevd.py" line="1563">"</frame><frame id="139696602416672" name="&lt;module&gt;" file="/home/navesta/UbuntuMaas/OpenStack/sahara/.tox/venv/bin/sahara-api" line="11">"</frame></thread></xml>
  Thread not found (pid3399_seq1)

I modified sahara-api, on the remote box, as follows:

import sys

from sahara.cli.sahara_api import main
import eventlet
eventlet.patcher.monkey_patch(all=False, socket=True, time=True, thread=False)
sys.path.append(r'/home/ navesta /OpenStack/sahara/pysrc/')
import pydevd
pydevd.settrace(‘EclipseBoxIp', port=5678, stdoutToServer=True, stderrToServer=True,suspend=True)

if __name__ == "__main__":
    sys.exit(main())

where pysrc was copied from the box running Eclipse to the remote box, under /home/eclipse/OpenStack/sahara/pysrc. Furthermore, added this path to PAYTHONPATH, under PyDev project properties.

On Debug Server console, within Eclipse, I get the following messages:

    Debug Server at port: 5678
pydev debugger: replacing to client: /home/navesta/OpenStack/sahara/.tox/venv/lib/python2.7/site-packages/eventlet/semaphore.py
pydev debugger: sent to client: /home/navesta/UbuntuMaas/OpenStack/sahara/.tox/venv/lib/python2.7/site-packages/eventlet/semaphore.py
pydev debugger: replacing to client: /home/navesta/OpenStack/sahara/pysrc/pydevd_constants.py
pydev debugger: sent to client: /home/navesta/UbuntuMaas/OpenStack/sahara/pysrc/pydevd_constants.py
pydev debugger: replacing to client: /home/navesta/OpenStack/sahara/pysrc/pydevd.py
pydev debugger: sent to client: /home/navesta/UbuntuMaas/OpenStack/sahara/pysrc/pydevd.py
pydev debugger: replacing to client: /home/navesta/OpenStack/sahara/.tox/venv/bin/sahara-api
pydev debugger: sent to client: /home/navesta/UbuntuMaas/OpenStack/sahara/.tox/venv/bin/sahara-api

Any help would be appreciated.

edit retag flag offensive close merge delete