Master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster

Issue got resolved. The problem was the setup in which i was working on had 9200 and 9300 ports closed. After opening it to traffic it got resolved.
Thank you.