Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Matrix Synapse will not start after update on Ubuntu 20.04.4 LTS #12702

Closed
atomciti opened this issue May 11, 2022 · 2 comments
Closed

Matrix Synapse will not start after update on Ubuntu 20.04.4 LTS #12702

atomciti opened this issue May 11, 2022 · 2 comments

Comments

@atomciti
Copy link

atomciti commented May 11, 2022

We are running 2 nearly identical Matrix Synapse servers. Just the homeserver addresses and number of rooms are different. One is running flawlessly with the latest version while below is what we're getting on the other one that has been giving us trouble for the past few weeks of updates now. We keep having to rollback the server to a previous version to use it. Please advise.

root@localhost:~# systemctl start matrix-synapse
Job for matrix-synapse.service failed because the control process exited with error code.
See "systemctl status matrix-synapse.service" and "journalctl -xe" for details.
root@localhost:~# journalctl -xe
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit matrix-synapse.service has begun execution.
-- 
-- The job identifier is 10998.
May 10 02:13:26 localhost sshd[3440]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=79.143.177.165  user=sshd
May 10 02:13:27 localhost sshd[3442]: Invalid user ty from 43.154.109.197 port 45020
May 10 02:13:27 localhost sshd[3442]: pam_unix(sshd:auth): check pass; user unknown
May 10 02:13:27 localhost sshd[3442]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=43.154.109.197
May 10 02:13:28 localhost sshd[3440]: Failed password for sshd from 79.143.177.165 port 54094 ssh2
May 10 02:13:29 localhost matrix-synapse[3444]: Traceback (most recent call last):
May 10 02:13:29 localhost matrix-synapse[3444]:   File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
May 10 02:13:29 localhost matrix-synapse[3444]:     return _run_code(code, main_globals, None,
May 10 02:13:29 localhost matrix-synapse[3444]:   File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
May 10 02:13:29 localhost matrix-synapse[3444]:     exec(code, run_globals)
May 10 02:13:29 localhost matrix-synapse[3444]:   File "/opt/venvs/matrix-synapse/lib/python3.8/site-packages/synapse/app/homeserver.py", line 460, in <module>
May 10 02:13:29 localhost matrix-synapse[3444]:     main()
May 10 02:13:29 localhost matrix-synapse[3444]:   File "/opt/venvs/matrix-synapse/lib/python3.8/site-packages/synapse/app/homeserver.py", line 450, in main
May 10 02:13:29 localhost matrix-synapse[3444]:     hs = setup(sys.argv[1:])
May 10 02:13:29 localhost matrix-synapse[3444]:   File "/opt/venvs/matrix-synapse/lib/python3.8/site-packages/synapse/app/homeserver.py", line 364, in setup
May 10 02:13:29 localhost matrix-synapse[3444]:     raise ConfigError(
May 10 02:13:29 localhost matrix-synapse[3444]: synapse.config._base.ConfigError: You have enabled open registration without any verification. This is a known vector for >
May 10 02:13:29 localhost sshd[3440]: Received disconnect from 79.143.177.165 port 54094:11: Bye Bye [preauth]
May 10 02:13:29 localhost sshd[3440]: Disconnected from authenticating user sshd 79.143.177.165 port 54094 [preauth]
May 10 02:13:29 localhost sshd[3442]: Failed password for invalid user ty from 43.154.109.197 port 45020 ssh2
May 10 02:13:29 localhost systemd[1]: matrix-synapse.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- An ExecStart= process belonging to unit matrix-synapse.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
May 10 02:13:29 localhost systemd[1]: matrix-synapse.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit matrix-synapse.service has entered the 'failed' state with result 'exit-code'.
May 10 02:13:29 localhost systemd[1]: Failed to start Synapse Matrix homeserver.
-- Subject: A start job for unit matrix-synapse.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit matrix-synapse.service has finished with a failure.
-- 
-- The job identifier is 10998 and the job result is failed.
lines 2669-2716/2716 (END)


----------------------------------------------------------------------------------------------------------------------------------------------


root@localhost:~# journalctl -xe
-- 
-- The job identifier is 5.
May 10 02:19:48 localhost systemd[816]: Reached target Basic System.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit UNIT has finished successfully.
-- 
-- The job identifier is 2.
May 10 02:19:48 localhost systemd[816]: Reached target Main User Target.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit UNIT has finished successfully.
-- 
-- The job identifier is 1.
May 10 02:19:48 localhost systemd[816]: Startup finished in 65ms.
-- Subject: User manager start-up is now complete
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The user manager instance for user 0 has been started. All services queued
-- for starting have been started. Note that other services might still be starting
-- up or be started at any later time.
-- 
-- Startup of the manager took 65771 microseconds.
May 10 02:19:48 localhost systemd[1]: Started User Manager for UID 0.
-- Subject: A start job for unit [email protected] has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit [email protected] has finished successfully.
-- 
-- The job identifier is 223.
May 10 02:19:48 localhost systemd[1]: Started Session 1 of user root.
-- Subject: A start job for unit session-1.scope has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit session-1.scope has finished successfully.
-- 
-- The job identifier is 295.
May 10 02:19:49 localhost sshd[801]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=71.237.19.33  user=root
May 10 02:19:51 localhost sshd[801]: Failed password for root from 71.237.19.33 port 33786 ssh2
May 10 02:19:53 localhost sshd[801]: Received disconnect from 71.237.19.33 port 33786:11: Bye Bye [preauth]
May 10 02:19:53 localhost sshd[801]: Disconnected from authenticating user root 71.237.19.33 port 33786 [preauth]
lines 2796-2843/2843 (END)
@DMRobertson
Copy link
Contributor

The key is this line:

May 10 02:13:29 localhost matrix-synapse[3444]: synapse.config._base.ConfigError: You have enabled open registration without any verification. This is a known vector for

It continues off to the right-hand side because it is a long log line. Use journalctl -u matrix-synapse and use the arrow keys to view the message in full.

For completeness, the error message is

raise ConfigError(
"You have enabled open registration without any verification. This is a known vector for "
"spam and abuse. If you would like to allow public registration, please consider adding email, "
"captcha, or token-based verification. Otherwise this check can be removed by setting the "
"`enable_registration_without_verification` config option to `true`."
)

introduced in #12091.

@DMRobertson
Copy link
Contributor

TL;DR you either to change the config to either

  • include verification for registration, or
  • explicitly confirm that you are happy with unverified registration available to anyone who can contact the homeserver.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants