YunoHost-Apps / seafile_ynh

Seafile package for YunoHost
https://seafile.com
MIT License
14 stars 19 forks source link

OnlyOffice and Seafile apps compete over port 8000 #111

Closed devillemereuil closed 10 months ago

devillemereuil commented 10 months ago

When installed together on the same server (although with different subdomains), Seafile and the OnlyOffice DocService compete for the same port. They both use port 8000 by default: https://manual.seafile.com/deploy/using_firewall/ https://helpcenter.onlyoffice.com/fr/installation/docs-community-open-ports.aspx

This means that, when they are co-installed on the same server, one of them is blocking the other (Seafile seems to start first o my server and blocks OnlyOffice). This results in a "BAD REQUEST 400" when using the healthcheck of OnlyOffice https://onlyoffice.jenepi.net/healthcheck/

If Seafile/Seahub are stopped, then it is possible to connect to the Document Server, including from Nextcloud (yes, for some reason, I use both Seafile and Nextcloud).

A possible solution to this conflict is to allow for choosing the port Seafile is using, which would be different from port 8000.

I'm linking the similar bug report for OnlyOffice : https://github.com/YunoHost-Apps/onlyoffice_ynh/issues/114

Josue-T commented 10 months ago

Well, normally since the packaging v2 the app should use only some port which are not already used by any other application. Was OnlyOffice running when you upgraded/installed seafile ?

devillemereuil commented 10 months ago

Huh, interesting! No, I installed Seafile, then OnlyOffice. So, you mean that if OnlyOffice had been installed first (and running I would imagine), then Seafile/Seahub would automatically have picked up another port rather than 8000? If so, that is is a smart feature!

For now, I have fixed things by changing the port used by OnlyOffice (only two files to modify), but I guess if OnlyOffice install can do the same as you (automatically changing port if 8000 is "busy"), it would fix the issue both ways?

Josue-T commented 10 months ago

If you installed only office after seafile, it's probably that onlyoffice didn't check the port before to use it. Since the packaging v2 there are a better management of this. But as onlyoffice still use the packaging v1 it could also be if seafile wasn't working when you installed onlyoffice and onlyoffice didn't see that the port was already used.

Anyway the most important thing is to check that after the uprade the apps won't try again to use the same port. Normally in the app settings you will see the port used by the app.

devillemereuil commented 10 months ago

Thanks a lot for the feedback. It seems the "bug" (or lack of feature, rather?) is on the OnlyOffice side then.

But as onlyoffice still use the packaging v1 it could also be if seafile wasn't working when you installed onlyoffice and onlyoffice didn't see that the port was already used.

I am highly confident that Seafile was running at the time I installed OnlyOffice.

Anyway the most important thing is to check that after the uprade the apps won't try again to use the same port. Normally in the app settings you will see the port used by the app.

Yeah, I'll have to keep this in mind. Fortunately, Seafile starts before OnlyOffice at startup, so it gets to use the port 8000 first (at least, so I understand). This means that OnlyOffice rather than Seafile ends up not working, and Seafile is much more important for my day-to-day use of the server anyway.

Josue-T commented 10 months ago

Normally if you just change the port in onlyoffice app settings (in something like /etc/yunohost/apps/onlyoffice/settings.yml) it should fix the issue after the upgrade.