Description

This article describes the commit warning seen related to netconf in MC-LAG set-up

Symptoms

Below is log message / warning message is seen while performing commit on the switches.

error: netconf: could not read hello
error: did not receive hello packet from server
error: Setting up sessions for peer: 'peer1' failed
warning: Cannot connect to remote peers, ignoring it
commit complete

 

Solution

  • There is something called peers-synchronize Knob in MC-LAG that is usually configured on both Local and Peer device in MC-LAG setup.
  • What does this peer-sync do: You can enable the peers-synchronize statement at the [edit system commit] hierarchy to synchronize the configurations and commits across the devices by default. NETCONF over SSH provides a secure connection between the devices, and Secure Copy Protocol (SCP) copies the configurations securely between them.

  • The peers-synchronize statement uses the hostname or IP address, username, and password for the devices you configured in the peers statement. With the peers-synchronize statement enabled, you can simply issue the commit command to synchronize the configuration from one device to another. For example, if you configured the peers statement on the local device, and want to synchronize the configuration with the remote device, you can simply issue the commit command on the local device.

  • The local (or requesting) device on which you enable the peers-synchronize statement or issue the commit peers-synchronize command copies and loads its configuration to the remote (or responding) device. Each device then performs a syntax check on the configuration file being committed. If no errors are found, the configuration is activated and becomes the current operational configuration on all devices. The commits are propagated using a RPC.

  • When Peer sync is configured in MC-LAG setup, we might encounter an issue where whiling commiting the config, we can get the below warning message:

error: netconf: could not read hello
error: did not receive hello packet from server
error: Setting up sessions for peer: 'peer1' failed
warning: Cannot connect to remote peers, ignoring it
commit complete


This error is seen in two instances:
 

  • If the peer device is unreachable from local device

  • Even if Peer device is reachable from local device yet the commit warning is seen.

 

Note: In this KB we will be focusing on even if Peer device is reachable from local device yet the commit warning is seen then what are the troubleshooting steps to be taken:

 

  1. Delete the peer sync config and check if that resolves the commit error. Post delete if the commit warning does not appear then re-configure the peer-sync again and check if issue persists.

  2. Even after removing the config the issue persists then we can try generating the new SSH keys. Even though you are able to SSH into the peer devices but when a peer sync is configured the SSH keys pairs exchanged between peers will be different. To generate the new SSH keys, please use the below document:

https://supportportal.juniper.net/s/article/Junos-How-to-regenerate-SSH-host-keys-on-Junos-devices-in-shell?language=en_US

 

If issue still persists, then open case with JTAC for further investigation.

Modification History

2024-05-21: Article Created.
2024-05-22: Article validated.

Related Information

Reference document:

https://www.juniper.net/documentation/us/en/software/junos/mc-lag/topics/topic-map/mc-lag-feature-additional-concepts.html#id-troubleshooting-remote-device-connections