Red Hat Bugzilla – Bug 133412
rshd fails after multiple successive access attempts
Last modified: 2007-11-30 17:07:04 EST
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: 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):
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.
'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.
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).
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.
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/
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.