YunoHost-Apps / seafile_ynh

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

No check for duplicate ports at installation #53

Closed rhetenor closed 4 years ago

rhetenor commented 4 years ago

Hello,

While installing seafile on yunohost after installing multiple other applications I encountered the problem that WebDAV always failed with

502 - Bad Gateway

I could figure out that both /seafhttp and /seafdav where bound to port 8083 in my case. The issue was fixed with changing one of those ports.

Investigating the issue I found the following lines in the install script:

https://github.com/YunoHost-Apps/seafile_ynh/blob/16d5f0588f93fe2be5a33929390dc044c54bada2/scripts/install#L44-L48

There are no further checks if the ports are duplicates which was happening in my case.

Sinceynh_find_port cannot prevent this on its own I would suggest temporarily binding the found port via nc or any other way and releasing it again after all ports are found. Otherwise at least increase the range between fileserver_port and webdav_port.

Thanks for your work!

Josue-T commented 4 years ago

Fixed by b537e0f