add validation for port values to server (fix #3227)
Merge pull request #3240 from jlipps/master

add validation for port values to server (fix #3227)