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.
commit synchronize
failed to copy file '//var/etc/stp_context.id' to 're0
This article gives the reason for the error and a couple of workarounds to avoid it.
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 .
/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
One of the reasons for the command to fail is when TCP sockets in the kernel get stuck in a TIME_WAIT state.
TIME_WAIT
There are two workarounds for resolving this issue:
request chassis routing-engine master switch
# commit synchronize
If above workaround doesn't help clear the issue, then use the following:
request system reboot
Note: Make sure that you are logged in to the backup RE.
This issue was fixed via PR1027898 - "commit synchronize" might fail due to kernel socket stuck .