Try up to 20 random ports if necessary

cc @jjallaire