Waiting if service is not available.
waiting for service if connecting fails.