nextcloud / nextcloud/serverinfo
[Bug]: Serverinfo reports a stopped replica when no MariaDB replication is configured
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 130
- Forks
- 64
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 49
Description
⚠️ This issue respects the following points: ⚠️
- This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
- This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
- I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
- I agree to follow Nextcloud's Code of Conduct.
- I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.
Bug description
The Serverinfo → Database health check reports a replication warning on a MariaDB server where no replication is configured.
The warning displayed is:
A configured replica is not running.
with the justification:
Slave_running is reporting OFF.
This appears to be a false positive. On a MariaDB server without replication, Slave_running = OFF is expected.
There is no replica configuration in Nextcloud's config.php or in occ config:list system, and MariaDB reports no configured replica (SHOW REPLICA STATUS and SHOW ALL REPLICAS STATUS both return Empty set).
The warning appears to originate from apps/serverinfo/lib/Database/RuleSet/Mysql.php, where the Slave_lag rule tests Slave_running == 0 without apparently checking whether replication is actually configured.
Steps to reproduce
- Run Nextcloud Server 35.0.0 with MariaDB 11.8.9.
- Use a single MariaDB server with no replication configured.
- Ensure MariaDB binary logging/replication is not configured (
log_bin = OFF). - Open Administration → Serverinfo → Database.
- Check the Replication section.
The MariaDB server reports:
SHOW REPLICA STATUS\G
Empty set
and:
SHOW ALL REPLICAS STATUS\G
Empty set
Slave_running reports OFF, as expected for a server without replication.
Expected behavior
If no database replication is configured, the Serverinfo health check should not report:
A configured replica is not running.
The replication check should either be skipped or considered not applicable when no replica is configured.
If replication is configured and the replica is not running, the warning should still be reported.
Nextcloud Server version
35
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.5
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apps/serverinfo/lib/Database/RuleSet/Mysql.php and inspect the Slave_lag rule and how it obtains MariaDB replication status. Reproduce with SHOW REPLICA STATUS and SHOW ALL REPLICAS STATUS returning Empty set; done when an unconfigured server produces no warning while a configured, stopped replica still does.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mariadb, php
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100