Bug 287145 - www/onlyoffice-documentserver: Fails to start with rabbitmq 4.1.0
Summary: www/onlyoffice-documentserver: Fails to start with rabbitmq 4.1.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-29 15:02 UTC by fsbruva
Modified: 2025-06-02 12:18 UTC (History)
2 users (show)

See Also:


Attachments
Patch to bump a few dependencies (7.37 KB, patch)
2025-05-29 23:27 UTC, fsbruva
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fsbruva 2025-05-29 15:02:24 UTC
A breaking change in rabbitmq 4.1.0 requires the Nod.js amqplib to be higher than contained in onlyoffice. This bug has been reported upstream, and has been patched upstream. I am working on backporting the fix.

Symptoms include:
1. Nextcloud reporting that something is wrong with the documentserver
2. Errors in the ds-converter.service and/or ds-docservice.service logs:
"Apr 16 02:41:53 cloud sh[1035]: [2025-04-16T02:41:53.863] [ERROR] [localhost] [docId] [userId] nodeJS - [AMQP] Error: read ECONNRESET
Apr 16 02:41:53 cloud sh[1035]:     at TCP.onStreamRead (node:internal/stream_base_commons:217:20)"

See:
https://github.com/rabbitmq/rabbitmq-server/releases/tag/v4.1.0
https://github.com/ONLYOFFICE/DocumentServer/issues/3204
https://github.com/ONLYOFFICE/server/commit/f2f0e05af9392bfa26d3e2039b708c8b4d78eecd
Comment 1 fsbruva 2025-05-29 23:27:10 UTC
Created attachment 260797 [details]
Patch to bump a few dependencies

@Mikael: Here is my proposed patch. Confirmed to build clean, and runs with rabbitmq 4.1.0.

Updated npm cache can be downloaded here: https://cloud.compasses.xyz/s/Zrp8fXzTbYKtPRJ
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-06-02 09:04:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e832a322cd03d0c57cc32a99b9295febce072b19

commit e832a322cd03d0c57cc32a99b9295febce072b19
Author:     Matt Kempe <fsbruva@yahoo.com>
AuthorDate: 2025-05-29 23:10:34 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2025-06-02 09:03:08 +0000

    www/onlyoffice-documentserver: Bump amqplib and node22 versions

    Upgrade node to 22.15.1
    Upgrade port to use yao-pkg 6.5.0
    Backport upstream fix of bumping amqplib to 0.10.7, due to net/rabbitmq upgrade

    PR:             287145

 www/onlyoffice-documentserver/Makefile                       | 12 ++++++------
 www/onlyoffice-documentserver/distinfo                       | 10 +++++-----
 ...=> extra-patch-pkg-fetch_patches_node.v22.15.1.cpp.patch} |  6 +++---
 .../files/patch-server_Common_package.json (new)             | 11 +++++++++++
 .../files/patch-web-apps_build_package.json                  |  9 ---------
 5 files changed, 25 insertions(+), 23 deletions(-)
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2025-06-02 09:08:03 UTC
Thanks!
Comment 4 fsbruva 2025-06-02 12:02:04 UTC
The patch i submitted had the source filename for the npm cache in Makefile be determined by the portrevisuon. So the cache filename needs to be changed the _1 to a _2, and then distinfo updated.
Comment 5 fsbruva 2025-06-02 12:09:16 UTC
And now I realize that a variable source file name that depends on portrevision is a bad idea, as evidenced by the port revision getting bumped to trigger rebuild shouldn't break the build.

A better option is to just revise Makefile to hardcode the source filename.

I was worried that anyone with an out of date ports tree would have a problem trying to build if we didn't put some kind of identifier on the cache filename.
Comment 6 Mikael Urankar freebsd_committer freebsd_triage 2025-06-02 12:13:45 UTC
(In reply to fsbruva from comment #5)
I've renamed the distfile on freefall for the time being.
Comment 7 commit-hook freebsd_committer freebsd_triage 2025-06-02 12:18:13 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9852b060df42fd6641c51625a3b139ca8f8fc33b

commit 9852b060df42fd6641c51625a3b139ca8f8fc33b
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2025-06-02 12:16:15 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2025-06-02 12:18:04 +0000

    www/onlyoffice-documentserver: Fix distinfo

    PR:             287145

 www/onlyoffice-documentserver/distinfo | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)