summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_nodes.erl33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/rabbit_nodes.erl b/src/rabbit_nodes.erl
index 9d8606be..7f7fcc31 100644
--- a/src/rabbit_nodes.erl
+++ b/src/rabbit_nodes.erl
@@ -81,10 +81,12 @@ diagnostics_node(Node) ->
[{" * unable to connect to epmd (port ~s) on ~s: ~s~n",
[epmd_port(), Host, rabbit_misc:format_inet_error(Reason)]}];
{ok, NamePorts} ->
- case net_adm:ping(Node) of
- pong -> dist_working_diagnostics(Node);
- pang -> dist_broken_diagnostics(Name, Host, NamePorts)
- end
+ [{" * connected to epmd (port ~s) on ~s",
+ [epmd_port(), Host]}] ++
+ case net_adm:ping(Node) of
+ pong -> dist_working_diagnostics(Node);
+ pang -> dist_broken_diagnostics(Name, Host, NamePorts)
+ end
end].
epmd_port() ->
@@ -95,11 +97,11 @@ epmd_port() ->
dist_working_diagnostics(Node) ->
case rabbit:is_running(Node) of
- true -> [{" * node up, rabbit application running~n", []}];
- false -> [{" * node up, rabbit application not running~n"
+ true -> [{" * node ~s up, 'rabbit' application running", [Node]}];
+ false -> [{" * node ~s up, 'rabbit' application not running~n"
" * running applications on ~s: ~p~n"
- " * suggestion: start_app on ~s~n",
- [Node, remote_apps(Node), Node]}]
+ " * suggestion: start_app on ~s",
+ [Node, Node, remote_apps(Node), Node]}]
end.
remote_apps(Node) ->
@@ -119,13 +121,16 @@ dist_broken_diagnostics(Name, Host, NamePorts) ->
Host -> SelfName;
_ -> never_matches
end],
- [{" * ~s seems not to be running at all", [Name]} |
- case Others of
- [] -> [{" * no other nodes on ~s", [Host]}];
- _ -> [{" * other nodes on ~s: ~p", [Host, Others]}]
- end];
+ OthersDiag = case Others of
+ [] -> [{" no other nodes on ~s",
+ [Host]}];
+ _ -> [{" other nodes on ~s: ~p",
+ [Host, Others]}]
+ end,
+ [{" * epmd reports: node '~s' not running at all", [Name]},
+ OthersDiag, {" * suggestion: start the node", []}];
[{Name, Port}] ->
- [{" * found ~s (port ~b)", [Name, Port]} |
+ [{" * epmd reports node '~s' running on port ~b", [Name, Port]} |
case diagnose_connect(Host, Port) of
ok ->
[{" * TCP connection succeeded but Erlang distribution "