@@ -434,18 +434,26 @@ start_it(StartFun) ->
434434stop () ->
435435 case whereis (rabbit_boot ) of
436436 undefined -> ok ;
437- _ -> await_startup (true )
437+ _ ->
438+ rabbit_log :info (" RabbitMQ hasn't finished starting yet. Waiting for startup to finish before stopping..." ),
439+ await_startup (true )
438440 end ,
439- rabbit_log :info (" Stopping RabbitMQ~n " , []),
441+ rabbit_log :info (" RabbitMQ is asked to stop... ~n " , []),
440442 Apps = ? APPS ++ rabbit_plugins :active (),
441443 stop_apps (app_utils :app_dependency_order (Apps , true )),
442- rabbit_log :info (" Stopped RabbitMQ application ~n " , []).
444+ rabbit_log :info (" Successfully stopped RabbitMQ and its dependencies ~n " , []).
443445
444446stop_and_halt () ->
445447 try
446448 stop ()
449+ catch Type :Reason ->
450+ rabbit_log :error (" Error trying to stop RabbitMQ: ~p :~p " , [Type , Reason ])
447451 after
448- rabbit_log :info (" Halting Erlang VM~n " , []),
452+ AppsLeft = [ A || {A , _ , _ } <- application :which_applications () ],
453+ rabbit_log :info (
454+ lists :flatten ([" Halting Erlang VM with the following applications:~n " ,
455+ [" ~p~n " || _ <- AppsLeft ]]),
456+ AppsLeft ),
449457 % % Also duplicate this information to stderr, so console where
450458 % % foreground broker was running (or systemd journal) will
451459 % % contain information about graceful termination.
@@ -569,6 +577,10 @@ decrypt_list([Value|Tail], Algo, Acc) ->
569577 decrypt_list (Tail , Algo , [decrypt (Value , Algo )|Acc ]).
570578
571579stop_apps (Apps ) ->
580+ rabbit_log :info (
581+ lists :flatten ([" Stopping RabbitMQ applications and their dependencies in the following order: ~n " ,
582+ [" ~p~n " || _ <- Apps ]]),
583+ lists :reverse (Apps )),
572584 ok = app_utils :stop_applications (
573585 Apps , handle_app_error (error_during_shutdown )),
574586 case lists :member (rabbit , Apps ) of
0 commit comments