Description

This article explains ​the meaning of 'can't get stderr port: Can't assign requested address' error on Junos devices, and clarifies that the error can be safely ignored since it does not have any known service impact.

 

Symptoms

Junos RE Logs:

Jan 26 20:21:16  rshd[17463]: can't get stderr port: Can't assign requested address
Jan 26 20:21:16  inetd[18600]: /usr/libexec/rshd[17463]: exited, status 1
Jan 26 20:21:16  rshd[17464]: can't get stderr port: Can't assign requested address
Jan 26 20:21:16  inetd[18600]: /usr/libexec/rshd[17464]: exited, status 1

Jan 26 20:21:46  rshd[17911]: can't get stderr port: Can't assign requested address
Jan 26 20:21:46  inetd[18600]: /usr/libexec/rshd[17911]: exited, status 1
Jan 26 20:21:46  rshd[17912]: can't get stderr port: Can't assign requested address
Jan 26 20:21:46  inetd[18600]: /usr/libexec/rshd[17912]: exited, status 1

Jan 26 20:22:16  rshd[18304]: can't get stderr port: Can't assign requested address
Jan 26 20:22:16  inetd[18600]: /usr/libexec/rshd[18304]: exited, status 1
Jan 26 20:22:16  rshd[18305]: can't get stderr port: Can't assign requested address
Jan 26 20:22:16  inetd[18600]: /usr/libexec/rshd[18305]: exited, status 1

Solution

The remote shell (rsh) is a command-line computer program that can execute shell commands as another user, and on another computer across a computer network. The remote system to which rsh connects runs the rsh daemon (rshd). rsh executes commands on the host. rsh copies its standard input to the remote command, the standard output of the remote command to its standard output, and the standard error of the remote command to its standard error. Interrupt, quit, and terminate signals are propagated to the remote command; rsh normally terminates when the remote command does. 

These messages are generated when several rsh operations are running concurrently and the server cannot use the appropriate port for connection. When an rsh operation is attempted, the server tries to establish a connection to the client for stderr. The server uses a port in the range 512–1023 on the host for it. If these ports are not available at the time, the above error will be triggered. It could be that all the ports on the server are in use at the time.

This could be prevented if users run rsh operations at intervals or try to perform the action again. In case this does not help, a device reboot during a maintenance window can also be considered.

Since the error should not impact anything running on Junos OS, this can be safely ignored.

To filter the error message, the below configuration may be added:

# show system syslog
user * {
    any emergency;
}
 file messages {
    any notice;
    match "!(.*stderr port.*)";

For additional reference, see KB9382 - [Junos Platform] Example - How to prevent certain syslog messages from being written to the log file [juniper.net] .

Modification History

2020-07-08: Article reviewed for accuracy. No changes made. Article is correct and complete.