diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2014-03-19 13:52:10 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2014-03-19 13:52:10 +0000 |
| commit | 073db28b0718b66850b0d1e823b997329f46a16b (patch) | |
| tree | e41e581ea3c0313bec510379a352354d3b1bcd5f /src | |
| parent | a640f74dc8d5dcd667fd9154bb323765fbf3e863 (diff) | |
| parent | c4a5d3eaba2fa34a8ff71a3f36496ed82b46c16e (diff) | |
| download | rabbitmq-server-git-073db28b0718b66850b0d1e823b997329f46a16b.tar.gz | |
Merge bug25374
Diffstat (limited to 'src')
132 files changed, 307 insertions, 206 deletions
diff --git a/src/app_utils.erl b/src/app_utils.erl index 5ae2d2954e..0479ce6608 100644 --- a/src/app_utils.erl +++ b/src/app_utils.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(app_utils). diff --git a/src/background_gc.erl b/src/background_gc.erl index fbd7ce239e..d30fa89678 100644 --- a/src/background_gc.erl +++ b/src/background_gc.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(background_gc). diff --git a/src/credit_flow.erl b/src/credit_flow.erl index 39a257aca4..3a640df194 100644 --- a/src/credit_flow.erl +++ b/src/credit_flow.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(credit_flow). diff --git a/src/delegate.erl b/src/delegate.erl index 0331ca01d0..378759a64b 100644 --- a/src/delegate.erl +++ b/src/delegate.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(delegate). diff --git a/src/delegate_sup.erl b/src/delegate_sup.erl index e31d6d388f..cb5ef2b85b 100644 --- a/src/delegate_sup.erl +++ b/src/delegate_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(delegate_sup). diff --git a/src/dtree.erl b/src/dtree.erl index 72abe248f5..89a34c9e2a 100644 --- a/src/dtree.erl +++ b/src/dtree.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% %% A dual-index tree. diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl index bac7c2c170..71645a3c9a 100644 --- a/src/file_handle_cache.erl +++ b/src/file_handle_cache.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(file_handle_cache). diff --git a/src/gatherer.erl b/src/gatherer.erl index c13298ca2a..8bce170754 100644 --- a/src/gatherer.erl +++ b/src/gatherer.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(gatherer). diff --git a/src/gm.erl b/src/gm.erl index 5a82950a41..250a8de88c 100644 --- a/src/gm.erl +++ b/src/gm.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(gm). diff --git a/src/gm_soak_test.erl b/src/gm_soak_test.erl index 701cb0f7ec..4ff1645acb 100644 --- a/src/gm_soak_test.erl +++ b/src/gm_soak_test.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(gm_soak_test). diff --git a/src/gm_speed_test.erl b/src/gm_speed_test.erl index 0f65a79214..fa515fa8fe 100644 --- a/src/gm_speed_test.erl +++ b/src/gm_speed_test.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(gm_speed_test). diff --git a/src/gm_tests.erl b/src/gm_tests.erl index 9a34807691..23b8f8cb50 100644 --- a/src/gm_tests.erl +++ b/src/gm_tests.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(gm_tests). diff --git a/src/lqueue.erl b/src/lqueue.erl index 4ff7cc0b0f..787f5088be 100644 --- a/src/lqueue.erl +++ b/src/lqueue.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2011-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2011-2014 GoPivotal, Inc. All rights reserved. %% -module(lqueue). diff --git a/src/mirrored_supervisor.erl b/src/mirrored_supervisor.erl index ae35526fed..7a35245167 100644 --- a/src/mirrored_supervisor.erl +++ b/src/mirrored_supervisor.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2011-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2011-2014 GoPivotal, Inc. All rights reserved. %% -module(mirrored_supervisor). diff --git a/src/mirrored_supervisor_tests.erl b/src/mirrored_supervisor_tests.erl index 6d7c55dd5e..26f59e011e 100644 --- a/src/mirrored_supervisor_tests.erl +++ b/src/mirrored_supervisor_tests.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2011-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2011-2014 GoPivotal, Inc. All rights reserved. %% -module(mirrored_supervisor_tests). diff --git a/src/mnesia_sync.erl b/src/mnesia_sync.erl index 78c566e170..8fa54d6535 100644 --- a/src/mnesia_sync.erl +++ b/src/mnesia_sync.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(mnesia_sync). diff --git a/src/pmon.erl b/src/pmon.erl index 8630816746..ae1be40c0e 100644 --- a/src/pmon.erl +++ b/src/pmon.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2011-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2011-2014 GoPivotal, Inc. All rights reserved. %% -module(pmon). diff --git a/src/priority_queue.erl b/src/priority_queue.erl index c76c0d33b7..9a578aa953 100644 --- a/src/priority_queue.erl +++ b/src/priority_queue.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% %% Priority queues have essentially the same interface as ordinary diff --git a/src/rabbit.erl b/src/rabbit.erl index fda3f51699..c2d7e29d6b 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit). @@ -394,7 +394,8 @@ status() -> {os, os:type()}, {erlang_version, erlang:system_info(system_version)}, {memory, rabbit_vm:memory()}, - {alarms, alarms()}], + {alarms, alarms()}, + {listeners, listeners()}], S2 = rabbit_misc:filter_exit_map( fun ({Key, {M, F, A}}) -> {Key, erlang:apply(M, F, A)} end, [{vm_memory_high_watermark, {vm_memory_monitor, @@ -424,6 +425,18 @@ alarms() -> %% [{{resource_limit,memory,rabbit@mercurio},[]}] [Limit || {{resource_limit, Limit, Node}, _} <- Alarms, Node =:= N]. +listeners() -> + Listeners = try + rabbit_networking:active_listeners() + catch + exit:{aborted, _} -> [] + end, + [{Protocol, Port, rabbit_misc:ntoa(IP)} || + #listener{node = Node, + protocol = Protocol, + ip_address = IP, + port = Port} <- Listeners, Node =:= node()]. + is_running() -> is_running(node()). is_running(Node) -> rabbit_nodes:is_process_running(Node, rabbit). diff --git a/src/rabbit_access_control.erl b/src/rabbit_access_control.erl index 4bb1aed167..0ff88cf7fc 100644 --- a/src/rabbit_access_control.erl +++ b/src/rabbit_access_control.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_access_control). diff --git a/src/rabbit_alarm.erl b/src/rabbit_alarm.erl index cd1d125bd5..983ab2e405 100644 --- a/src/rabbit_alarm.erl +++ b/src/rabbit_alarm.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_alarm). diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index 9aed28d48e..85d1f28311 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_amqqueue). diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 1bb16edb4c..5d3f3a125b 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_amqqueue_process). diff --git a/src/rabbit_amqqueue_sup.erl b/src/rabbit_amqqueue_sup.erl index 74ae59dabb..0fd64c2671 100644 --- a/src/rabbit_amqqueue_sup.erl +++ b/src/rabbit_amqqueue_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_amqqueue_sup). diff --git a/src/rabbit_auth_backend.erl b/src/rabbit_auth_backend.erl index 4ffc8c3aeb..a7dd6494b1 100644 --- a/src/rabbit_auth_backend.erl +++ b/src/rabbit_auth_backend.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_auth_backend). diff --git a/src/rabbit_auth_backend_dummy.erl b/src/rabbit_auth_backend_dummy.erl index 1a3db7327e..863eb18e6a 100644 --- a/src/rabbit_auth_backend_dummy.erl +++ b/src/rabbit_auth_backend_dummy.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_auth_backend_dummy). diff --git a/src/rabbit_auth_backend_internal.erl b/src/rabbit_auth_backend_internal.erl index ebeac1f756..2036a73fe4 100644 --- a/src/rabbit_auth_backend_internal.erl +++ b/src/rabbit_auth_backend_internal.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_auth_backend_internal). diff --git a/src/rabbit_auth_mechanism.erl b/src/rabbit_auth_mechanism.erl index 21528b1180..d11af09552 100644 --- a/src/rabbit_auth_mechanism.erl +++ b/src/rabbit_auth_mechanism.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_auth_mechanism). diff --git a/src/rabbit_auth_mechanism_amqplain.erl b/src/rabbit_auth_mechanism_amqplain.erl index 8e896b4557..e2183a9921 100644 --- a/src/rabbit_auth_mechanism_amqplain.erl +++ b/src/rabbit_auth_mechanism_amqplain.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_auth_mechanism_amqplain). diff --git a/src/rabbit_auth_mechanism_cr_demo.erl b/src/rabbit_auth_mechanism_cr_demo.erl index 8699a9fa29..b5751f414d 100644 --- a/src/rabbit_auth_mechanism_cr_demo.erl +++ b/src/rabbit_auth_mechanism_cr_demo.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_auth_mechanism_cr_demo). diff --git a/src/rabbit_auth_mechanism_plain.erl b/src/rabbit_auth_mechanism_plain.erl index 5ab22e75d5..c008f6a7fa 100644 --- a/src/rabbit_auth_mechanism_plain.erl +++ b/src/rabbit_auth_mechanism_plain.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_auth_mechanism_plain). diff --git a/src/rabbit_autoheal.erl b/src/rabbit_autoheal.erl index 986e3bcda7..826bfc45d4 100644 --- a/src/rabbit_autoheal.erl +++ b/src/rabbit_autoheal.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_autoheal). diff --git a/src/rabbit_backing_queue.erl b/src/rabbit_backing_queue.erl index cae939ba6a..8f37bf60da 100644 --- a/src/rabbit_backing_queue.erl +++ b/src/rabbit_backing_queue.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_backing_queue). diff --git a/src/rabbit_backing_queue_qc.erl b/src/rabbit_backing_queue_qc.erl index 2adff7e5a8..49b71122a8 100644 --- a/src/rabbit_backing_queue_qc.erl +++ b/src/rabbit_backing_queue_qc.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2011-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2011-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_backing_queue_qc). diff --git a/src/rabbit_basic.erl b/src/rabbit_basic.erl index a5dc6eb2d2..85f9d56e87 100644 --- a/src/rabbit_basic.erl +++ b/src/rabbit_basic.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_basic). diff --git a/src/rabbit_binary_generator.erl b/src/rabbit_binary_generator.erl index 1e5ab0a7b2..53ba35dbee 100644 --- a/src/rabbit_binary_generator.erl +++ b/src/rabbit_binary_generator.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_binary_generator). diff --git a/src/rabbit_binary_parser.erl b/src/rabbit_binary_parser.erl index 9ffeb41a19..3ab82cad78 100644 --- a/src/rabbit_binary_parser.erl +++ b/src/rabbit_binary_parser.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_binary_parser). diff --git a/src/rabbit_binding.erl b/src/rabbit_binding.erl index 1b4a07e313..7a095e068b 100644 --- a/src/rabbit_binding.erl +++ b/src/rabbit_binding.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_binding). diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 2a6b01f7d3..56a3cbb6e8 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_channel). diff --git a/src/rabbit_channel_interceptor.erl b/src/rabbit_channel_interceptor.erl index 49f7e3887b..81c17fbfbe 100644 --- a/src/rabbit_channel_interceptor.erl +++ b/src/rabbit_channel_interceptor.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% %% Since the AMQP methods used here are queue related, diff --git a/src/rabbit_channel_sup.erl b/src/rabbit_channel_sup.erl index 26f9700e5e..448d17a294 100644 --- a/src/rabbit_channel_sup.erl +++ b/src/rabbit_channel_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_channel_sup). diff --git a/src/rabbit_channel_sup_sup.erl b/src/rabbit_channel_sup_sup.erl index e2c255dba7..d0e8254896 100644 --- a/src/rabbit_channel_sup_sup.erl +++ b/src/rabbit_channel_sup_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_channel_sup_sup). diff --git a/src/rabbit_client_sup.erl b/src/rabbit_client_sup.erl index 843bb615ce..dcf8c9e226 100644 --- a/src/rabbit_client_sup.erl +++ b/src/rabbit_client_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_client_sup). diff --git a/src/rabbit_command_assembler.erl b/src/rabbit_command_assembler.erl index 4095ccf1b3..20397cc036 100644 --- a/src/rabbit_command_assembler.erl +++ b/src/rabbit_command_assembler.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_command_assembler). diff --git a/src/rabbit_connection_helper_sup.erl b/src/rabbit_connection_helper_sup.erl index f268d8d678..85266bd6ba 100644 --- a/src/rabbit_connection_helper_sup.erl +++ b/src/rabbit_connection_helper_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_connection_helper_sup). diff --git a/src/rabbit_connection_sup.erl b/src/rabbit_connection_sup.erl index 9ed5dc7770..1dfdadaed7 100644 --- a/src/rabbit_connection_sup.erl +++ b/src/rabbit_connection_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_connection_sup). diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl index 746f2bdb8e..f9e5907858 100644 --- a/src/rabbit_control_main.erl +++ b/src/rabbit_control_main.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_control_main). @@ -192,7 +192,11 @@ start() -> rabbit_misc:quit(2); {badrpc, Reason} -> print_error("unable to connect to node ~w: ~w", [Node, Reason]), - print_badrpc_diagnostics(Node), + print_badrpc_diagnostics([Node]), + rabbit_misc:quit(2); + {badrpc_multi, Reason, Nodes} -> + print_error("unable to connect to nodes ~p: ~w", [Nodes, Reason]), + print_badrpc_diagnostics(Nodes), rabbit_misc:quit(2); Other -> print_error("~p", [Other]), @@ -220,8 +224,8 @@ print_report0(Node, {Module, InfoFun, KeysFun}, VHostArg) -> print_error(Format, Args) -> fmt_stderr("Error: " ++ Format, Args). -print_badrpc_diagnostics(Node) -> - fmt_stderr(rabbit_nodes:diagnostics([Node]), []). +print_badrpc_diagnostics(Nodes) -> + fmt_stderr(rabbit_nodes:diagnostics(Nodes), []). stop() -> ok. diff --git a/src/rabbit_dead_letter.erl b/src/rabbit_dead_letter.erl index b8a2cc9ccb..6aeace7964 100644 --- a/src/rabbit_dead_letter.erl +++ b/src/rabbit_dead_letter.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_dead_letter). diff --git a/src/rabbit_direct.erl b/src/rabbit_direct.erl index 1a5f400b72..749a67b1d5 100644 --- a/src/rabbit_direct.erl +++ b/src/rabbit_direct.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_direct). diff --git a/src/rabbit_disk_monitor.erl b/src/rabbit_disk_monitor.erl index f153641ef3..d9c29646be 100644 --- a/src/rabbit_disk_monitor.erl +++ b/src/rabbit_disk_monitor.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_disk_monitor). diff --git a/src/rabbit_error_logger.erl b/src/rabbit_error_logger.erl index 447cd89317..313cc865e9 100644 --- a/src/rabbit_error_logger.erl +++ b/src/rabbit_error_logger.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_error_logger). diff --git a/src/rabbit_error_logger_file_h.erl b/src/rabbit_error_logger_file_h.erl index 9421b52e83..27bfa9deeb 100644 --- a/src/rabbit_error_logger_file_h.erl +++ b/src/rabbit_error_logger_file_h.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_error_logger_file_h). diff --git a/src/rabbit_event.erl b/src/rabbit_event.erl index e0226955dc..b867223b50 100644 --- a/src/rabbit_event.erl +++ b/src/rabbit_event.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_event). diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl index bb5b63e912..ad558586ad 100644 --- a/src/rabbit_exchange.erl +++ b/src/rabbit_exchange.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_exchange). diff --git a/src/rabbit_exchange_decorator.erl b/src/rabbit_exchange_decorator.erl index 505998b9fe..2f056b1bfe 100644 --- a/src/rabbit_exchange_decorator.erl +++ b/src/rabbit_exchange_decorator.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_exchange_decorator). diff --git a/src/rabbit_exchange_type.erl b/src/rabbit_exchange_type.erl index ce7a436bff..4dd3442838 100644 --- a/src/rabbit_exchange_type.erl +++ b/src/rabbit_exchange_type.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_exchange_type). diff --git a/src/rabbit_exchange_type_direct.erl b/src/rabbit_exchange_type_direct.erl index 52704ab6c8..8a240a8bf2 100644 --- a/src/rabbit_exchange_type_direct.erl +++ b/src/rabbit_exchange_type_direct.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_exchange_type_direct). diff --git a/src/rabbit_exchange_type_fanout.erl b/src/rabbit_exchange_type_fanout.erl index 068472bb98..3a1f0717bc 100644 --- a/src/rabbit_exchange_type_fanout.erl +++ b/src/rabbit_exchange_type_fanout.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_exchange_type_fanout). diff --git a/src/rabbit_exchange_type_headers.erl b/src/rabbit_exchange_type_headers.erl index c841560e2c..afce57d94b 100644 --- a/src/rabbit_exchange_type_headers.erl +++ b/src/rabbit_exchange_type_headers.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_exchange_type_headers). diff --git a/src/rabbit_exchange_type_invalid.erl b/src/rabbit_exchange_type_invalid.erl index 84bb218290..457f184a70 100644 --- a/src/rabbit_exchange_type_invalid.erl +++ b/src/rabbit_exchange_type_invalid.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_exchange_type_invalid). diff --git a/src/rabbit_exchange_type_topic.erl b/src/rabbit_exchange_type_topic.erl index 27b8d1e6b4..af00fe88dd 100644 --- a/src/rabbit_exchange_type_topic.erl +++ b/src/rabbit_exchange_type_topic.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_exchange_type_topic). diff --git a/src/rabbit_file.erl b/src/rabbit_file.erl index 4658ecfd4e..d71818c869 100644 --- a/src/rabbit_file.erl +++ b/src/rabbit_file.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2011-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2011-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_file). diff --git a/src/rabbit_framing.erl b/src/rabbit_framing.erl index 51aaa999cd..7f6989d4e9 100644 --- a/src/rabbit_framing.erl +++ b/src/rabbit_framing.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% %% TODO auto-generate diff --git a/src/rabbit_guid.erl b/src/rabbit_guid.erl index 70d1f0c194..5307d7e257 100644 --- a/src/rabbit_guid.erl +++ b/src/rabbit_guid.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_guid). diff --git a/src/rabbit_heartbeat.erl b/src/rabbit_heartbeat.erl index ff9de67ab6..36b0baa561 100644 --- a/src/rabbit_heartbeat.erl +++ b/src/rabbit_heartbeat.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_heartbeat). diff --git a/src/rabbit_limiter.erl b/src/rabbit_limiter.erl index 5776fc3f7a..b17b7de98b 100644 --- a/src/rabbit_limiter.erl +++ b/src/rabbit_limiter.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% %% The purpose of the limiter is to stem the flow of messages from diff --git a/src/rabbit_log.erl b/src/rabbit_log.erl index 2e3a1bbbd2..f4df0e76d5 100644 --- a/src/rabbit_log.erl +++ b/src/rabbit_log.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_log). diff --git a/src/rabbit_memory_monitor.erl b/src/rabbit_memory_monitor.erl index 4bd1a575f5..451ee1f443 100644 --- a/src/rabbit_memory_monitor.erl +++ b/src/rabbit_memory_monitor.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% diff --git a/src/rabbit_mirror_queue_coordinator.erl b/src/rabbit_mirror_queue_coordinator.erl index 6661408ce2..2feeea5a26 100644 --- a/src/rabbit_mirror_queue_coordinator.erl +++ b/src/rabbit_mirror_queue_coordinator.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2010-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2010-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_mirror_queue_coordinator). diff --git a/src/rabbit_mirror_queue_master.erl b/src/rabbit_mirror_queue_master.erl index b5ae1acad1..1bac1b5594 100644 --- a/src/rabbit_mirror_queue_master.erl +++ b/src/rabbit_mirror_queue_master.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2010-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2010-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_mirror_queue_master). diff --git a/src/rabbit_mirror_queue_misc.erl b/src/rabbit_mirror_queue_misc.erl index 4e9d5aef16..f1740d1425 100644 --- a/src/rabbit_mirror_queue_misc.erl +++ b/src/rabbit_mirror_queue_misc.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2010-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2010-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_mirror_queue_misc). diff --git a/src/rabbit_mirror_queue_mode.erl b/src/rabbit_mirror_queue_mode.erl index 9e2015d987..1724be660b 100644 --- a/src/rabbit_mirror_queue_mode.erl +++ b/src/rabbit_mirror_queue_mode.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2010-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2010-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_mirror_queue_mode). diff --git a/src/rabbit_mirror_queue_mode_all.erl b/src/rabbit_mirror_queue_mode_all.erl index 3b5163a3b8..ab5fccc83d 100644 --- a/src/rabbit_mirror_queue_mode_all.erl +++ b/src/rabbit_mirror_queue_mode_all.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2010-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2010-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_mirror_queue_mode_all). diff --git a/src/rabbit_mirror_queue_mode_exactly.erl b/src/rabbit_mirror_queue_mode_exactly.erl index 2841f87e07..bdbc480120 100644 --- a/src/rabbit_mirror_queue_mode_exactly.erl +++ b/src/rabbit_mirror_queue_mode_exactly.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2010-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2010-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_mirror_queue_mode_exactly). diff --git a/src/rabbit_mirror_queue_mode_nodes.erl b/src/rabbit_mirror_queue_mode_nodes.erl index 779b439d51..1b32f3b39b 100644 --- a/src/rabbit_mirror_queue_mode_nodes.erl +++ b/src/rabbit_mirror_queue_mode_nodes.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2010-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2010-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_mirror_queue_mode_nodes). diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl index 37d2e5b611..1b24d8b93c 100644 --- a/src/rabbit_mirror_queue_slave.erl +++ b/src/rabbit_mirror_queue_slave.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2010-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2010-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_mirror_queue_slave). diff --git a/src/rabbit_mirror_queue_slave_sup.erl b/src/rabbit_mirror_queue_slave_sup.erl index 6fba99db57..b631cc3195 100644 --- a/src/rabbit_mirror_queue_slave_sup.erl +++ b/src/rabbit_mirror_queue_slave_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2010-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2010-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_mirror_queue_slave_sup). diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl index ab1c60635d..2e87a8f6e1 100644 --- a/src/rabbit_misc.erl +++ b/src/rabbit_misc.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_misc). @@ -542,9 +542,11 @@ tcp_name(Prefix, IPAddress, Port) list_to_atom( format("~w_~s:~w", [Prefix, inet_parse:ntoa(IPAddress), Port])). -format_inet_error(address) -> "cannot connect to host/port"; -format_inet_error(timeout) -> "timed out"; -format_inet_error(Error) -> inet:format_error(Error). +format_inet_error(E) -> format("~w (~s)", [E, format_inet_error0(E)]). + +format_inet_error0(address) -> "cannot connect to host/port"; +format_inet_error0(timeout) -> "timed out"; +format_inet_error0(Error) -> inet:format_error(Error). %% This is a modified version of Luke Gorrie's pmap - %% http://lukego.livejournal.com/6753.html - that doesn't care about diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl index 59873ffc10..c6c2c8eb1e 100644 --- a/src/rabbit_mnesia.erl +++ b/src/rabbit_mnesia.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_mnesia). @@ -129,7 +129,7 @@ init_from_config() -> {ok, Node} -> rabbit_log:info("Node '~p' selected for clustering from " "configuration~n", [Node]), - {ok, {_, DiscNodes, _}} = discover_cluster(Node), + {ok, {_, DiscNodes, _}} = discover_cluster0(Node), init_db_and_upgrade(DiscNodes, NodeType, true), rabbit_node_monitor:notify_joined_cluster(); none -> @@ -160,10 +160,7 @@ join_cluster(DiscoveryNode, NodeType) -> true -> e(clustering_only_disc_node); false -> ok end, - {ClusterNodes, _, _} = case discover_cluster(DiscoveryNode) of - {ok, Res} -> Res; - {error, _} = E -> throw(E) - end, + {ClusterNodes, _, _} = discover_cluster([DiscoveryNode]), case me_in_nodes(ClusterNodes) of false -> %% reset the node. this simplifies things and it will be needed in @@ -229,10 +226,7 @@ change_cluster_node_type(Type) -> false -> e(not_clustered); true -> ok end, - {_, _, RunningNodes} = case discover_cluster(cluster_nodes(all)) of - {ok, Status} -> Status; - {error, _Reason} -> e(cannot_connect_to_cluster) - end, + {_, _, RunningNodes} = discover_cluster(cluster_nodes(all)), %% We might still be marked as running by a remote node since the %% information of us going down might not have propagated yet. Node = case RunningNodes -- [node()] of @@ -245,11 +239,7 @@ change_cluster_node_type(Type) -> update_cluster_nodes(DiscoveryNode) -> ensure_mnesia_not_running(), ensure_mnesia_dir(), - Status = {AllNodes, _, _} = - case discover_cluster(DiscoveryNode) of - {ok, Status0} -> Status0; - {error, _Reason} -> e(cannot_connect_to_node) - end, + Status = {AllNodes, _, _} = discover_cluster([DiscoveryNode]), case me_in_nodes(AllNodes) of true -> %% As in `check_consistency/0', we can safely delete the @@ -607,22 +597,20 @@ running_disc_nodes() -> %% Internal helpers %%-------------------------------------------------------------------- -discover_cluster(Nodes) when is_list(Nodes) -> - lists:foldl(fun (_, {ok, Res}) -> {ok, Res}; - (Node, {error, _}) -> discover_cluster(Node) - end, {error, no_nodes_provided}, Nodes); -discover_cluster(Node) when Node == node() -> - {error, {cannot_discover_cluster, "Cannot cluster node with itself"}}; -discover_cluster(Node) -> - OfflineError = - {error, {cannot_discover_cluster, - "The nodes provided are either offline or not running"}}, - case rpc:call(Node, rabbit_mnesia, cluster_status_from_mnesia, []) of - {badrpc, _Reason} -> OfflineError; - {error, mnesia_not_running} -> OfflineError; - {ok, Res} -> {ok, Res} +discover_cluster(Nodes) -> + case lists:foldl(fun (_, {ok, Res}) -> {ok, Res}; + (Node, _) -> discover_cluster0(Node) + end, {error, no_nodes_provided}, Nodes) of + {ok, Res} -> Res; + {error, E} -> throw({error, E}); + {badrpc, Reason} -> throw({badrpc_multi, Reason, Nodes}) end. +discover_cluster0(Node) when Node == node() -> + {error, cannot_cluster_node_with_itself}; +discover_cluster0(Node) -> + rpc:call(Node, rabbit_mnesia, cluster_status_from_mnesia, []). + schema_ok_or_move() -> case rabbit_table:check_schema_integrity() of ok -> @@ -833,15 +821,9 @@ error_description(resetting_only_disc_node) -> "Please convert another node of the cluster to a disc node first."; error_description(not_clustered) -> "Non-clustered nodes can only be disc nodes."; -error_description(cannot_connect_to_cluster) -> - "Could not connect to the cluster nodes present in this node's " - "status file. If the cluster has changed, you can use the " - "'update_cluster_nodes' command to point to the new cluster nodes."; error_description(no_online_cluster_nodes) -> "Could not find any online cluster nodes. If the cluster has changed, " "you can use the 'update_cluster_nodes' command."; -error_description(cannot_connect_to_node) -> - "Could not connect to the cluster node provided."; error_description(inconsistent_cluster) -> "The nodes provided do not have this node as part of the cluster."; error_description(not_a_cluster_node) -> diff --git a/src/rabbit_msg_file.erl b/src/rabbit_msg_file.erl index a37106d65e..2f3ccc355b 100644 --- a/src/rabbit_msg_file.erl +++ b/src/rabbit_msg_file.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_msg_file). diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl index 1562050c0e..d97c2ad55d 100644 --- a/src/rabbit_msg_store.erl +++ b/src/rabbit_msg_store.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_msg_store). diff --git a/src/rabbit_msg_store_ets_index.erl b/src/rabbit_msg_store_ets_index.erl index c17ff2cbba..8af921b1b6 100644 --- a/src/rabbit_msg_store_ets_index.erl +++ b/src/rabbit_msg_store_ets_index.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_msg_store_ets_index). diff --git a/src/rabbit_msg_store_gc.erl b/src/rabbit_msg_store_gc.erl index 1edd7d51dc..ebb51cf713 100644 --- a/src/rabbit_msg_store_gc.erl +++ b/src/rabbit_msg_store_gc.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_msg_store_gc). diff --git a/src/rabbit_msg_store_index.erl b/src/rabbit_msg_store_index.erl index bb5f11b0fa..5d067cc97f 100644 --- a/src/rabbit_msg_store_index.erl +++ b/src/rabbit_msg_store_index.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_msg_store_index). diff --git a/src/rabbit_net.erl b/src/rabbit_net.erl index 658474e4bd..e33c183678 100644 --- a/src/rabbit_net.erl +++ b/src/rabbit_net.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_net). diff --git a/src/rabbit_networking.erl b/src/rabbit_networking.erl index 42438790c0..1da977262f 100644 --- a/src/rabbit_networking.erl +++ b/src/rabbit_networking.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_networking). @@ -120,6 +120,7 @@ %%---------------------------------------------------------------------------- boot() -> + ok = record_distribution_listener(), ok = start(), ok = boot_tcp(), ok = boot_ssl(). @@ -275,6 +276,11 @@ tcp_listener_stopped(Protocol, IPAddress, Port) -> ip_address = IPAddress, port = Port}). +record_distribution_listener() -> + {Name, Host} = rabbit_nodes:parts(node()), + {port, Port, _Version} = erl_epmd:port_please(Name, Host), + tcp_listener_started(clustering, {0,0,0,0,0,0,0,0}, Port). + active_listeners() -> rabbit_misc:dirty_read_all(rabbit_listener). diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl index b9a7b44182..1496147848 100644 --- a/src/rabbit_node_monitor.erl +++ b/src/rabbit_node_monitor.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_node_monitor). diff --git a/src/rabbit_nodes.erl b/src/rabbit_nodes.erl index c5aa84734a..db3cd08311 100644 --- a/src/rabbit_nodes.erl +++ b/src/rabbit_nodes.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_nodes). @@ -23,6 +23,7 @@ -include_lib("kernel/include/inet.hrl"). -define(EPMD_TIMEOUT, 30000). +-define(TCP_DIAGNOSTIC_TIMEOUT, 5000). %%---------------------------------------------------------------------------- %% Specs @@ -58,15 +59,13 @@ names(Hostname) -> end. diagnostics(Nodes) -> - Hosts = lists:usort([element(2, parts(Node)) || Node <- Nodes]), NodeDiags = [{"~nDIAGNOSTICS~n===========~n~n" - "nodes in question: ~p~n~n" - "hosts, their running nodes and ports:", [Nodes]}] ++ - [diagnostics_host(Host) || Host <- Hosts] ++ - diagnostics0(), + "attempted to contact: ~p~n", [Nodes]}] ++ + [diagnostics_node(Node) || Node <- Nodes] ++ + current_node_details(), rabbit_misc:format_many(lists:flatten(NodeDiags)). -diagnostics0() -> +current_node_details() -> [{"~ncurrent node details:~n- node name: ~w", [node()]}, case init:get_argument(home) of {ok, [[Home]]} -> {"- home dir: ~s", [Home]}; @@ -74,15 +73,62 @@ diagnostics0() -> end, {"- cookie hash: ~s", [cookie_hash()]}]. -diagnostics_host(Host) -> - case names(Host) of - {error, EpmdReason} -> - {"- unable to connect to epmd on ~s: ~w (~s)", - [Host, EpmdReason, rabbit_misc:format_inet_error(EpmdReason)]}; - {ok, NamePorts} -> - {"- ~s: ~p", - [Host, [{list_to_atom(Name), Port} || - {Name, Port} <- NamePorts]]} +diagnostics_node(Node) -> + {Name, Host} = parts(Node), + [{"~s:", [Node]} | + case names(Host) of + {error, Reason} -> + [{" * unable to connect to epmd (port ~s) on ~s: ~s~n", + [epmd_port(), Host, rabbit_misc:format_inet_error(Reason)]}]; + {ok, NamePorts} -> + diagnostics_node0(Name, Host, NamePorts) + end]. + +epmd_port() -> + case init:get_argument(epmd_port) of + {ok, [[Port | _] | _]} when is_list(Port) -> Port; + error -> "4369" + end. + +diagnostics_node0(Name, Host, NamePorts) -> + case [{N, P} || {N, P} <- NamePorts, N =:= Name] of + [] -> + {SelfName, SelfHost} = parts(node()), + Others = [list_to_atom(N) || {N, _} <- NamePorts, + N =/= case SelfHost of + 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]; + [{Name, Port}] -> + [{" * found ~s (port ~b)", [Name, Port]} | + case diagnose_connect(Host, Port) of + ok -> + [{" * TCP connection succeeded~n" + " * suggestion: hostname mismatch?~n" + " * suggestion: is the cookie set correctly?", []}]; + {error, Reason} -> + [{" * can't establish TCP connection, reason: ~s~n" + " * suggestion: blocked by firewall?", + [rabbit_misc:format_inet_error(Reason)]}] + end] + end. + +diagnose_connect(Host, Port) -> + case inet:gethostbyname(Host) of + {ok, #hostent{h_addrtype = Family}} -> + case gen_tcp:connect(Host, Port, [Family], + ?TCP_DIAGNOSTIC_TIMEOUT) of + {ok, Socket} -> gen_tcp:close(Socket), + ok; + {error, _} = E -> E + end; + {error, _} = E -> + E end. make({Prefix, Suffix}) -> list_to_atom(lists:append([Prefix, "@", Suffix])); diff --git a/src/rabbit_parameter_validation.erl b/src/rabbit_parameter_validation.erl index 0a87843298..c42bcc4adc 100644 --- a/src/rabbit_parameter_validation.erl +++ b/src/rabbit_parameter_validation.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_parameter_validation). diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl index 168ced3cfe..4ac6c4a01c 100644 --- a/src/rabbit_plugins.erl +++ b/src/rabbit_plugins.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2011-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2011-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_plugins). diff --git a/src/rabbit_plugins_main.erl b/src/rabbit_plugins_main.erl index 948d2ab000..89e16f14b2 100644 --- a/src/rabbit_plugins_main.erl +++ b/src/rabbit_plugins_main.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2011-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2011-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_plugins_main). diff --git a/src/rabbit_policies.erl b/src/rabbit_policies.erl index c4a37e7a3a..fe2b766f30 100644 --- a/src/rabbit_policies.erl +++ b/src/rabbit_policies.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_policies). diff --git a/src/rabbit_policy.erl b/src/rabbit_policy.erl index cd55381a18..06bfaf179a 100644 --- a/src/rabbit_policy.erl +++ b/src/rabbit_policy.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_policy). diff --git a/src/rabbit_policy_validator.erl b/src/rabbit_policy_validator.erl index 661db73d76..dd0520891c 100644 --- a/src/rabbit_policy_validator.erl +++ b/src/rabbit_policy_validator.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_policy_validator). diff --git a/src/rabbit_prelaunch.erl b/src/rabbit_prelaunch.erl index be407a024d..4037ed4410 100644 --- a/src/rabbit_prelaunch.erl +++ b/src/rabbit_prelaunch.erl @@ -11,17 +11,20 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_prelaunch). -export([start/0, stop/0]). +-import(rabbit_misc, [pget/2, pget/3]). + -include("rabbit.hrl"). --define(BaseApps, [rabbit]). +-define(DIST_PORT_NOT_CONFIGURED, 0). -define(ERROR_CODE, 1). +-define(DIST_PORT_CONFIGURED, 2). %%---------------------------------------------------------------------------- %% Specs @@ -37,9 +40,19 @@ %%---------------------------------------------------------------------------- start() -> - [NodeStr] = init:get_plain_arguments(), - ok = duplicate_node_check(NodeStr), - rabbit_misc:quit(0), + case init:get_plain_arguments() of + [NodeStr] -> + Node = rabbit_nodes:make(NodeStr), + {NodeName, NodeHost} = rabbit_nodes:parts(Node), + ok = duplicate_node_check(Node, NodeName, NodeHost), + ok = dist_port_set_check(), + ok = dist_port_use_check(NodeHost); + [] -> + %% Ignore running node while installing windows service + ok = dist_port_set_check(), + ok + end, + rabbit_misc:quit(?DIST_PORT_NOT_CONFIGURED), ok. stop() -> @@ -48,12 +61,7 @@ stop() -> %%---------------------------------------------------------------------------- %% Check whether a node with the same name is already running -duplicate_node_check([]) -> - %% Ignore running node while installing windows service - ok; -duplicate_node_check(NodeStr) -> - Node = rabbit_nodes:make(NodeStr), - {NodeName, NodeHost} = rabbit_nodes:parts(Node), +duplicate_node_check(Node, NodeName, NodeHost) -> case rabbit_nodes:names(NodeHost) of {ok, NamePorts} -> case proplists:is_defined(NodeName, NamePorts) of @@ -65,8 +73,47 @@ duplicate_node_check(NodeStr) -> false -> ok end; {error, EpmdReason} -> - io:format("ERROR: epmd error for host ~p: ~p (~s)~n", - [NodeHost, EpmdReason, - rabbit_misc:format_inet_error(EpmdReason)]), + io:format("ERROR: epmd error for host ~s: ~s~n", + [NodeHost, rabbit_misc:format_inet_error(EpmdReason)]), rabbit_misc:quit(?ERROR_CODE) end. + +dist_port_set_check() -> + case os:getenv("RABBITMQ_CONFIG_FILE") of + false -> + ok; + File -> + case file:consult(File ++ ".config") of + {ok, [Config]} -> + Kernel = pget(kernel, Config, []), + case {pget(inet_dist_listen_min, Kernel, none), + pget(inet_dist_listen_max, Kernel, none)} of + {none, none} -> ok; + _ -> rabbit_misc:quit(?DIST_PORT_CONFIGURED) + end; + {error, _} -> + %% TODO can we present errors more nicely here + %% than after -config has failed? + ok + end + end. + +dist_port_use_check(NodeHost) -> + case os:getenv("RABBITMQ_DIST_PORT") of + false -> ok; + PortStr -> Port = list_to_integer(PortStr), + case gen_tcp:listen(Port, [inet, {reuseaddr, true}]) of + {ok, Sock} -> gen_tcp:close(Sock); + {error, _} -> dist_port_use_check_fail(Port, NodeHost) + end + end. + +dist_port_use_check_fail(Port, Host) -> + {ok, Names} = rabbit_nodes:names(Host), + case [N || {N, P} <- Names, P =:= Port] of + [] -> io:format("ERROR: distribution port ~b in use on ~s " + "(by non-Erlang process?)~n", [Port, Host]); + [Name] -> io:format("ERROR: distribution port ~b in use by ~s@~s~n", + [Port, Name, Host]) + end, + rabbit_misc:quit(?ERROR_CODE). diff --git a/src/rabbit_queue_collector.erl b/src/rabbit_queue_collector.erl index 855c799597..70a4da1e47 100644 --- a/src/rabbit_queue_collector.erl +++ b/src/rabbit_queue_collector.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_queue_collector). diff --git a/src/rabbit_queue_consumers.erl b/src/rabbit_queue_consumers.erl index 7ba5d25e83..4b1f07de0d 100644 --- a/src/rabbit_queue_consumers.erl +++ b/src/rabbit_queue_consumers.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_queue_consumers). diff --git a/src/rabbit_queue_index.erl b/src/rabbit_queue_index.erl index e00508b434..3d0baac245 100644 --- a/src/rabbit_queue_index.erl +++ b/src/rabbit_queue_index.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_queue_index). diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 4a1948295a..89cfc312d4 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_reader). @@ -188,8 +188,8 @@ server_capabilities(_) -> log(Level, Fmt, Args) -> rabbit_log:log(connection, Level, Fmt, Args). socket_error(Reason) -> - log(error, "error on AMQP connection ~p: ~p (~s)~n", - [self(), Reason, rabbit_misc:format_inet_error(Reason)]). + log(error, "error on AMQP connection ~p: ~s~n", + [self(), rabbit_misc:format_inet_error(Reason)]). inet_op(F) -> rabbit_misc:throw_on_error(inet_error, F). diff --git a/src/rabbit_recovery_terms.erl b/src/rabbit_recovery_terms.erl index efb94b81bc..bbf38f58c1 100644 --- a/src/rabbit_recovery_terms.erl +++ b/src/rabbit_recovery_terms.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% %% We use a gen_server simply so that during the terminate/2 call diff --git a/src/rabbit_registry.erl b/src/rabbit_registry.erl index abb71e7aed..ad8d0d020b 100644 --- a/src/rabbit_registry.erl +++ b/src/rabbit_registry.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_registry). diff --git a/src/rabbit_restartable_sup.erl b/src/rabbit_restartable_sup.erl index 65a2ca0a65..c6111c43f8 100644 --- a/src/rabbit_restartable_sup.erl +++ b/src/rabbit_restartable_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_restartable_sup). diff --git a/src/rabbit_router.erl b/src/rabbit_router.erl index 00343570be..fca01759aa 100644 --- a/src/rabbit_router.erl +++ b/src/rabbit_router.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_router). diff --git a/src/rabbit_runtime_parameter.erl b/src/rabbit_runtime_parameter.erl index ee48165bad..df29729742 100644 --- a/src/rabbit_runtime_parameter.erl +++ b/src/rabbit_runtime_parameter.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_runtime_parameter). diff --git a/src/rabbit_runtime_parameters.erl b/src/rabbit_runtime_parameters.erl index 18b9fbb825..877714a1d5 100644 --- a/src/rabbit_runtime_parameters.erl +++ b/src/rabbit_runtime_parameters.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_runtime_parameters). diff --git a/src/rabbit_runtime_parameters_test.erl b/src/rabbit_runtime_parameters_test.erl index 05c8588108..6795653543 100644 --- a/src/rabbit_runtime_parameters_test.erl +++ b/src/rabbit_runtime_parameters_test.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_runtime_parameters_test). diff --git a/src/rabbit_sasl_report_file_h.erl b/src/rabbit_sasl_report_file_h.erl index 39a10ac39a..823816c0e4 100644 --- a/src/rabbit_sasl_report_file_h.erl +++ b/src/rabbit_sasl_report_file_h.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_sasl_report_file_h). diff --git a/src/rabbit_ssl.erl b/src/rabbit_ssl.erl index 109bff30b0..e289489697 100644 --- a/src/rabbit_ssl.erl +++ b/src/rabbit_ssl.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_ssl). diff --git a/src/rabbit_sup.erl b/src/rabbit_sup.erl index c1deb14ba8..63c5e4650c 100644 --- a/src/rabbit_sup.erl +++ b/src/rabbit_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_sup). diff --git a/src/rabbit_table.erl b/src/rabbit_table.erl index a29c57d54a..da75932d0e 100644 --- a/src/rabbit_table.erl +++ b/src/rabbit_table.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_table). diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index b56aa805d5..92f2843ac7 100644 --- a/src/rabbit_tests.erl +++ b/src/rabbit_tests.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_tests). @@ -1236,7 +1236,8 @@ test_amqp_connection_refusal(Header) -> find_listener() -> [#listener{host = H, port = P} | _] = - [L || L = #listener{node = N} <- rabbit_networking:active_listeners(), + [L || L = #listener{node = N, protocol = amqp} + <- rabbit_networking:active_listeners(), N =:= node()], {H, P}. diff --git a/src/rabbit_tests_event_receiver.erl b/src/rabbit_tests_event_receiver.erl index 7b756cbc48..ccbdcbc27a 100644 --- a/src/rabbit_tests_event_receiver.erl +++ b/src/rabbit_tests_event_receiver.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_tests_event_receiver). diff --git a/src/rabbit_trace.erl b/src/rabbit_trace.erl index b08a9a1c66..aafd81df9c 100644 --- a/src/rabbit_trace.erl +++ b/src/rabbit_trace.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_trace). diff --git a/src/rabbit_types.erl b/src/rabbit_types.erl index 0edebff117..ba48867ad0 100644 --- a/src/rabbit_types.erl +++ b/src/rabbit_types.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_types). diff --git a/src/rabbit_upgrade.erl b/src/rabbit_upgrade.erl index c1f142d7da..8ab35a89dd 100644 --- a/src/rabbit_upgrade.erl +++ b/src/rabbit_upgrade.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_upgrade). diff --git a/src/rabbit_upgrade_functions.erl b/src/rabbit_upgrade_functions.erl index 4cb3cacc9a..b6d378525e 100644 --- a/src/rabbit_upgrade_functions.erl +++ b/src/rabbit_upgrade_functions.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_upgrade_functions). diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl index d0336de1cb..ede697481c 100644 --- a/src/rabbit_variable_queue.erl +++ b/src/rabbit_variable_queue.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_variable_queue). diff --git a/src/rabbit_version.erl b/src/rabbit_version.erl index c629180ef0..d943b5998f 100644 --- a/src/rabbit_version.erl +++ b/src/rabbit_version.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_version). diff --git a/src/rabbit_vhost.erl b/src/rabbit_vhost.erl index 9fa4da443f..efd95bc7e5 100644 --- a/src/rabbit_vhost.erl +++ b/src/rabbit_vhost.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_vhost). diff --git a/src/rabbit_vm.erl b/src/rabbit_vm.erl index df6bdb4465..48bbf64a95 100644 --- a/src/rabbit_vm.erl +++ b/src/rabbit_vm.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_vm). diff --git a/src/rabbit_writer.erl b/src/rabbit_writer.erl index 3571692bed..1882696efb 100644 --- a/src/rabbit_writer.erl +++ b/src/rabbit_writer.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(rabbit_writer). diff --git a/src/supervised_lifecycle.erl b/src/supervised_lifecycle.erl index 8b306f6fdf..fcfa90b632 100644 --- a/src/supervised_lifecycle.erl +++ b/src/supervised_lifecycle.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% %% Invoke callbacks on startup and termination. diff --git a/src/supervisor2_tests.erl b/src/supervisor2_tests.erl index 5a47e3098f..4d362e5bca 100644 --- a/src/supervisor2_tests.erl +++ b/src/supervisor2_tests.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2011-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2011-2014 GoPivotal, Inc. All rights reserved. %% -module(supervisor2_tests). diff --git a/src/tcp_acceptor.erl b/src/tcp_acceptor.erl index 267ce4f1aa..047b85c5a3 100644 --- a/src/tcp_acceptor.erl +++ b/src/tcp_acceptor.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(tcp_acceptor). @@ -63,9 +63,9 @@ handle_info({inet_async, LSock, Ref, {ok, Sock}}, {error, Err} -> {ok, {IPAddress, Port}} = inet:sockname(LSock), error_logger:error_msg( "failed to tune buffer size of " - "connection accepted on ~s:~p - ~p (~s)~n", + "connection accepted on ~s:~p - ~s~n", [rabbit_misc:ntoab(IPAddress), Port, - Err, rabbit_misc:format_inet_error(Err)]), + rabbit_misc:format_inet_error(Err)]), catch port_close(Sock) end, diff --git a/src/tcp_acceptor_sup.erl b/src/tcp_acceptor_sup.erl index 3619875fc4..10b10e4a02 100644 --- a/src/tcp_acceptor_sup.erl +++ b/src/tcp_acceptor_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(tcp_acceptor_sup). diff --git a/src/tcp_listener.erl b/src/tcp_listener.erl index 4b4a31b5f6..7c464c6a26 100644 --- a/src/tcp_listener.erl +++ b/src/tcp_listener.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(tcp_listener). diff --git a/src/tcp_listener_sup.erl b/src/tcp_listener_sup.erl index 2a65cc1796..b3e1c69b29 100644 --- a/src/tcp_listener_sup.erl +++ b/src/tcp_listener_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(tcp_listener_sup). diff --git a/src/test_sup.erl b/src/test_sup.erl index da325f1e00..d5b2a26fb6 100644 --- a/src/test_sup.erl +++ b/src/test_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(test_sup). diff --git a/src/vm_memory_monitor.erl b/src/vm_memory_monitor.erl index fc4353dcb4..5fb1e4721d 100644 --- a/src/vm_memory_monitor.erl +++ b/src/vm_memory_monitor.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% %% In practice Erlang shouldn't be allowed to grow to more than a half diff --git a/src/worker_pool.erl b/src/worker_pool.erl index e14c471c7f..0f265e2223 100644 --- a/src/worker_pool.erl +++ b/src/worker_pool.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(worker_pool). diff --git a/src/worker_pool_sup.erl b/src/worker_pool_sup.erl index 24bc375c11..16c359a085 100644 --- a/src/worker_pool_sup.erl +++ b/src/worker_pool_sup.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(worker_pool_sup). diff --git a/src/worker_pool_worker.erl b/src/worker_pool_worker.erl index 724235bf43..43673cb23c 100644 --- a/src/worker_pool_worker.erl +++ b/src/worker_pool_worker.erl @@ -11,7 +11,7 @@ %% The Original Code is RabbitMQ. %% %% The Initial Developer of the Original Code is GoPivotal, Inc. -%% Copyright (c) 2007-2013 GoPivotal, Inc. All rights reserved. +%% Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. %% -module(worker_pool_worker). |
