The Port numbers are divided into three ranges:
Well Known Ports (0 to 1023)
Registered Ports (1024 to 49151)
Dynamic and/or Private Ports (49152 to65535).
The Well Known Ports and the Registered Ports SHOULD NOT be used without IANA registration (the registration procedure is defined in [RFC4340], Section 19.9.).
When using numbers in the range 0 to 49151 other functions could be non-functional caused by a port-conflict.
The Dynamic / Private Ports can be used without problems.
More information can be found i.e. on www.iana.org/assignments/port-numbers (external link).
When you encounter problems with the used port, please check your firewall settings.