Seafile: fix Memcached host and document database connection failures - #354
Merged
Merged
Conversation
MEMCACHED_HOST pointed at the container name app-seafile-memcached, which only exists while SERVICE is "seafile". With any other SERVICE value the name did not resolve and Seahub logged a Memcached error on every request. - Use the Compose service name "memcached", which does not depend on SERVICE. - README: add a troubleshooting section for a Seafile container that cannot reach the database. Seafile waits without logging anything, so describe the two causes found while reproducing #320: TS_ACCEPT_DNS=true replaces Docker DNS, and database passwords changed after the first start.
crypt0rr
approved these changes
Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #320.
What changed
.env:MEMCACHED_HOSTnow uses the Compose service namememcached. The previous value,app-seafile-memcached, is a container name that only exists whileSERVICEisseafile. With any otherSERVICEvalue the name did not resolve and Seahub loggedpylibmc.ServerDownon every request.README.md: new troubleshooting section for a Seafile container that cannot reach the database.Why
Issue #320 reports that Seafile cannot connect to the database and guesses that the name does not resolve. The report has no logs or configuration, so I reproduced it.
The stack on
mainconnects to the database with the default settings. The settings that matter are the same as in the original Seafile commit, so the defaults were not broken when the issue was opened.Two situations give the reported symptom. In both, Seafile waits for the database without logging anything, the container turns
unhealthy, and the web interface answers502:TS_ACCEPT_DNS=trueis uncommented. Tailscale replaces Docker DNS, sodbno longer resolves. When the issue was opened, the comment on that line read "Uncomment when using MagicDNS". All services: clarify when to enable TS_ACCEPT_DNS #351 already replaced it with a warning..envchanged after the first start. MariaDB keeps the passwords from its first start and logsAccess denied for user.Testing
Tested on Docker 29.8.2 with a test node in a Tailnet,
SERVICE=seafile-test-320:mainunchanged: all four containers healthy, the databases were created,https://<node>.<tailnet>.ts.net/api2/ping/answered"pong". Seahub logged Memcached errors forapp-seafile-memcached.getandsetcommands.TS_ACCEPT_DNS=true:getent hosts dbprinted nothing and Seafile answered502.dbresolved, MariaDB loggedAccess denied, and Seafile answered502.docker compose config --quiet,rumdl check, andgit diff --checkpass.