rsh problem: lost prompt

rsh problem: lost prompt

Post by Juan Lorenzan » Fri, 12 Feb 1999 04:00:00



I have a slight problem.  I run an rsh command to execute a program on
another node.  When I run the "date" command I get a prompt back.
However,  when I run a program that I created I do NOT get the prompt
back on the local machine where I sent the rsh command from.

Some background information:
We were trying to startup oracle by issuing an rsh command to the shell
script that starts oracle.  However, oracle would sometimes come up and
sometimes it would not fully come up, in particular the listener.  So,
after numerous attempts by using the -n and -t with a timeout, we still
could not get it to work.  So we decided to write a small program that
executes a startup script and then exits.  Unfortunately, this does not
work and we are stuck.  The local machine is running FreeBSD 2.2.2 and
the target machine is SCO OpenServer 5.0.4.

Interesting observation:
The rshd daemon that runs on SCO continues to run until 1) I kill it or
2) I stop oracle.  Hence, the only way to get the prompt back to the
local machine is to kill the rshd on SCO or stop oracle, but that
defeats what I was trying to do.  I wanted to start oracle. :-)

Please help.

Regards,

--
Juan Lorenzana
AG Communication Systems
Phoenix, AZ

602-582-7442

 
 
 

rsh problem: lost prompt

Post by Barry Margoli » Sat, 13 Feb 1999 04:00:00




Quote:>I have a slight problem.  I run an rsh command to execute a program on
>another node.  When I run the "date" command I get a prompt back.
>However,  when I run a program that I created I do NOT get the prompt
>back on the local machine where I sent the rsh command from.

Make sure that the remove command disconnects all the standard descriptors
from the socket, e.g.

rsh othernode 'command </dev/null >&/dev/null &'

Rsh doesn't exit until the connection closes, and that won't happen as long
as any process at the other end has the socket open.

--

GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Don't bother cc'ing followups to me.

 
 
 

rsh problem: lost prompt

Post by Ken Pizzi » Sat, 13 Feb 1999 04:00:00



>I have a slight problem.  I run an rsh command to execute a program on
>another node.  When I run the "date" command I get a prompt back.
>However,  when I run a program that I created I do NOT get the prompt
>back on the local machine where I sent the rsh command from.

Okay, basic question: do you know that the program on the remote
node is actually exiting?  If it is a script, try adding an
"echo done" just before it exits, just to see that it is indeed
getting where you think it is.

Another thought: does the program (or one of the sub-programs that
it might spawm) attempt to read from standard input?  If so, is
your rsh command-line such that an EOF is eventually seen on the
remote end (i.e., if you do not redirect and do not use the -n
option to rsh then you will need to type CTRL-D (or whatever you
set with "stty eof XXX") before the remote end sees EOF and
finishes its processing).

HTH,
                --Ken Pizzini

 
 
 

1. TCP Wrapper / rsh problem (rsh hangs)

I just set up TCP Wrapper 7.1 on a SunOS 4.1.3 server.  We have all of our
client workstations in a netgroup called 'alltrust', and want to allow only
those workstations to rsh the server.  I have tcpd setup correctly (I believe)
in inetd.conf, and the access control files as:

/etc/hosts.allow

/etc/hosts.deny
        in.rshd: ALL: DENY

(I did a kill -HUP on inetd on the server when I changed inetd.conf).  When
I tested the wrapper out, I used a client in alltrust and a client not in
alltrust.  Luckily, the wrapper logs the successes and failures of rsh'ing to
the server correctly.  However, when a client not in alltrust tries to rsh to
the server (i.e. rsh server id), rsh just hangs.  I tried a test with telnet
and everything went fine.  Does anyone have an idea of what might be the
problem?

    A second, but minor, problem is that if I implement /etc/hosts.allow
as

it allows anyone to rsh to the server, even clients not in alltrust.  Any
clue as to what might be causing this?

                                --John

2. ***** How do I create a swap partition?

3. Removing password prompt for rsh and rexec

4. Permissions problem

5. rsh works on the ksh prompt but not in a shell script

6. 2.5.39: SMP, pre-empt, ide-scsi 'sleeping function called from illegal context' during boot

7. rsh never returns to prompt - SIGTTIN

8. Why would starting httpd hang? [Apache]

9. prompted password when I rsh locally

10. Delay in rsh returning to prompt?

11. lost rsh

12. rsh worried about lost keyboard!

13. lost data in RSH/TCP