This KB Describes RE network-service mode mismatch between configuration and kernel setting alarm due to missing script files and how to resolve the same.
In this scenario RE0 is master and RE1 is backup
root@LAB_RE0> show chassis alarms no-forwarding
1 alarms currently active
Alarm time Class Description
2023-07-10 05:51:10 UTC Major RE1 network-service mode mismatch between configuration and kernel setting
On RE0:
chassis {
.
network-services enhanced-ip;
}
On RE1:
root@LAB_RE0> show chassis network-services
Network Services Mode: Enhanced-IP
Network service mode in Kernel:
root@LAB_RE0> request routing-engine execute command "sysctl net.netsvc" net.netsvc: 2
2 in above output means Enhanced IP Mode. On RE0 kernel and config is matching the Mode, Enhanced IP.
On RE1 (Backup RE):
Network service mode in CLI:root@LAB_RE1> show chassis network-services >>> RE1
root@LAB_RE1> request routing-engine execute command "sysctl net.netsvc" net.netsvc: 0 >>>>> IP mode
0 in above output means IP Mode in Kernel. This means on RE1 network services mode on kernel and config is mismatched.
Refer to KB: KB70169 [juniper.net] for additional details:
https://supportportal.juniper.net/s/article/What-does-network-service-mode-mismatch-between-configuration-and-kernel-mean
Console logs from RE1:
invalid filename: /var/db/scripts/event//TEST_1.slax
</message>
</xnm:error>
<xnm:error xmlns="http://xml.juniper.net/xn
FreeBSD/amd64 (Amnesiac) (ttyu0)
<xnm:error xmlns="http://xml.juniper.net/xnm/1.1/xnm" xmlns:xnm="http://xml.juniper.net/xnm/1.1/xnm">
<source-daemon>
commit-script
</source-daemon>
<message>
invalid filename: /var/db/scripts/event//TEST_2.slax
</message>i
mgd: error: configuration check-out failed
Warning: Commit failed, activating partial configuration.
Warning: Edit the router configuration to fix these errors.
@ 1688968232 [2023-07-10 05:50:32 UTC] mgd done
event-options {
generate-event {
0600-CST time-of-day "12:00:00 +0000";
1800-CST time-of-day "12:00:00 +0000";
EVERY-2H time-interval 7200;
policy TEST_1{
events [ 0600-CST 1800-CST ];
then {
event-script TEST_1.slax;
policy TEST_2 {
events EVERY-2H;
event-script TEST_2.slax;
event-script {
file TEST_1.slax;
file TEST_2.slax;
Solution 1:
request system scripts synchronize all
Solution 2:
Or we can enable the below knob in event-option config:
set event-options event-script optional
optional knob will allow commit to succeed if the script is missing
By default, optional is not set. Event scripts are required to be accessible during commit operations.
Refer Document: https://www.juniper.net/documentation/us/en/software/junos/automation-scripting/topics/ref/statement/optional-edit-event-options.html
2023-07-12: initial version