mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-02-08 02:06:44 +00:00
8fb2719a68
I am not sure what would be the motive to put the instruction for debugging Synapse on maintenance-and-troubleshooting.md above all, but now that we have the common section for an instruction about troubleshooting, it should make sense to move the instruction to the documentation page for configuring Synapse. Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
54 lines
2.1 KiB
Markdown
54 lines
2.1 KiB
Markdown
# Maintenance and Troubleshooting
|
|
|
|
## How to see the current status of your services
|
|
|
|
You can check the status of your services by using `systemctl status`. Example:
|
|
|
|
```sh
|
|
sudo systemctl status matrix-synapse
|
|
|
|
● matrix-synapse.service - Synapse server
|
|
Loaded: loaded (/etc/systemd/system/matrix-synapse.service; enabled; vendor preset: enabled)
|
|
Active: active (running) since Sun 2024-01-14 09:13:06 UTC; 1h 31min ago
|
|
```
|
|
|
|
Docker containers that the playbook configures are supervised by [systemd](https://wiki.archlinux.org/title/Systemd) and their logs are configured to go to [systemd-journald](https://wiki.archlinux.org/title/Systemd/Journal).
|
|
|
|
To prevent double-logging, Docker logging is disabled by explicitly passing `--log-driver=none` to all containers. Due to this, you **cannot** view logs using `docker logs`.
|
|
|
|
To view systemd-journald logs using [journalctl](https://man.archlinux.org/man/journalctl.1), run a command like this:
|
|
|
|
```sh
|
|
sudo journalctl -fu matrix-synapse
|
|
```
|
|
|
|
## How to check if services work
|
|
|
|
The playbook can perform a check to ensure that you've configured things correctly and that services are running.
|
|
|
|
To perform the check, run:
|
|
|
|
```sh
|
|
ansible-playbook -i inventory/hosts setup.yml --tags=self-check
|
|
```
|
|
|
|
The shortcut command with `just` program is also available: `just run-tags self-check`
|
|
|
|
If it's all green, everything is probably running correctly.
|
|
|
|
Besides this self-check, you can also check whether your server federates with the Matrix network by using the [Federation Tester](https://federationtester.matrix.org/) against your base domain (`example.com`), not the `matrix.example.com` subdomain.
|
|
|
|
## Remove unused Docker data
|
|
|
|
You can free some disk space from Docker, see [docker system prune](https://docs.docker.com/engine/reference/commandline/system_prune/) for more information.
|
|
|
|
```sh
|
|
ansible-playbook -i inventory/hosts setup.yml --tags=run-docker-prune
|
|
```
|
|
|
|
The shortcut command with `just` program is also available: `just run-tags run-docker-prune`
|
|
|
|
## Postgres
|
|
|
|
See the dedicated [PostgreSQL Maintenance](maintenance-postgres.md) documentation page.
|