Hello, the issue can be fixed by: * Forcing start-stop-daemon to create the PID file. Synapse seems to fail to do this, see https://github.com/matrix-org/synapse/issues/9066 * removing the "--exec" match from the "stop" action
Attached you find a patch fixing these issues. Afterwards matrix-synapse starts and stops successfully. Thank you! Cheers, Lars PS: additionally the patch contains "mkdir" for the uploads directory. This is unrelated. Please excuse me for not opening a separate bug report for this trivial issue. Thanks!
--- matrix-synapse.orig 2021-01-10 17:19:42.921852639 +0100 +++ matrix-synapse 2021-01-10 17:21:23.356979220 +0100 @@ -102,9 +89,10 @@ touch $PIDFILE chown $USER:nogroup $PIDFILE chown $USER:nogroup $SHAREDIR/media/ + mkdir -p "$SHAREDIR/uploads" chown $USER:nogroup $SHAREDIR/uploads/ - start-stop-daemon --start --background --pidfile $PIDFILE --chuid $USER \ + start-stop-daemon --start --background --make-pidfile --pidfile $PIDFILE --chuid $USER \ --exec $PYTHON -- -m "synapse.app.homeserver" $CONFIGS || return 2 return 0 @@ -126,7 +114,7 @@ return $RETVAL fi - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --user $USER --exec $PYTHON + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --user $USER RETVAL="$?" [ "$RETVAL" = 2 ] && return 2