Elasticsearch upgrade deletes onlyoffice-communityserver onlyoffice-xmppserver packages in Ubuntu 24.04

I have installed Onlyoffice Workspace using this guide

The installation was performed using RPM/DEB packages, and my operating system is Ubuntu Server 24.04. No more changes where made after installation.

The issue arises when I attempt to upgrade all the packages. Running sudo apt upgrade works fine, but the Elasticsearch package does not upgrade. The command output is as follows:
The following packages have been kept back:

  • elasticsearch*

When I tried running sudo apt-get dist-upgrade, I got the following output:
The following packages will be REMOVED:

  • onlyoffice-communityserver onlyoffice-xmppserver*
    The following packages will be upgraded:
  • elasticsearch*

This issue first occurred during automatic updates overnight, where I noticed that some folders were disappearing.

Is this a known bug, or should I simply stick to the current version of Elasticsearch?

Hello @ServerRSO,
Please note that Workspace update cannot be performed using apt, it is incorrect way of updating.
Update should be done according to the above-mentioned guide using the following script: bash workspace-install.sh -u true

My issue is not going that way.

I am not trying to update onlyoffice, I am updating all my system. But when I run an update that needs to be done using sudo apt-get dist-upgrade it tries to update elasticsearch to a new version and this version creates a conflict with onlyoffice-communityserver & onlyoffice-xmppserver packages, so those are removed and onlyoffice stops working.

I need to run sometimes in my server sudo apt-get dist-upgrade for some patches.

Sorry for initial misunderstanding. You should stick to the version of Elasticsearch which is included in the original installation, i.e. you should roll back to the original version of Elasticsearch. It is the only way to resolve the issue after running sudo apt-get dist-upgrade which leads to dependencies version changes

Okay, but then every time I need to upgrade my OS, I would have to roll back to the previous version of Elasticsearch and reinstall the OnlyOffice packages that are being removed. This doesn’t seem logical, considering I run the update command periodically.

I could mark the Elasticsearch package to be skipped when running sudo apt-get dist-upgrade. However, this would mean I would be stuck with an older version. If OnlyOffice releases a new version and I update mine using workspace-install.sh, would it install a new Elasticsearch package if the version is required? If that’s the case, it might solve my problem, but I don’t want to be stuck on an outdated version of a package.

I understand, but unfortunately, there is currently no applicable workaround.
Do you mean that you expect newer version of Elasticsearch to be included on new future version of Workspace? It is not guaranteed

Alright, so I will apt-mark hold elasticsearch, and the upgrade will proceed without failing or removing other packages.

Thank you very much for your time!

You can try pinning the package to a version. note your version may be different.

in /etc/apt/preferences.d create a file called elasticsearch and add this.

Package: elasticsearch
Pin: version 7.16.3
Pin-Priority: 1000

1 Like

@ronm Thank you for sharing the idea. This is indeed a good approach. We will also consider adding the lock on elasticsearch package version on our side in the future