SeaDoc: “Load doc content error” on every document, including brand new ones - 404 on /sdoc-server/api/v1/docs/{uuid}/
Environment
-
Seafile Community Edition 13.0.25 (Docker, official
seafile-server.yml+seadoc.yml, no Caddy — using an external HAProxy reverse proxy instead) -
SeaDoc image:
seafileltd/sdoc-server:2.0-latest(reportsserver_version=2.0.9) -
MariaDB 10.11, Redis (no password), single Docker host,
seafile-netbridge network -
Metadata server (
seafile-md-server:13.0-latest) also deployed and confirmed stable/healthy -
Reverse proxy: HAProxy (pfSense package), not the bundled Caddy. All internal ports (8000 for Seafile, 8888 for SeaDoc) are proxied correctly.
Symptom
Opening any .sdoc file (including a file created seconds earlier, on a completely fresh test) shows “Load doc content error” in the browser. Console shows:
XHR GET https://<domain>/sdoc-server/api/v1/docs/<uuid>/
[HTTP/2 404 ~1-2ms]
The response time is consistently 1-2ms, for every single request, every single document UUID, with no exceptions.
What has been verified working
-
HAProxy routing — confirmed correct with curl, matching exactly what the browser sends:
curl -I https://<domain>/sdoc-server/api/v1/docs/<uuid>/ → HTTP/2 403 (Express, correct — no auth token in this manual test)The
403(not 404) on an unauthenticated manual request confirms SeaDoc itself is reachable and responds differently based on auth state. -
seahub_settings.py — contains (added manually, since these were NOT auto-populated despite
ENABLE_SEADOC=truein.envandseadoc.ymlinCOMPOSE_FILE):ENABLE_SEADOC = True SEADOC_SERVER_URL = 'https://<domain>/sdoc-server' SEADOC_PRIVATE_KEY = '<same value as JWT_PRIVATE_KEY>' FILE_CONVERTER_SERVER_URL = 'http://seadoc:80'(Also tried
SEADOC_SERVER_URL = 'http://seadoc:80'— no difference.) -
JWT_PRIVATE_KEY matches exactly between
.env(used byseadoc.yml) andSEADOC_PRIVATE_KEYinseahub_settings.py— verified byte-for-byte viaprintenvinside theseadoccontainer vs.grepinseahub_settings.py. -
System clocks — verified identical (UTC, to the second) across host,
seafilecontainer, andseadoccontainer. JWTexpclaim is far in the future, not expired. -
Docker networking — both containers on the same
seafile-netbridge network.docker exec -it seadoc curl -I http://seafilereturns a normal302redirect to/accounts/login/, confirming SeaDoc can reach Seafile over the internal network. -
The JWT token itself (decoded via jwt.io) contains a well-formed payload:
{ "file_uuid": "<matches the uuid in the failing request>", "filename": "ppp.sdoc", "username": "user@domain.tld", "name": "...", "avatar_url": "...", "permission": "rw", "default_title": "ppp.sdoc", "exp": 1786039348 } -
No POST/create request ever appears in SeaDoc’s own
sdoc-access.log, only failingGETrequests — meaning Seahub never seems to call SeaDoc to initialize/register a new document; only the browser’sGETto fetch content is ever seen, and it always 404s. -
SeaDoc’s own database tables (
sdoc_comment_reply,sdoc_draft,sdoc_notification,sdoc_operation_log,sdoc_revision) exist inseahub_db, but there is no obvious “documents” table — presumably content is meant to be fetched live from Seafile viaSEAHUB_SERVICE_URL(currently defaulthttp://seafile), not stored in SeaDoc’s DB directly. -
Removed the stale Caddy container entirely (was left over from initial deployment, unused since switching to HAProxy) — no change in behavior.
-
Cleared the
__pycache__/seahub_settings.cpython-312.pycfile and did full container restarts after every settings change, to rule out stale bytecode caching.
Question
Given that:
-
routing/auth/network/clocks are all confirmed correct,
-
the 404 response time is suspiciously fast (1-2ms) for what should involve an internal callback to Seafile to fetch file content,
-
no create/init request from Seahub to SeaDoc is ever logged, even for a file created seconds before opening,
what is the expected request flow between Seahub and SeaDoc when a new .sdoc file is opened for the first time? Is there a specific API call Seahub is supposed to make to SeaDoc at file-creation time (or first-open time) that might be silently failing or simply not implemented/triggered in this setup? Any pointers on additional logging to enable, or a compatibility requirement between sdoc-server:2.0.9 and Seafile CE 13.0.25 that we might be missing, would be greatly appreciated.
Happy to provide any further logs/config on request.