# 'gem up' hangs

**URL:** <https://www.ruby-forum.com/t/gem-up-hangs/97157>\
**Category:** Ruby\
**Created:** [July 5, 2006, 10:47am UTC](https://www.ruby-forum.com/t/gem-up-hangs/97157 "2006-07-05T10:47:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gyoung-Yoon\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c77e96/32.png) [@Gyoung-Yoon\_N](https://www.ruby-forum.com/u/Gyoung-Yoon_N)\
**Post date:** [July 5, 2006, 10:47am UTC](https://www.ruby-forum.com/t/gem-up-hangs/97157/1 "2006-07-05T10:47:23Z")

</div>

Hi,

I found ‘gem up’ command hangs on one of the machines.

$ sudo gem up  
Updating installed gems…

# (hangs here…)

ERROR: While executing gem … (Errno::ETIMEDOUT)  
Connection timed out - connect(2)

Strange, so I tried with strace(1):

$ sudo strace gem up  
connect(3, {sa\_family=AF\_INET, sin\_port=htons(80),  
sin\_addr=inet\_addr(“66.92.150.242”)}, 16) = -1 EINPROGRESS (Operation  
now in progress)  
select(4, NULL, [3], [3], NULL) = 1 (out [3]) # hangs here…  
connect(3, {sa\_family=AF\_INET, sin\_port=htons(80),  
sin\_addr=inet\_addr(“66.92.150.242”)}, 16) = -1 ETIMEDOUT (Connection  
timed out)  
fcntl64(3, F\_SETFL, O\_RDWR) = 0  
close(3) = 0  
rt\_sigprocmask(SIG\_SETMASK, [], NULL, 8) = 0  
write(2, "ERROR: While executing gem … "…, 88ERROR: While  
executing gem … (Errno::ETIMEDOUT)  
Connection timed out - connect(2)) = 88  
write(2, “\n”, 1  
) = 1  
rt\_sigprocmask(SIG\_SETMASK, [], NULL, 8) = 0  
rt\_sigaction(SIGINT, {SIG\_DFL}, {0x80b04dc, [],  
SA\_RESTORER|SA\_RESTART, 0x55f8c8}, 8) = 0  
munmap(0xb7ec3000, 4096) = 0  
exit\_group(1) = ?

What’s this 66.92.150.242?  
It seems this host has no internet connection.  
select(2)'s hanging on seems another problem.

Any thoughts?

---

<div class="post-metadata">

**Author:** ![Gyoung-Yoon\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c77e96/32.png) [@Gyoung-Yoon\_N](https://www.ruby-forum.com/u/Gyoung-Yoon_N)\
**Post date:** [July 5, 2006, 1:41pm UTC](https://www.ruby-forum.com/t/gem-up-hangs/97157/2 "2006-07-05T13:41:55Z")

</div>

On 7/5/06, Gyoung-Yoon N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> fcntl64(3, F\_SETFL, O\_RDWR) = 0  
> munmap(0xb7ec3000, 4096) = 0  
> [http://nohmad.sub-port.net](http://nohmad.sub-port.net)

This problem was caused by nscd(name server cache daemon).  
However gem should be able to handle such network error.
