Repository navigation
Description
In test-API-wopi-posix, all OnlyOffice scenarios of apiCollaboration/checkFileInfo.feature sometimes fail together (:214, :398, :399, :400, :625, :641, :860, sometimes :946), while the Collabora and fakeOffice scenarios of the same run pass. A restart usually passes.
They fail at the same step: the app-open request returns 500.
POST /app/open?app_name=OnlyOffice&file_id=...
500 Internal Server Error
{"code": "SERVER_ERROR", "message": "Error contacting the requested application, please use a different one or try again later"}
Where
5 times in the last 300 pipelines, back to 2026-11-05:
| Pipeline | Date | Source |
|---|---|---|
| 5002 | 2026-11-05 | PR #3908 |
| 5252 | 2026-11-13 | PR #3974 (passed on restart: 5300) |
| 5253 | 2026-11-13 | stable-9.1 |
| 5307 | 2026-11-13 | PR #3973 (passed on restart: 5320) |
| 5310 | 2026-11-13 | PR #3992 (passed on restart: 5333) |
Cause
A race at startup, between the OnlyOffice container and the collaboration service:
- The entrypoint of the
onlyoffice/documentserverimage starts docservice, and then regenerates the fonts (GENERATE_FONTS, true by default). That restarts docservice, 25 to 40 s after it first started (ds:docservice: stopped/startedin the log of theonlyofficestep). wait-for-webofficesalready got a 200 fromhttps://onlyoffice/hosting/discoveryfrom the first instance, and moves on.wopi-onlyoffice(the collaboration service) fetches the discovery once at startup. In all failed runs, that fetch fell into the restart and got a 502 from OnlyOffice's nginx. The service then registers without any mimetypes, and fetches again only after 30 s (COLLABORATION_CS3API_APP_REGISTRATION_INTERVAL).health-check-wopipasses anyway:/readyzof the collaboration service doesn't check whether it has the app URLs.- The OnlyOffice scenarios run in those 30 s and fail. The later ones pass.
The times of the discovery fetch and of the restart of docservice:
| Pipeline | Discovery fetch (wopi-onlyoffice) |
docservice listening again |
|---|---|---|
| 5252 | 07:56:41, 502 | 07:56:41.9 |
| 5253 | 08:07:20, 502 | 08:07:21.1 |
| 5307 | 17:40:29, 502 | 17:40:29.5 |
| 5310 | 22:11:13, 502 | 22:11:13.9 |
| 5300 (passed) | 17:24:54, 200 | 17:24:58.0 |
The race hits often because the font generation and the startup of the OpenCloud server both take about 30 s, and both get slower together on a busy agent.
Fix
- CI: start OnlyOffice with
GENERATE_FONTS=false. The image comes with the fonts already generated, so docservice no longer restarts (and OnlyOffice is ready sooner): fix(ci): skip the font regeneration that restarts OnlyOffice #3996. - Product: the collaboration service should recover sooner from a failed discovery fetch, and
/readyzshould say so: collaboration: opening documents fails for up to 30 s after a failed WOPI discovery fetch, while /readyz reports ready #3995.
AI assistance: Claude Code (claude-opus-5-5) analysed the CI logs and wrote the first draft of this issue.
Activity
fix(ci): skip the font regeneration that restarts OnlyOffice (openclo…