Matrix Troubleshooting: Difference between revisions
Initial |
m Sac moved page Matrix-troubleshooting to Matrix Troubleshooting |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
= Federation and Common Tasks for Matrix Server = | |||
This page addresses common tasks and issues with Matrix federation and server management, providing solutions and resources for troubleshooting and maintenance. | |||
== Federation Issues == | == Federation Issues == | ||
Matrix federation enables servers to communicate with each other. Use the following tools and resources for diagnosing federation problems: | |||
* [https://federationtester.matrix.org Check Federation] | |||
* [https://spec.matrix.org/v1.6/server-server-api/#server-discovery Matrix Federation Documentation] | |||
== Common Tasks == | == Common Tasks == | ||
This section outlines routine tasks for managing and troubleshooting a Matrix server. | |||
=== Reconfigure and Send Ansible Restart === | |||
=== Reconfigure and | Reconfigures and restarts the Matrix server using Ansible. Ensure the middle server has SSH keys configured for accessing the Matrix server. | ||
==== Primary ==== | ==== Primary ==== | ||
<pre> | |||
# Assumes command is executed from within the matrix-docker-ansible-deploy/ directory | |||
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start | |||
</pre> | |||
==== Alternative ==== | ==== Alternative ==== | ||
<pre> | |||
# Manually via SSH, assumes Tailscale is being used. Update absolute paths as necessary. | |||
ssh root@irregularchat-matrix "ansible-playbook -i /root/Git/matrix-docker-ansible-deploy/inventory/hosts /root/Git/matrix-docker-ansible-deploy/setup.yml --tags=setup-all,start &" | |||
</pre> | |||
=== Updating Ansible Server === | === Updating Ansible Server === | ||
Updates the Ansible server with the latest roles and configuration. | |||
< | <pre> | ||
# From within the repository | |||
sudo make roles | sudo make roles | ||
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start</ | ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start | ||
</pre> | |||
=== Checking Logs === | === Checking Logs === | ||
Check the logs of the Matrix Synapse service for troubleshooting. | |||
<pre> | |||
systemctl status matrix-synapse.service | |||
journalctl -fu matrix-synapse.service | |||
</pre> | |||
=== Check Matrix Federation === | === Check Matrix Federation === | ||
Verify federation by ensuring ports are open and listening. | |||
<pre> | |||
sudo netstat -tuln | grep -E "8449|81" | |||
</pre> | |||
=== Restarting Services === | === Restarting Services === | ||
Restart the Matrix Synapse service: | |||
< | <pre> | ||
systemctl restart matrix-synapse.service | |||
</pre> | |||
Alternatively, use Ansible to send a restart command. | |||
== Issues and Answers == | == Issues and Answers == | ||
This section provides solutions to common Matrix server issues. | |||
=== Issue: SSO Issue – Can’t Set Up Recovery Key Due to No Password === | |||
=== Issue: SSO Issue | |||
==== Solution: Disabling Password Configuration ==== | ==== Solution: Disabling Password Configuration ==== | ||
Matrix Synapse’s password configuration can be disabled to allow SSO accounts to configure and store recovery keys without a password. Update the configuration as follows: | |||
<pre> | |||
matrix_synapse_password_config_enabled: false | |||
</pre> | |||
This allows SSO users to manage encryption keys and security phrases independently. | |||
=== Create Bot Access Tokens with SSO === | |||
To create bot access tokens using SSO: | |||
# Log in through the web interface. | |||
# Navigate to **Settings > About > Access Token** and copy the token. | |||
# Exit the browser page WITHOUT logging out. | |||
=== Issue: Can’t Create Bot Access Tokens When Passwords Are Disabled === | |||
<s>When passwords are disabled, bots cannot create access tokens or log in with access tokens.</s> | |||
<s>To resolve this temporarily, update the configuration:</s> | |||
< | <pre> | ||
matrix_synapse_password_config_enabled: true | |||
</pre> | |||
<s> | <s>Set the configuration to `true`, obtain the access token, and log in to the bot. Then, change the configuration back to `false`.</s> | ||
== Categories == | |||
[[Category:Matrix]] | |||
[[Category:Server Management]] | |||
[[Category:Ansible]] | |||
[[Category:SSO]] | |||
[[Category:Troubleshooting]] | |||
[[Category:Networking]] |