Can not connect to mongodb locally: Server selection timed out after 30000 ms

issue solved, but the problem was little bit different for our case

i have created a new mongodb machine from an image of old machine, so the replicaset host ip address still the same for the old machine, so i should change it to the new machine ip

image