Elasticsearch cluster error

Hi Team,
I created this two node cluster only where one is master node and the other is data node,
but i am facing this error "failed to join master node", my both nodes are up but are not connected in anyway.

sharing configuration and log file excerpts would be really helpful. Along with the elasticsearch version and the java version that you are running.