hostname is resolve by DNS, may be that required DNS configured to work beginInvoke(), is used the run without blocking the script