@@ -33,15 +33,28 @@ the ``ip`` argument on the command-line, or the ``HubFactory.ip`` configurable i
3333:file:`ipcontroller_config.py`.
3434
3535If your machines are on a trusted network, you can safely instruct the controller to listen
36- on all public interfaces with::
36+ on all interfaces with::
3737
3838 $> ipcontroller --ip=*
3939
40+
4041Or you can set the same behavior as the default by adding the following line to your :file:`ipcontroller_config.py`:
4142
4243.. sourcecode:: python
4344
4445 c.HubFactory.ip = '*'
46+ # c.HubFactory.location = '10.0.1.1'
47+
48+
49+ .. note::
50+
51+ ``--ip=*`` instructs ZeroMQ to listen on all interfaces,
52+ but it does not contain the IP needed for engines / clients
53+ to know where the controller actually is.
54+ This can be specified with ``--location=10.0.0.1``,
55+ the specific IP address of the controller, as seen from engines and/or clients.
56+ IPython tries to guess this value by default, but it will not always guess correctly.
57+ Check the ``location`` field in your connection files if you are having connection trouble.
4558
4659.. note::
4760
@@ -718,7 +731,11 @@ through the login node, an example :file:`ipcontroller_config.py` might contain:
718731 c.HubFactory.location = '10.0.1.5'
719732 # or to get an automatic value, try this:
720733 import socket
721- ex_ip = socket.gethostbyname_ex(socket.gethostname())[-1][0]
734+ hostname = socket.gethostname()
735+ # alternate choices for hostname include `socket.getfqdn()`
736+ # or `socket.gethostname() + '.local'`
737+
738+ ex_ip = socket.gethostbyname_ex(hostname)[-1][-1]
722739 c.HubFactory.location = ex_ip
723740
724741 # now instruct clients to use the login node for SSH tunnels:
0 commit comments