Fixed run of sockets, added timeout and retry logic, added cluster2, error handling