diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2014-10-27 12:12:35 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2014-10-27 12:12:35 +0000 |
| commit | ddeaab14b63dc983192f643a13e3784c578afb50 (patch) | |
| tree | 640f1e42ab72a3e99564329510a389b3a3c9bab1 /src | |
| parent | 5f718633f55a851b797283cc7ecdb523649b3570 (diff) | |
| download | rabbitmq-server-git-ddeaab14b63dc983192f643a13e3784c578afb50.tar.gz | |
Revert to stable-like behaviour, always starting epmd, but starting it ourselves since we will need this capability later and it lets us get better error messages.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_cli.erl | 1 | ||||
| -rw-r--r-- | src/rabbit_control_main.erl | 7 | ||||
| -rw-r--r-- | src/rabbit_nodes.erl | 4 |
3 files changed, 1 insertions, 11 deletions
diff --git a/src/rabbit_cli.erl b/src/rabbit_cli.erl index 58f40a3ce9..e91581aec5 100644 --- a/src/rabbit_cli.erl +++ b/src/rabbit_cli.erl @@ -112,6 +112,7 @@ start_distribution() -> rabbit_misc:format("rabbitmq-cli-~s", [os:getpid()]))). start_distribution(Name) -> + rabbit_nodes:ensure_epmd(), net_kernel:start([Name, name_type()]). name_type() -> diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl index 5410185608..f0b427a4fe 100644 --- a/src/rabbit_control_main.erl +++ b/src/rabbit_control_main.erl @@ -584,13 +584,6 @@ exit_loop(Port) -> end. become(BecomeNode) -> - %% We might not have started distribution if epmd was not running, - %% but we need it now even if we have to start epmd ourselves. - case erlang:is_alive() of - true -> ok; - false -> rabbit_nodes:ensure_epmd(), - rabbit_cli:start_distribution() - end, case net_adm:ping(BecomeNode) of pong -> exit({node_running, BecomeNode}); pang -> io:format(" * Impersonating node: ~s...", [BecomeNode]), diff --git a/src/rabbit_nodes.erl b/src/rabbit_nodes.erl index 66d05428c6..d3c0e55ff8 100644 --- a/src/rabbit_nodes.erl +++ b/src/rabbit_nodes.erl @@ -78,10 +78,6 @@ diagnostics_node(Node) -> {Name, Host} = parts(Node), [{"~s:", [Node]} | case names(Host) of - {error, address} -> - [{" * connection refused from epmd (port ~s) on ~s~n" - " - has the server started it?~n", - [epmd_port(), Host]}]; {error, Reason} -> [{" * unable to connect to epmd (port ~s) on ~s: ~s~n", [epmd_port(), Host, rabbit_misc:format_inet_error(Reason)]}]; |
