It seems like I was missed creating the custom DB on endpoint-2 and then running CREATE SERVER, CREATE USER MAPPING etc. I was running these commands on the postgres DB and thus the failure.