Description

The remote procedure call (RPC) equivalent for the request routing-engine login <> command is not working as expected on MX Series routers.

This article explains how to resolve the issue.

 

Symptoms

Note: The RPC request usage description can be found at Junos XML API Explorer - Operational Tags .

To get the XML RPC equivalent in Junos OS:

> request routing-engine login re1 | display xml rpc
<rpc-reply xmlns:junos="<a href="http://xml.juniper.net/junos/18.2X75/junos%22%3E" target="_blank">http://xml.juniper.net/junos/18.2X75/junos">
    <rpc>
        <request-routing-engine-login>
                <re1/>
        
    

Example

Below is an example showing how to use netconf to connect the primary Routing Engine (RE) and run the operational RPC command:

$ ssh [email protected] -s netconf
...​
<rpc>
        <request-routing-engine-login>
                <re1/>
        


<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/15.1F6/junos">
<run-command>
<command>/usr/bin/rlogin
<argument>-Jk
<argument>-T
<argument>re1

 

Based on the output above, the RPC request <request-routing-engine-login> completed successfully. However, when you log in to the backup RE1 and verify the currently logged in users, you notice that user " user " is missing from the list.

$ ssh [email protected]
Password:
--- JUNOS 15.1F6.7 built 2016-06-18 09:39:42 UTC

root@r1_re1% who
root     ttyp0    Feb  5 02:48 (172.26.133.196)

 

Solution

The workaround to overcome this limitation consists of establishing a netconf session to the management IP address of the backup RE and executing the RPC commands to list the login session from the other RE:

    <rpc>
        <get-system-users-information>
                <no-resolve/>
        
         
        <cli>
            <banner>
        
    

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/12.3R3/junos">
<system-users-information xmlns="http://xml.juniper.net/junos/12.3R3/junos">
<uptime-information>
<date-time junos:seconds="1549411525">
4:05PM

<up-time junos:seconds="2413727">
27 days, 22:28

<active-user-count junos:format="0 users">
0

<load-average-1>
0.00

<load-average-5>
0.00

<load-average-15>
0.00

<user-table>




]]>]]>

 

Modification History

2020-02-24: minor non-technical edits.