diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2013-12-10 16:33:40 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2013-12-10 16:33:40 +0000 |
commit | b16f7f4af7e896711284ddfb2548eea90e161b92 (patch) | |
tree | 08ebc0e763a2fa404db4611fae93b343e0959283 | |
parent | 6392ac1f070bf039b9eb37a49decff3230794ec6 (diff) | |
download | rabbitmq-server-bug25922.tar.gz |
Log nodedown_reason.bug25922
-rw-r--r-- | src/rabbit_node_monitor.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl index 10e68198..488f1df5 100644 --- a/src/rabbit_node_monitor.erl +++ b/src/rabbit_node_monitor.erl @@ -201,7 +201,7 @@ init([]) -> %% writing out the cluster status files - bad things can then %% happen. process_flag(trap_exit, true), - net_kernel:monitor_nodes(true), + net_kernel:monitor_nodes(true, [nodedown_reason]), {ok, _} = mnesia:subscribe(system), {ok, #state{monitors = pmon:new(), subscribers = pmon:new(), @@ -267,7 +267,9 @@ handle_info({'DOWN', _MRef, process, Pid, _Reason}, State = #state{subscribers = Subscribers}) -> {noreply, State#state{subscribers = pmon:erase(Pid, Subscribers)}}; -handle_info({nodedown, Node}, State) -> +handle_info({nodedown, Node, Info}, State) -> + rabbit_log:info("node ~p down: ~p~n", + [Node, proplists:get_value(nodedown_reason, Info)]), ok = handle_dead_node(Node), {noreply, State}; |