Replace hard coded secondary port number with a template variable

The port number should not be hard coded.