FTP Upload Binding Error

I’m using the FTP Upload binding on openHAB 2.5.0.
When I try to change the default listening port of the binding (2121 to 21), I receive the following error:

2020-04-11 10:14:07.752 [INFO ] [oad.internal.FtpUploadHandlerFactory] - Stopping FTP server
2020-04-11 10:14:07.772 [INFO ] [oad.internal.FtpUploadHandlerFactory] - Stopping FTP server
2020-04-11 10:14:07.775 [INFO ] [oad.internal.FtpUploadHandlerFactory] - Starting FTP server, port=21, idleTimeout=60
2020-04-11 10:14:07.792 [WARN ] [oad.internal.FtpUploadHandlerFactory] - FTP server starting failed, reason: Failed to bind to address, check configuration

Could you please help.


Where are you making the changes to the port? In the logs it shows only 0’s for the IP. :thinking:

I did it via the paper UI -> Configuration -> Bindings -> FTP Upload Binding.
The error appears when I choose 21 or 22 as a new port. On the other hand, when I choose another port for example 2222 or another one it works without any issue.
Thank you,

Is there a firewall setting that has ports other than 21 and 22 blocked?

You didn’t say which OS you running, but in Linux, you need root privileges to be able to bind TCP/UDP port below 1024.

To my knowledge, there is no Firewall installed.
I did a basic installation of my raspberry and I only installed the prerequisites of openhab.

Check your router setting. :upside_down_face:

Thank you Pauli,
pi@server3:/etc $ sudo uname -a
Linux server3 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

I just tried to forward port 21 to 2121 and it is working. It can be a workaround.
Have you any other suggestion please.

Have you any other suggestion please.

You could try to give CAP_NET_BIND_SERVICE capabilities to app via setcap, but I guess you need to give them to java.