使用 Ubuntu 12.04 我正在尝试设置 LAN 集群。细节:
控制器配置
# Configuration file for ipcontroller.
c = get_config()
c.IPControllerApp.reuse_files = True
c.IPControllerApp.engine_ssh_server = u'bar@bar1'
c.HubFactory.ip = '*'
c.HubFactory.db_class = 'NoDB'
集群配置
# Configuration file for ipcluster.
c = get_config()
c.IPClusterEngines.engine_launcher_class = 'SSH'
c.SSHEngineSetLauncher.engine_args = ['--profile-dir=~/.config/ipython/profile_foo']
c.SSHEngineSetLauncher.engines = {'foo@foo1' : 1, 'foo@foo2' : 1, 'foo@foo3' : 1, 'foo@foo4' : 1}
引擎配置
# Configuration file for ipengine.
c = get_config()
c.EngineFactory.timeout = 10
所以,然后运行
ipcluster start --profile=foo --debug
产生以下结果:
2013-09-03 19:43:45.772 [IPClusterStart] Process 'ssh' started: 5198
2013-09-03 19:43:45.773 [IPClusterStart] Process 'engine set' started: [None, None, None, None]
2013-09-03 19:43:47.086 [IPClusterStart] 2013-09-03 19:44:02.726 [IPEngineApp] Completed registration with id 0
2013-09-03 19:43:47.795 [IPClusterStart] 2013-09-03 19:43:53.737 [IPEngineApp] Completed registration with id 1
2013-09-03 19:43:48.561 [IPClusterStart] 2013-09-03 19:43:59.793 [IPEngineApp] Completed registration with id 2
2013-09-03 19:43:49.667 [IPClusterStart] 2013-09-03 19:44:03.859 [IPEngineApp] Completed registration with id 3
2013-09-03 19:44:15.773 [IPClusterStart] Engines appear to have started successfully
在我看来很好。但是当我尝试与客户建立联系时,我得到的引擎数量少于预期的数量。即使在一台远程机器上运行 1 或 2 个引擎也会发生这种情况
In [22]: rc=Client(profile='foo')
In [23]: rc.ids
Out[23]: [1, 2]
如果这是问题,我将超时设置得很高,但它仍然存在。
如果我单独运行ipcontroller
,ipengines
该过程会成功,但我真的更希望能够使用ipcluster
.