You must configure the the OVSDB manager table on the physical switch to connect the hardware gateway to the NSX Controller.
The Controller passively listens to the connection attempt from the physical switch. Therefore, the hardware gateway must use the OVSDB manager table to initiate connection.
Prerequisites
Controllers must be deployed before any hardware gateway instances are configured. If controllers are not deployed first, the error message "Failed to do the Operation on the Controller" is shown.