]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Improve instructions for debugging failing service
authorSebastiaan van Stijn <github@gone.nl>
Wed, 23 Dec 2020 22:51:04 +0000 (23:51 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 24 Dec 2020 05:36:55 +0000 (14:36 +0900)
In situations where a service fails to start, systemd suggests the user to
use "journalctl -xe" to get details about the failure. While running this
command does provide some additional details, most of the information is
similar to what was already printed when the service fails.

often the actual reason for the failure can be found in the logs of the
service that fails to start.

This patch updates the wording to suggest using "-u" to view the service
logs instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
src/shared/bus-wait-for-jobs.c

index b2a9e031ce749be127e44ba869c36acdf579cbae..005294c33a82259e280cd8b39a0d9ea92f49fb39 100644 (file)
@@ -200,22 +200,24 @@ static void log_job_error_with_service_result(const char* service, const char *r
 
                 if (i < ELEMENTSOF(explanations)) {
                         log_error("Job for %s failed because %s.\n"
-                                  "See \"%s status %s\" and \"%s -xe\" for details.\n",
+                                  "See \"%s status %s\" and \"%s -xeu %s\" for details.\n",
                                   service,
                                   explanations[i].explanation,
                                   systemctl,
                                   service_shell_quoted ?: "<service>",
-                                  journalctl);
+                                  journalctl,
+                                  service_shell_quoted ?: "<service>");
                         goto finish;
                 }
         }
 
         log_error("Job for %s failed.\n"
-                  "See \"%s status %s\" and \"%s -xe\" for details.\n",
+                  "See \"%s status %s\" and \"%s -xeu %s\" for details.\n",
                   service,
                   systemctl,
                   service_shell_quoted ?: "<service>",
-                  journalctl);
+                  journalctl,
+                  service_shell_quoted ?: "<service>");
 
 finish:
         /* For some results maybe additional explanation is required */