retrieving of node_ip can fail, when the script is already executed although the network initialization has not finished yet.
doing this in a loop prevents this