[IPython-dev] starting local ipengines works great but not remote ipengines

Glen W. Mabey Glen.Mabey@swri....
Fri Mar 9 15:11:58 CST 2007


Hello,

Having installed ipython1 on two different machines, I am struggling to
get engines on one to connect to a controller on the other.

However, connecting to local controllers works on both machines.  One is
an AMD64 while the other is a P4.

The only deviation that I have made from the build instructions is in
the recommendation to use Zope Interface version 3.1.0c1, which gave 
an error when I tried to build it.  Version 3.3.0 worked with no issues.

Things start out well:

HOST1:~$ ipcontroller --engine-port=10001
2007-03-09 15:06:54-0600 [-] Log opened.
2007-03-09 15:06:54-0600 [-] <class 'ipython1.kernel.enginevanilla.VanillaEngineServerFactoryFromControllerService'> starting on 10001
2007-03-09 15:06:54-0600 [-] Starting factory <ipython1.kernel.enginevanilla.VanillaEngineServerFactoryFromControllerService object at 0xb63d1a2c>
2007-03-09 15:06:54-0600 [-] <class 'ipython1.kernel.controllervanilla.VanillaControllerFactoryFromService'> starting on 10105
2007-03-09 15:06:54-0600 [-] Starting factory <ipython1.kernel.controllervanilla.VanillaControllerFactoryFromService object at 0xb63d1a6c>
2007-03-09 15:06:54-0600 [-] twisted.spread.pb.PBServerFactory starting on 10111
2007-03-09 15:06:54-0600 [-] Starting factory <twisted.spread.pb.PBServerFactory instance at 0xb63d1b6c>


HOST2:~$ ipengine --controller-port=10001 --controller-ip=gwm
2007-03-09 15:07:50-0600 [-] Log opened.
2007-03-09 15:07:50-0600 [-] Starting factory <ipython1.kernel.enginevanilla.VanillaEngineClientFactoryFromEngineService object at 0x2b43ca3f9790>

and 

2007-03-09 15:07:50-0600 [VanillaEngineServerProtocol,0,129.162.165.123] registered engine: 0

appears on HOST1.

But when I try to call functions on the RemoteController, Things Fall
Apart:

In [1]: import ipython1.kernel.api as kernel

In [2]: ipc = kernel.RemoteController(('127.0.0.1',10001))

In [3]: ipc.getIDs()
Connecting to controller:  ('127.0.0.1', 10001)


Then on HOST1:


2007-03-09 15:10:31-0600 [VanillaEngineServerProtocol,1,127.0.0.1] Unhandled Error
    Traceback (most recent call last):
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/python/log.py", line 49, in callWithLogger
        return callWithContext({"system": lp}, func, *args, **kw)
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/python/log.py", line 34, in callWithContext
        return context.call({ILogContext: newCtx}, func, *args, **kw)
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/python/context.py", line 59, in callWithContext
        return self.currentContext().callWithContext(ctx, func, *args, **kw)
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/python/context.py", line 37, in callWithContext
        return func(*args,**kw)
    --- <exception caught here> ---
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/internet/selectreactor.py", line 139, in _doReadOrWrite
        why = getattr(selectable, method)()
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/internet/tcp.py", line 362, in doRead
        return self.protocol.dataReceived(data)
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/protocols/basic.py", line 99, in dataReceived
        self.doData()
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/protocols/basic.py", line 62, in doData
        self.stringReceived(self.__buffer)
      File "/usr/local/stow/ipython1-20070309_svn/lib/python2.4/site-packages/ipython1/kernel/enginevanilla.py", line 558, in stringReceived
        self.nextHandler(msg)
      File "/usr/local/stow/ipython1-20070309_svn/lib/python2.4/site-packages/ipython1/kernel/enginevanilla.py", line 576, in dispatch
        self.dieLoudly('Command could not be dispatched: ' + msg)
      File "/usr/local/stow/ipython1-20070309_svn/lib/python2.4/site-packages/ipython1/kernel/enginevanilla.py", line 586, in dieLoudly
        log.msg('Protocol Error [%i]: ' % id + repr(a))
    exceptions.TypeError: int argument required
    
2007-03-09 15:10:31-0600 [VanillaEngineServerProtocol,1,127.0.0.1] unregistered engine None
2007-03-09 15:10:31-0600 [VanillaEngineServerProtocol,1,127.0.0.1] Unhandled Error
    Traceback (most recent call last):
      File "/usr/local/bin/ipcontroller", line 51, in main
        reactor.run()
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 220, in run
        self.mainLoop()
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 231, in mainLoop
        self.doIteration(t)
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/internet/selectreactor.py", line 133, in doSelect
        _logrun(selectable, _drdw, selectable, method, dict)
    --- <exception caught here> ---
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/python/log.py", line 49, in callWithLogger
        return callWithContext({"system": lp}, func, *args, **kw)
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/python/log.py", line 34, in callWithContext
        return context.call({ILogContext: newCtx}, func, *args, **kw)
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/python/context.py", line 59, in callWithContext
        return self.currentContext().callWithContext(ctx, func, *args, **kw)
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/python/context.py", line 37, in callWithContext
        return func(*args,**kw)
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/internet/selectreactor.py", line 149, in _doReadOrWrite
        self._disconnectSelectable(selectable, why, method=="doRead")
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 258, in _disconnectSelectable
        selectable.connectionLost(failure.Failure(why))
      File "/usr/local/stow/twisted-20070309_svn/lib/python2.4/site-packages/twisted/internet/tcp.py", line 416, in connectionLost
        protocol.connectionLost(reason)
      File "/usr/local/stow/ipython1-20070309_svn/lib/python2.4/site-packages/ipython1/kernel/enginevanilla.py", line 539, in connectionLost
        self.factory.unregisterEngine(self.id)
      File "/usr/local/stow/ipython1-20070309_svn/lib/python2.4/site-packages/ipython1/kernel/enginevanilla.py", line 1028, in unregisterEngine
        return self.service.unregisterEngine(id)
      File "/usr/local/stow/ipython1-20070309_svn/lib/python2.4/site-packages/ipython1/kernel/controllerservice.py", line 304, in unregisterEngine
        log.msg("engine %i was not registered" % id)
    exceptions.TypeError: int argument required



Any ideas?

Thanks,
Glen Mabey


More information about the IPython-dev mailing list