Description

NTP is configured with routing instance mgmt_junos, and the error is seen - "xntpd[12972]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized

NTP does not sync and the clock is not updated.

Symptoms

NTP is configured with routing instance mgmt_junos, and the following error is seen.


kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized

Mar 14 04:03:17 user-srx xntpd[12972]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized


Upon checking further, the following logs are seen.

Mar 14 03:21:59 user-srx xntpd[12972]: x.x.x.x local addr 0.0.0.0 -> <null> Mar 14 03:21:59 user-srx xntpd[12972]: x.x.x.x local addr 0.0.0.0 -> <null> Mar 14 03:21:59 user-srx xntpd[12972]: x.x.x.x local addr 0.0.0.0 -> <null> Mar 14 03:21:59 user-srx xntpd[12972]: x.x.x.x local addr 0.0.0.0 -> <null>

Solution

The configuration sample is as follows:

set system ntp server x.x.x.x prefer

set system ntp server x.x.x.x routing-instance mgmt_junos

set system ntp server y.y.y.y routing-instance mgmt_junos

set system ntp server z.z.z.z routing-instance mgmt_junos


We will need to add a logical/physical interface with an IP address in default routing instance in order for the NTP process to work properly.

 

Refer to https://www.juniper.net/documentation/us/en/software/junos/user-access/topics/ref/statement/ntp-edit-system.html

"When configuring the NTP service in the management VRF (

mgmt_junos

), you must configure at least one IP address on a physical or logical interface within the default routing instance and ensure that this interface is up in order for the NTP service to work with the mgmt_junos VRF.

"

Modification History

2025-04-19 : Article Created