Bug 133412 - (IT_67292) rshd fails after multiple successive access attempts
rshd fails after multiple successive access attempts
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rsh (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2004-09-23 16:13 EDT by David Roessler
Modified: 2007-11-30 17:07 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-03-17 12:35:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Roessler 2004-09-23 16:13:07 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET 
CLR 1.0.3705; .NET CLR 1.1.4322)

Description of problem:
After several successful rsh connections to linux (from windows) the 
rsh command hangs. The following is reported in /var/log/messages:

Sep 20 07:36:51 bocaqarh1 rshd[12292]: can't get stderr port: 
Resource temporarily unavailable

The apparent result is that the windows rsh command never completes 
(due to failed response from rshd) and the command hangs.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.configure rshd for access from a windows machine.
2.submit several rsh commands from windows. It does not appear to 
matter how much work is actually performed by the submitted command.
3.continue command submission until rsh command hangs. Note: once the 
message appears in /var/log/messages the rsh command can be dismissed 
by depressing enter.

Actual Results:  Eventually, the error message is presented 
in /var/log/messages and the rsh command on windows does not complete

Expected Results:  rshd should always satisfy the remote request.

Additional info:
Comment 1 Karel Zak 2004-11-29 08:23:02 EST
'Resource temporarily unavailable' is not a bug. It's result of
rresvport() (errno EAGAIN). 

Your client hang up, because it's waiting for server stderr
connection. This cannot be fixed too. It's bad client<->server
protocol design and we cannot change it if we want to be compatible
with all others rsh implementation in the others OS/distributions.
Sorry of this, maybe you can use ssh that is really better.
Comment 2 David Roessler 2004-12-15 08:42:59 EST
I get that. The issue is why is the server failing to provide the 
stderr connection? Our protocol is currently working with every other 
rshd implementation we have tried (including IBM's uss). 
Comment 3 Karel Zak 2004-12-15 09:22:54 EST
The problem is that all ports at server are probably used. You can try
"netstat -n --inet" on server and very probably you will see a lot of
"TIME_WAIT" connections. There is already one simular report #129226.

Comment 4 Karel Zak 2005-01-03 05:50:33 EST
Durig the chrismas time I wrote simple program 'rsh-fifo' that is
useful for users who need something like

   while (( 1 == 1 )); do rsh <node> date; done

It uses one persistent connection, so it prevent problems with
TIME_WAIT and limited number of privileged ports.

For more information: http://people.redhat.com/kzak/rsh/rsh-fifo/
Comment 7 David Roessler 2005-03-17 12:35:21 EST
We have implemented a local workaround that simply delays rsh attempts against 
linux targets. This seems to give sufficient time for stderr to become 
available. Perhaps this is not optimal, but it has let us proceed.

Note You need to log in before you can comment on or make changes to this bug.