Try removing the old connection files (in `ipython locate profile home_ssh`/security).<div><br></div><div>There might be an issue when reuse_files=True, that sometimes the old connection files can set the config, so if you ran once with ip=127.0.0.1, then set reuse_files=True, it&#39;s possible that 127.0.0.1 is still being used.</div>

<div><br>
</div><div>Can you verify the contents of the JSON files?</div><div><br></div><div>-MinRK<br><br><div class="gmail_quote">On Mon, Aug 6, 2012 at 1:43 AM, Johann Rohwer <span dir="ltr">&lt;<a href="mailto:jr@sun.ac.za" target="_blank">jr@sun.ac.za</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I&#39;m running a small LAN at home with an ADSL router acting as DHCP<br>
server for the LAN. There&#39;s my laptop on 192.168.0.4 and a server<br>
(host0) on 192.168.0.2 both running Ubuntu 12.04 (home directory is<br>
*NOT* shared). I&#39;ve been struggling to get ipcluster over SSH going as<br>
somehow the internal ipcluster magic always returns 127.0.0.1 (i.e.<br>
the loopback interface) for the laptop&#39;s IP and not 192.168.0.4, which<br>
means then that the engines on host0 won&#39;t find the controller on the<br>
laptop just using the default configuration. In the end I specified the<br>
IP addresses in the configuration files and opted for re-useable json<br>
files, but still ipcluster won&#39;t start. Strangely enough starting<br>
ipcontroller on the laptop and the engines on laptop and host0<br>
separately, the cluster starts fine with the same configuration files.<br>
The logs are not informative. Why would ipcluster not work here?<br>
<br>
ipython version: 0.13 installed with pip, on both laptop and host0.<br>
profile name: ssh_home (on both laptop and host0)<br>
<br>
--------------------------------------------------<br>
Manually edited configuration file options:<br>
--------------------------------------------------<br>
ipcluster_config.py:c.IPClusterStart.engine_launcher_class =<br>
&#39;SSHEngineSetLauncher&#39;<br>
ipcluster_config.py:c.SSHLauncher.location = &#39;192.168.0.4&#39;<br>
ipcluster_config.py:c.SSHLauncher.to_send = []<br>
ipcluster_config.py:c.SSHEngineSetLauncher.engine_args = [&#39;--profile-<br>
dir=/home/jr/.config/ipython/profile_ssh_home&#39;]<br>
ipcluster_config.py:c.SSHEngineSetLauncher.engines = { &#39;192.168.0.4&#39;:<br>
2, &#39;192.168.0.2&#39;: 2 }<br>
<br>
ipcontroller_config.py:c.IPControllerApp.reuse_files = True<br>
ipcontroller_config.py:c.HubFactory.client_ip = &#39;*&#39;<br>
ipcontroller_config.py:c.HubFactory.ip = &#39;*&#39;<br>
ipcontroller_config.py:c.HubFactory.location = &#39;192.168.0.4&#39;<br>
ipcontroller_config.py:c.HubFactory.engine_ip = &#39;*&#39;<br></blockquote><div><br></div><div>ip is a shortcut to set both client_ip and engine_ip, no need to set all three.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
(none in ipengine_config.py)<br>
<br>
--------------------------------------------------<br>
Console output on laptop when starting ipcluster:<br>
--------------------------------------------------<br>
$ ipcluster start --profile=ssh_home<br>
2012-08-06 10:02:46,132.132 [IPClusterStart] Using existing profile<br>
dir: u&#39;/home/jr/.config/ipython/profile_ssh_home&#39;<br>
2012-08-06 10:02:46.203 [IPClusterStart] Starting ipcluster with<br>
[daemon=False]<br>
2012-08-06 10:02:46.204 [IPClusterStart] Creating pid file:<br>
/home/jr/.config/ipython/profile_ssh_home/pid/ipcluster.pid<br>
2012-08-06 10:02:46.204 [IPClusterStart] Starting Controller with<br>
LocalControllerLauncher<br>
2012-08-06 10:02:47.204 [IPClusterStart] Starting 4 Engines with<br>
SSHEngineSetLauncher<br>
2012-08-06 10:02:53.278 [IPClusterStart]<br>
            Engines shutdown early, they probably failed to connect.<br>
<br>
            Check the engine log files for output.<br>
<br>
            If your controller and engines are not on the same<br>
machine, you probably<br>
            have to instruct the controller to listen on an interface<br>
other than localhost.<br>
<br>
            You can set this by adding &quot;--ip=&#39;*&#39;&quot; to your<br>
ControllerLauncher.controller_args.<br>
<br>
            Be sure to read our security docs before instructing your<br>
controller to listen on<br>
            a public interface.<br>
<br>
2012-08-06 10:02:53.286 [IPClusterStart] IPython cluster: stopping<br>
2012-08-06 10:02:56.287 [IPClusterStart] Removing pid file:<br>
/home/jr/.config/ipython/profile_ssh_home/pid/ipcluster.pid<br>
<br>
--------------------------------------------------<br>
ipcontroller log on laptop:<br>
--------------------------------------------------<br>
2012-08-06 10:02:46.655 [IPControllerApp] loading connection info from<br>
/home/jr/.config/ipython/profile_ssh_home/security/ipcontroller-<br>
engine.json<br>
2012-08-06 10:02:46.694 [IPControllerApp] loading connection info from<br>
/home/jr/.config/ipython/profile_ssh_home/security/ipcontroller-<br>
client.json<br>
2012-08-06 10:02:46.734 [IPControllerApp] Hub listening on<br>
tcp://*:47818 for registration.<br>
2012-08-06 10:02:46.736 [IPControllerApp] Hub using DB backend: &#39;NoDB&#39;<br>
2012-08-06 10:02:46.994 [IPControllerApp] hub::created hub<br>
2012-08-06 10:02:46.995 [IPControllerApp] task::using Python leastload<br>
Task scheduler<br>
2012-08-06 10:02:46.996 [IPControllerApp] Heartmonitor started<br>
2012-08-06 10:02:47.035 [IPControllerApp] Creating pid file:<br>
/home/jr/.config/ipython/profile_ssh_home/pid/ipcontroller.pid<br>
2012-08-06 10:02:53.279 [IPControllerApp] Received signal 2, shutting<br>
down<br>
2012-08-06 10:02:53.280 [IPControllerApp] terminating children...<br>
<br>
--------------------------------------------------<br>
Console output starting ipcontroller separately on laptop and<br>
ipengines on laptop and host0:<br>
--------------------------------------------------<br>
$ ipcontroller --profile=ssh_home<br>
2012-08-06 10:11:27,128.128 [IPControllerApp] Using existing profile<br>
dir: u&#39;/home/jr/.config/ipython/profile_ssh_home&#39;<br>
2012-08-06 10:11:27.132 [IPControllerApp] loading connection info from<br>
/home/jr/.config/ipython/profile_ssh_home/security/ipcontroller-<br>
engine.json<br>
2012-08-06 10:11:27.132 [IPControllerApp] loading connection info from<br>
/home/jr/.config/ipython/profile_ssh_home/security/ipcontroller-<br>
client.json<br>
2012-08-06 10:11:27.140 [IPControllerApp] Hub listening on<br>
tcp://*:47818 for registration.<br>
2012-08-06 10:11:27.142 [IPControllerApp] Hub using DB backend: &#39;NoDB&#39;<br>
2012-08-06 10:11:27.399 [IPControllerApp] hub::created hub<br>
2012-08-06 10:11:27.400 [IPControllerApp] task::using Python leastload<br>
Task scheduler<br>
2012-08-06 10:11:27.401 [IPControllerApp] Heartmonitor started<br>
2012-08-06 10:11:27.424 [IPControllerApp] Creating pid file:<br>
/home/jr/.config/ipython/profile_ssh_home/pid/ipcontroller.pid<br>
2012-08-06 10:11:27.434 [scheduler] Scheduler started [leastload]<br>
<br>
on laptop:<br>
--------------------------------------------------<br>
$ ipengine --profile=ssh_home<br>
2012-08-06 10:12:11,390.390 [IPEngineApp] Using existing profile dir:<br>
u&#39;/home/jr/.config/ipython/profile_ssh_home&#39;<br>
2012-08-06 10:12:11.392 [IPEngineApp] Loading url_file<br>
u&#39;/home/jr/.config/ipython/profile_ssh_home/security/ipcontroller-<br>
engine.json&#39;<br>
2012-08-06 10:12:11.420 [IPEngineApp] Registering with controller at<br>
tcp://<a href="http://192.168.0.4:47818" target="_blank">192.168.0.4:47818</a><br>
2012-08-06 10:12:11.883 [IPEngineApp] Completed registration with id 0<br>
<br>
on host0:<br>
--------------------------------------------------<br>
$ ipengine --profile=ssh_home<br>
2012-08-06 10:13:44,950.950 [IPEngineApp] Using existing profile dir:<br>
u&#39;/home/jr/.config/ipython/profile_ssh_home&#39;<br>
2012-08-06 10:13:44.953 [IPEngineApp] Loading url_file<br>
u&#39;/home/jr/.config/ipython/profile_ssh_home/security/ipcontroller-<br>
engine.json&#39;<br>
2012-08-06 10:13:44.967 [IPEngineApp] Registering with controller at<br>
tcp://<a href="http://192.168.0.4:47818" target="_blank">192.168.0.4:47818</a><br>
2012-08-06 10:13:45.203 [IPEngineApp] Completed registration with id 1<br>
--------------------------------------------------<br>
<br>
Sorry for the long email, but I have no clue why ipcluster won&#39;t work.<br>
Any ideas?<br></blockquote><div><br></div><div>It&#39;s helpful to add `--debug` to the args passed to the Controller/Engines, so that logs contain more information.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
--Johann<br>
<br>
P.S. When starting the cluster in this mode, do the ipengines have to<br>
be killed manually? When terminating ipcontroller with Ctrl-C, I get<br>
the notification<br>
        [IPControllerApp] terminating children...<br>
but the ipengine processes remain running.<br></blockquote><div><br></div><div>Yes, the &#39;children&#39; IPController refers to are child subprocesses (Schedulers).  The engines are not subprocesses of the Controller, and must be killed manually if they were started manually.</div>

<div><br></div><div>-MinRK</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
_______________________________________________<br>
IPython-User mailing list<br>
<a href="mailto:IPython-User@scipy.org" target="_blank">IPython-User@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
</blockquote></div><br></div>