<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div style="" data-md-original="&lt;div
      class=&quot;moz-cite-prefix&quot;&gt;On 4/12/13 6:11 PM, MinRK
      wrote:&lt;br&gt;&lt;/div&gt;&lt;blockquote class=&quot; cite&quot;
      id=&quot;mid_CAHNn8BVKCbCmojC5pi8OkjaPqezB1wQB9XDsUP2m2MQcxY2s2w_mail_gmail_com&quot;
      cite=&quot;mid:CAHNn8BVKCbCmojC5pi8OkjaPqezB1wQB9XDsUP2m2MQcxY2s2w@mail.gmail.com&quot;
      type=&quot;cite&quot;&gt;&lt;div dir=&quot;ltr&quot;&gt;You cannot
      have multiple 'Application' instances in one process. &amp;nbsp;If
      you want to start ipcluster from IPython, it may be best to just
      call out to the command-line with:&lt;div
      class=&quot;gmail_extra&quot;&gt;&lt;div
      class=&quot;gmail_quote&quot;&gt;
      &lt;div style=&quot;&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div
      style=&quot;&quot;&gt;! ipcluster start -n 4
      --daemon&lt;/div&gt;&lt;div
      style=&quot;&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div
      style=&quot;&quot;&gt;Then stop it later with:&lt;/div&gt;&lt;div
      style=&quot;&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div
      style=&quot;&quot;&gt;! ipcluster
      stop&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br&gt;Right,
      except that I get a stack trace inside of ipcluster, and I want to
      be able to use pdb to debug it.&amp;nbsp; So is the answer then
      for me to use vanilla python?&amp;nbsp; Gets me part of the way,
      but it looks like the stack trace is being returned by some `exec`
      or perhaps even something happening on one of the
      &quot;engine&quot; nodes that is complaining about files not being
      available.&amp;nbsp; I am running it
      with:&lt;br&gt;&lt;br&gt;```python&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
      import pdb&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; import
      IPython.parallel.apps.ipclusterapp as
      ipa&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
      &lt;br&gt;&amp;gt;&amp;gt;&amp;gt; import
      sys&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; sys.argv=
      [&quot;ipcluster&quot;, &quot;start&quot;,
      &quot;--profile=wakari&quot;]&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
      app =
      ipa.IPClusterApp.instance()&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
      app.initialize()&lt;br&gt;2013-04-13 02:17:45,234.234
      [IPClusterStart] Using existing profile dir:
      u'/user_home/w_ijstokes/code/wakari-backend/ops/automation/ipcluster/profile_wakari'&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
      pdb.run('app.start()')&lt;br&gt;```&lt;br&gt;&lt;br&gt;But I still
      get back this
      error:&lt;br&gt;&lt;br&gt;```python&lt;br&gt;2013-04-13
      02:18:58.560 [IPClusterStart] sending
      /user_home/w_ijstokes/code/wakari-backend/ops/automation/ipcluster/profile_wakari/security/ipcontroller-client.json
      to
      2.ipcluster.wakari.io:code/wakari-backend/ops/automation/ipcluster/profile_wakari/security/ipcontroller-client.json&lt;br&gt;2013-04-13
      02:18:59.082 [IPClusterStart] sending
      /user_home/w_ijstokes/code/wakari-backend/ops/automation/ipcluster/profile_wakari/security/ipcontroller-engine.json
      to
      2.ipcluster.wakari.io:code/wakari-backend/ops/automation/ipcluster/profile_wakari/security/ipcontroller-engine.json&lt;br&gt;ERROR:root:Error
      in delayed callback&lt;br&gt;Traceback (most recent call
      last):&lt;br&gt;&amp;nbsp; File
      &quot;/opt/anaconda/lib/python2.7/site-packages/zmq/eventloop/ioloop.py&quot;,
      line 554, in _run&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
      self.callback()&lt;br&gt;&amp;nbsp; File
      &quot;/opt/anaconda/lib/python2.7/site-packages/IPython/parallel/apps/ipclusterapp.py&quot;,
      line 353, in start_engines&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
      self.engine_launcher.start(self.n)&lt;br&gt;&amp;nbsp; File
      &quot;/opt/anaconda/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py&quot;,
      line 781, in start&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; d =
      el.start(user=user, hostname=host)&lt;br&gt;&amp;nbsp; File
      &quot;/opt/anaconda/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py&quot;,
      line 637, in start&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
      super(SSHLauncher, self).start()&lt;br&gt;&amp;nbsp; File
      &quot;/opt/anaconda/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py&quot;,
      line 272, in start&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
      cwd=self.work_dir&lt;br&gt;&amp;nbsp; File
      &quot;/opt/anaconda/lib/python2.7/subprocess.py&quot;, line 679,
      in __init__&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; errread,
      errwrite)&lt;br&gt;&amp;nbsp; File
      &quot;/opt/anaconda/lib/python2.7/subprocess.py&quot;, line 1249,
      in _execute_child&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise
      child_exception&lt;br&gt;OSError: [Errno 2] No such file or
      directory&lt;br&gt;```&lt;br&gt;&lt;br&gt;Any suggestions how to
      figure out what is going
      wrong?&lt;br&gt;&lt;br&gt;TIA!&lt;br&gt;&lt;br&gt;Ian&lt;br&gt;"
      class="markdown-here-wrapper" id="markdown-here-wrapper-516108">
      <p style="margin: 1.2em 0px ! important;">On 4/12/13 6:11 PM,
        MinRK wrote:</p>
      <p style="margin: 1.2em 0px ! important;"></p>
      <div class="markdown-here-exclude">
        <p></p>
        <blockquote class=" cite"
id="mid_CAHNn8BVKCbCmojC5pi8OkjaPqezB1wQB9XDsUP2m2MQcxY2s2w_mail_gmail_com"
cite="mid:CAHNn8BVKCbCmojC5pi8OkjaPqezB1wQB9XDsUP2m2MQcxY2s2w@mail.gmail.com"
          type="cite">
          <div dir="ltr">You cannot have multiple 'Application'
            instances in one process. &nbsp;If you want to start ipcluster
            from IPython, it may be best to just call out to the
            command-line with:
            <div class="gmail_extra">
              <div class="gmail_quote">
                <div style=""><br>
                </div>
                <div style="">! ipcluster start -n 4 --daemon</div>
                <div style=""><br>
                </div>
                <div style="">Then stop it later with:</div>
                <div style=""><br>
                </div>
                <div style="">! ipcluster stop</div>
                <br>
              </div>
            </div>
          </div>
        </blockquote>
        <p></p>
      </div>
      <p style="margin: 1.2em 0px ! important;"></p>
      <p style="margin: 1.2em 0px ! important;">Right, except that I get
        a stack trace inside of ipcluster, and I want to be able to use
        pdb to debug it. So is the answer then for me to use vanilla
        python? Gets me part of the way, but it looks like the stack
        trace is being returned by some <code style="font-size: 0.85em;
          font-family: Consolas,Inconsolata,Courier,monospace;margin:
          0px 0.15em; padding: 0px 0.3em; white-space: nowrap; border:
          1px solid rgb(234, 234, 234); background-color: rgb(248, 248,
          248); border-radius: 3px 3px 3px 3px; display: inline;">exec</code>
        or perhaps even something happening on one of the "engine" nodes
        that is complaining about files not being available. I am
        running it with:</p>
      <pre style="font-size: 0.85em; font-family: Consolas,Inconsolata,Courier,monospace;font-size: 1em; line-height: 1.2em; overflow: auto;margin: 1.2em 0px;"><code style="font-size: 0.85em; font-family: Consolas,Inconsolata,Courier,monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: nowrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px 3px 3px 3px; display: inline;white-space: pre; border-radius: 3px 3px 3px 3px; border: 1px solid rgb(204, 204, 204); padding: 0.5em 0.7em;display: block; padding: 0.5em; background: none repeat scroll 0% 0% rgb(255, 255, 255); color: black;" class="language-python">&gt;&gt;&gt; <span style="color: rgb(170, 13, 145);" class="keyword">import</span> pdb
&gt;&gt;&gt; <span style="color: rgb(170, 13, 145);" class="keyword">import</span> IPython.parallel.apps.ipclusterapp <span style="color: rgb(170, 13, 145);" class="keyword">as</span> ipa
&gt;&gt;&gt; 
&gt;&gt;&gt; <span style="color: rgb(170, 13, 145);" class="keyword">import</span> sys
&gt;&gt;&gt; sys.argv= [<span style="color: rgb(196, 26, 22);" class="string">"ipcluster"</span>, <span style="color: rgb(196, 26, 22);" class="string">"start"</span>, <span style="color: rgb(196, 26, 22);" class="string">"--profile=wakari"</span>]
&gt;&gt;&gt; app = ipa.IPClusterApp.instance()
&gt;&gt;&gt; app.initialize()
<span style="color: rgb(28, 0, 207);" class="number">2013</span>-<span style="color: rgb(28, 0, 207);" class="number">04</span>-<span style="color: rgb(28, 0, 207);" class="number">13</span> <span style="color: rgb(28, 0, 207);" class="number">02</span>:<span style="color: rgb(28, 0, 207);" class="number">17</span>:<span style="color: rgb(28, 0, 207);" class="number">45</span>,<span style="color: rgb(28, 0, 207);" class="number">234.234</span> [IPClusterStart] Using existing profile dir: <span style="color: rgb(196, 26, 22);" class="string">u'/user_home/w_ijstokes/code/wakari-backend/ops/automation/ipcluster/profile_wakari'</span>
&gt;&gt;&gt; pdb.run(<span style="color: rgb(196, 26, 22);" class="string">'app.start()'</span>)</code></pre>
      <p style="margin: 1.2em 0px ! important;">But I still get back
        this error:</p>
      <pre style="font-size: 0.85em; font-family: Consolas,Inconsolata,Courier,monospace;font-size: 1em; line-height: 1.2em; overflow: auto;margin: 1.2em 0px;"><code style="font-size: 0.85em; font-family: Consolas,Inconsolata,Courier,monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: nowrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px 3px 3px 3px; display: inline;white-space: pre; border-radius: 3px 3px 3px 3px; border: 1px solid rgb(204, 204, 204); padding: 0.5em 0.7em;display: block; padding: 0.5em; background: none repeat scroll 0% 0% rgb(255, 255, 255); color: black;" class="language-python"><span style="color: rgb(28, 0, 207);" class="number">2013</span>-<span style="color: rgb(28, 0, 207);" class="number">04</span>-<span style="color: rgb(28, 0, 207);" class="number">13</span> <span style="color: rgb(28, 0, 207);" class="number">02</span>:<span style="color: rgb(28, 0, 207);" class="number">18</span>:<span s
 tyle="col
or: rgb(28, 0, 207);" class="number">58.560</span> [IPClusterStart] sending /user_home/w_ijstokes/code/wakari-backend/ops/automation/ipcluster/profile_wakari/security/ipcontroller-client.json to <span style="color: rgb(28, 0, 207);" class="number">2.</span>ipcluster.wakari.io:code/wakari-backend/ops/automation/ipcluster/profile_wakari/security/ipcontroller-client.json
<span style="color: rgb(28, 0, 207);" class="number">2013</span>-<span style="color: rgb(28, 0, 207);" class="number">04</span>-<span style="color: rgb(28, 0, 207);" class="number">13</span> <span style="color: rgb(28, 0, 207);" class="number">02</span>:<span style="color: rgb(28, 0, 207);" class="number">18</span>:<span style="color: rgb(28, 0, 207);" class="number">59.082</span> [IPClusterStart] sending /user_home/w_ijstokes/code/wakari-backend/ops/automation/ipcluster/profile_wakari/security/ipcontroller-engine.json to <span style="color: rgb(28, 0, 207);" class="number">2.</span>ipcluster.wakari.io:code/wakari-backend/ops/automation/ipcluster/profile_wakari/security/ipcontroller-engine.json
ERROR:root:Error <span style="color: rgb(170, 13, 145);" class="keyword">in</span> delayed callback
Traceback (most recent call last):
  File <span style="color: rgb(196, 26, 22);" class="string">"/opt/anaconda/lib/python2.7/site-packages/zmq/eventloop/ioloop.py"</span>, line <span style="color: rgb(28, 0, 207);" class="number">554</span>, <span style="color: rgb(170, 13, 145);" class="keyword">in</span> _run
    self.callback()
  File <span style="color: rgb(196, 26, 22);" class="string">"/opt/anaconda/lib/python2.7/site-packages/IPython/parallel/apps/ipclusterapp.py"</span>, line <span style="color: rgb(28, 0, 207);" class="number">353</span>, <span style="color: rgb(170, 13, 145);" class="keyword">in</span> start_engines
    self.engine_launcher.start(self.n)
  File <span style="color: rgb(196, 26, 22);" class="string">"/opt/anaconda/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py"</span>, line <span style="color: rgb(28, 0, 207);" class="number">781</span>, <span style="color: rgb(170, 13, 145);" class="keyword">in</span> start
    d = el.start(user=user, hostname=host)
  File <span style="color: rgb(196, 26, 22);" class="string">"/opt/anaconda/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py"</span>, line <span style="color: rgb(28, 0, 207);" class="number">637</span>, <span style="color: rgb(170, 13, 145);" class="keyword">in</span> start
    super(SSHLauncher, self).start()
  File <span style="color: rgb(196, 26, 22);" class="string">"/opt/anaconda/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py"</span>, line <span style="color: rgb(28, 0, 207);" class="number">272</span>, <span style="color: rgb(170, 13, 145);" class="keyword">in</span> start
    cwd=self.work_dir
  File <span style="color: rgb(196, 26, 22);" class="string">"/opt/anaconda/lib/python2.7/subprocess.py"</span>, line <span style="color: rgb(28, 0, 207);" class="number">679</span>, <span style="color: rgb(170, 13, 145);" class="keyword">in</span> __init__
    errread, errwrite)
  File <span style="color: rgb(196, 26, 22);" class="string">"/opt/anaconda/lib/python2.7/subprocess.py"</span>, line <span style="color: rgb(28, 0, 207);" class="number">1249</span>, <span style="color: rgb(170, 13, 145);" class="keyword">in</span> _execute_child
    <span style="color: rgb(170, 13, 145);" class="keyword">raise</span> child_exception
OSError: [Errno <span style="color: rgb(28, 0, 207);" class="number">2</span>] No such file <span style="color: rgb(170, 13, 145);" class="keyword">or</span> directory</code></pre>
      <p style="margin: 1.2em 0px ! important;">Any suggestions how to
        figure out what is going wrong?</p>
      <p style="margin: 1.2em 0px ! important;">TIA!</p>
      <p style="margin: 1.2em 0px ! important;">Ian</p>
    </div>
  </body>
</html>