mongo db-Either all host names in a replica set configuration must be localhost references, or none must be; found 1 out of 2

while adding secondary member in replica set, i get following error:
"Either all host names in a replica set configuration must be localhost references, or none must be; found 1 out of 2"
my first machine configuration is:enter image description here

enter image description here

enter image description here

second node config:
enter image description here