1822866 Members
3925 Online
109645 Solutions
New Discussion юеВ

rcmd: Lost connection

 
Yun Loong
Occasional Advisor

rcmd: Lost connection

Hi,

I'm new in HP-UX, I want to RCP a file to another server but was eventually failed and "rcmd: Lost connection" appears. i have check my .rhosts and /etc/hosts, as well as the inetd.conf ... rlogin and remsh is allowed... everything seems to be working fine...
Anything i have miss out? Thank you

Regards,
Yun Loong
12 REPLIES 12
RAC_1
Honored Contributor

Re: rcmd: Lost connection

man rcmd. that means the remote hosts did not
accept socket request. How many remsh/rlogins commands you run on this host??
There is no substitute to HARDWORK
Chandan Kumar_1
Honored Contributor

Re: rcmd: Lost connection

Hi,

http://docs.hp.com/en/B2355-90695/rcmd.3N.html

All the best!
Chandan
Learn. Share. Inspire.
Frank de Vries
Respected Contributor

Re: rcmd: Lost connection

It seems your setup is ok, otherwise I would
have expected something like;
'Permission denied'

The fact you are getting lost connection,
appears to be at socket level.

Lost connection
The program attempted to read from the socket and failed. This means the socket connection with the remote host was lost.

Check if ou don't have a file system full
by any chance ? or some other network or system constraint at the moment.


Look before you leap
Arunvijai_4
Honored Contributor

Re: rcmd: Lost connection

Hi,

Check /var/adm/syslog/syslog.log for any messages related to rcp.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: rcmd: Lost connection

Can you try in reverse manner? rcp from the second server to first server. What are you getting now?

Is there any message in syslog.log file? What is there in /var/adm/inetd.sec file with r* commands related?

-Muthu
Easy to suggest when don't know about the problem!
Yun Loong
Occasional Advisor

Re: rcmd: Lost connection

Hi,

Thanks for the fast response. i can see that it was the socket problem even before i post this message but what should i do. everything seems to go correctly even for the remote side.

No full filesystem, no network or system constraint, the script was correct, and still the error message come out.

RAC: is it inetd.conf to check for how many remsh and rlogin? if yes, then there only show
kshell stream tcp nowait root /usr/lbin/remshd remshd -K
klogin stream tcp nowait root /usr/lbin/rlogind rlogind -K

Thanks again...
Yun Loong
RAC_1
Honored Contributor

Re: rcmd: Lost connection

You may run into socket problems, if there are many simulantanouse "r" commands running. How many you are running??
There is no substitute to HARDWORK
Yun Loong
Occasional Advisor

Re: rcmd: Lost connection

Hi,

Arunvijai: FYI, there's nothing related to rcp in the syslog.

Muthu: the rever manner works fine from the other side.. but still 1st server cannot rcp to the other one.
the inetd.sec has nothing with r* command. just normal ftp, login, shell and stuff. by the way, i also check whether both server set each IPs.

RAC: i dun think there are many "r" command running if my checking steps is correct.

Anyway... thanks guys... hope the problem can be solve very soon... i'm trying my best..

Regards,
Yun Loong

RAC_1
Honored Contributor

Re: rcmd: Lost connection

To check how many simultanous "r" commands are running do
ps -ef|egrep -i 'remsh|rlogin|rexec|rsh'
There is no substitute to HARDWORK
Arunvijai_4
Honored Contributor

Re: rcmd: Lost connection

Hello,

Are both Server A and Server B belong to HP-UX ? Just a thought i should check. Also, reading this thread could be helpful.

http://gridengine.sunsource.net/issues/show_bug.cgi?id=1406

It says "This is a security feature of hpux's rlogind. The rlogind verify if the incoming
port is the same as the port for "login" in /etc/services."

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
RAC_1
Honored Contributor

Re: rcmd: Lost connection

Also post
netstat -an | grep -i 513
netstat -an | grep -i 514
There is no substitute to HARDWORK
Sameer_Nirmal
Honored Contributor

Re: rcmd: Lost connection

Hi,

Since the local host is using secure environment ( Kerberos )for "remshd", the authentication at the remote host should be done using same environment.
On remote host check for "inetd.conf" file for 'remshd" entry and /etc/services.

I believe the remote host authentication is being failed causing rcmd: Lost connection" error.