summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-05-27 10:35:06 +0100
committerGitHub <noreply@github.com>2021-05-27 10:35:06 +0100
commitdcbfec919ba27da970849cae73c69cacd78432d5 (patch)
treefa41a8a712511824e1c4e938eb6d42cb083a0472
parentRemove redundant, unmaintained `convert_server_keys` script. (#10055) (diff)
downloadsynapse-dcbfec919ba27da970849cae73c69cacd78432d5.tar.xz
Improve the error message printed by synctl when synapse fails to start. (#10059)
-rw-r--r--changelog.d/10059.misc1
-rwxr-xr-xsynctl12
2 files changed, 9 insertions, 4 deletions
diff --git a/changelog.d/10059.misc b/changelog.d/10059.misc
new file mode 100644
index 0000000000..ca6e0e8a5a
--- /dev/null
+++ b/changelog.d/10059.misc
@@ -0,0 +1 @@
+Improve the error message printed by synctl when synapse fails to start.
diff --git a/synctl b/synctl
index 6ce19918d2..90559ded62 100755
--- a/synctl
+++ b/synctl
@@ -97,11 +97,15 @@ def start(pidfile: str, app: str, config_files: Iterable[str], daemonize: bool)
         write("started %s(%s)" % (app, ",".join(config_files)), colour=GREEN)
         return True
     except subprocess.CalledProcessError as e:
-        write(
-            "error starting %s(%s) (exit code: %d); see above for logs"
-            % (app, ",".join(config_files), e.returncode),
-            colour=RED,
+        err = "%s(%s) failed to start (exit code: %d). Check the Synapse logfile" % (
+            app,
+            ",".join(config_files),
+            e.returncode,
         )
+        if daemonize:
+            err += ", or run synctl with --no-daemonize"
+        err += "."
+        write(err, colour=RED, stream=sys.stderr)
         return False