validate state.serverPort