check port is valid
Merge pull request #2501 from dotcloud/2480-check_port-fix

check port is valid