Description

Customers may occasionally find that the commit synchronize command has failed with the " failed to copy file '//var/etc/stp_context.id' to 're0 '" error on MX routers.

This article gives the reason for the error and a couple of workarounds to avoid it.

 

Symptoms

Occasionally, the commit synchronize command might fail with the following error messages:

user@router# commit synchronize
re1:
configuration check succeeds
error: failed to copy file '//var/etc/stp_context.id' to 're0'
 

The following error log is seen under /var/log/messages .

%DAEMON-3-LIBJNX_REPLICATE_RCP_ERROR: rcp -l -Ji //var/etc/stp_context.id+ re0://var/etc/stp_context.id+ : rcmd: socket: Can't assign requested address rcmd: socket: Can't assign requested address

 

Solution

One of the reasons for the command to fail is when TCP sockets in the kernel get stuck in a TIME_WAIT state.

 

There are two workarounds for resolving this issue:

  1. Perform the Routing Engine (RE) switchover.
request chassis routing-engine master switch
  1. Commit the new configuration.
# commit synchronize

If above workaround doesn't help clear the issue, then use the following:

  1. Reboot the backup RE.
request system reboot 

Note: Make sure that you are logged in to the backup RE.

  1. Commit the configuration after rebooting of the backup RE is complete.
# commit synchronize 

This issue was fixed via PR1027898 - "commit synchronize" might fail due to kernel socket stuck .