Operating System - HP-UX
1824178 Members
3771 Online
109669 Solutions
New Discussion юеВ

remshd: rresvport: Address already in use

 
SOLVED
Go to solution
John Adonis
Occasional Advisor

remshd: rresvport: Address already in use

Hi,

I'm getting the following error while doing remsh to my system. But rlogin is working. This error is intermittent


remshd[19925]: rresvport: Address already in use
remshd[19989]: rresvport: Address already in use
remshd[20089]: rresvport: Address already in use
remshd[20292]: rresvport: Address already in use


Please help.

Thanks!
John
9 REPLIES 9
Graham Cameron_1
Honored Contributor

Re: remshd: rresvport: Address already in use

rlogin uses a different service so it may well work independently.

rresvport is a system call.
From the manpage:

The rresvport() function creates a socket and binds it to a reserved
port.

Obviously the port remshd is trying to use is already in use, but your error message doesn't report the port no.
Anything in /var/adm/syslog/syslog.log ?

-- Graham.

Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
John Adonis
Occasional Advisor

Re: remshd: rresvport: Address already in use

Hi Graham,

The above message is from syslog.log file only. I can give you related information from /etc/services

exec 512/tcp # remote execution, passwd required
login 513/tcp # remote login
who 513/udp whod # remote who and uptime
shell 514/tcp cmd # remote command, no passwd used

Thanks!
John
RAC_1
Honored Contributor

Re: remshd: rresvport: Address already in use

remsh uses port 514. Get a tool called lsof and check that port is listening.

lsof -i tcp:514

Also you can with netstat -a|grep 514
There is no substitute to HARDWORK
Graham Cameron_1
Honored Contributor

Re: remshd: rresvport: Address already in use

I don't think the problem is with 514, as from your message, remshd is actually getting started.

When I remsh a command on a remote system, the remote remshd seems to use ports 1014 and 1015. Maybe these are in use.

Try "netstat -a|grep -e 1014 -e 1015" on your remote system.

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
T G Manikandan
Honored Contributor
Solution

Re: remshd: rresvport: Address already in use

Umapathy S
Honored Contributor

Re: remshd: rresvport: Address already in use

John,
This problem usally occurs in the other side. remshd uses rresvport to open a stream for remote command usually below 1024. The stream is not able to bind to a remote socket which is in use.

Check the target machine with netstat for the ports being used. Normally this will go off as the ports get cleared.

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
rick jones
Honored Contributor

Re: remshd: rresvport: Address already in use

iirc, rresvport will only allocate from a range of about 512 port numbers from 1023 on down. if there is significant "churn" on connections using those ports, all 512 can be "in use" and in things like TIME_WAIT.

more generally, if one does connections at a rate greater than:

width_of_port_space_used/length_of_time_wait

one will start running into problems. In the specific case of HP-UX, "length_of_time_wait" is 60 seconds, so if you try to do more than 512/60 or 8.5 remsh per second on a sustained basis, you will run into problems.

Also, if you try to have more than 512 remsh outstanding at any one time, you will run into problems.

The "fix" is to use something other than remsh. I have to look into it further, but it may be the case that ssh does not require the use of reserved ports for the "client" side. Of course, it may have a slightly higher computational overhead than remsh... :)
there is no rest for the wicked yet the virtuous have no pillows
Edgar Canaan
Occasional Advisor

Re: remshd: rresvport: Address already in use

Is this still the only "fix" for this issue...not to use remsh?

Rick??

In a world without walls there is no need for gates and windows...
rick jones
Honored Contributor

Re: remshd: rresvport: Address already in use

Pretty much - remsh requires reserved ports, and there are only so many of them. So, you either use some mechanism that doesn't use reserved ports, or you get more bang out of each use of your reserved port(s) - running remote scripts rather than individual remote commands for example.
there is no rest for the wicked yet the virtuous have no pillows