Description

This document explains why the commit error message "Cannot stat: No such file or directory" is seen when performing commit or commit check and how to resolve the same

 

 

Symptoms

When we try any commit operation, we get below error message on RE0:

root@Lab_RE0# commit check re0: configuration check succeeds tar: jet/ser6er: Cannot stat: No such file or directory tar: extension: Cannot stat: No such file or directory tar: Error exit delayed from previous errors. re1: configuration check succeeds
root@Lab_RE0# commit check 
re0: 
configuration check succeeds
tar: jet/ser6er: Cannot stat: No such file or directory
tar: extension: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
re1: 
configuration check succeeds
Customer tried reset of RE0 as well, but that did not resolve the issue.

Checked commit logs and observed below the sequence of error:

user@juniper# commit check | display detail 
2024-01-11 04:41:16.476813 -06: Obtaining lock for commit
2024-01-11 04:41:16.692877 -06: obtaining db lock on  re1
2024-01-11 04:41:17.6186 -06: re-revision: re1-1704969134-797, other-re-revision: re1-1704969134-797(0)
2024-01-11 04:41:17.6342 -06: UI extensions feature is not configured
2024-01-11 04:41:17.6398 -06: UI change-notification feature is not configured
2024-01-11 04:41:17.6591 -06: Started running translation script
2024-01-11 04:41:17.103002 -06: No delta input for translation
2024-01-11 04:41:17.103087 -06: Finished running translation script
2024-01-11 04:41:17.103246 -06: start loading commit script changes
2024-01-11 04:41:17.103302 -06: no commit script changes
2024-01-11 04:41:17.103366 -06: no transient commit script changes
2024-01-11 04:41:17.103407 -06: finished loading commit script changes
2024-01-11 04:41:17.103464 -06: No translation output from the scripts
2024-01-11 04:41:17.103509 -06: Preparing Fast-diff post translation load
2024-01-11 04:41:17.199864 -06: building groups inheritance path proportional in candidate db
2024-01-11 04:41:17.199966 -06: finished groups inheritance path
2024-01-11 04:41:17.200011 -06: copying juniper.db to juniper.data+
2024-01-11 04:41:17.210757 -06: finished copying juniper.db to juniper.data+
2024-01-11 04:41:17.210916 -06: exporting juniper.conf
2024-01-11 04:41:17.258415 -06: expanding interface-ranges
2024-01-11 04:41:17.258488 -06: finished expanding interface-ranges
2024-01-11 04:41:17.258539 -06: setup foreign files
2024-01-11 04:41:17.266028 -06: propagating foreign files
2024-01-11 04:41:17.519864 -06: constraints passed in mustd - not checking constraints in propagation
2024-01-11 04:41:17.528190 -06: complete foreign files
2024-01-11 04:41:17.540855 -06: start ffp propagate
2024-01-11 04:41:17.572710 -06: executing 'ffp propagate'
2024-01-11 04:41:17.574446 -06: Processing shared library: libcosd-ffp.so
2024-01-11 04:41:17.592850 -06: Processing shared library: libdfwd-ffp.so
2024-01-11 04:41:17.611102 -06: Processing shared library: libdprofdb-ffp.so
2024-01-11 04:41:17.652250 -06: Processing shared library: liboiu-ffp.so
2024-01-11 04:41:17.670953 -06: Processing shared library: librrdl-ffp.so
2024-01-11 04:41:17.672951 -06: Processing shared library: libvsyncd-ffp.so
2024-01-11 04:41:17.673722 -06: Processing shared library: libntf-agent-ffp.so
2024-01-11 04:41:17.674797 -06: Processing shared library: libmtx-filetab-ffp.so
2024-01-11 04:41:17.688098 -06: Processing shared library: libmaster-password-ffp.so
2024-01-11 04:41:17.688769 -06: Processing shared library: libcommon-filetab-ffp.so
2024-01-11 04:41:17.690367 -06: Processing shared library: libcosd-ffp.so
2024-01-11 04:41:17.708914 -06: Processing shared library: libdfwd-ffp.so
2024-01-11 04:41:17.727211 -06: Processing shared library: libdprofdb-ffp.so
2024-01-11 04:41:17.776856 -06: Processing shared library: liboiu-ffp.so
2024-01-11 04:41:17.796494 -06: Processing shared library: librrdl-ffp.so
2024-01-11 04:41:17.798772 -06: Processing shared library: libvsyncd-ffp.so
2024-01-11 04:41:17.799603 -06: Processing shared library: libntf-agent-ffp.so
2024-01-11 04:41:17.800448 -06: Processing shared library: libmtx-filetab-ffp.so
2024-01-11 04:41:17.801732 -06: Processing shared library: libmaster-password-ffp.so
2024-01-11 04:41:17.802433 -06: Processing shared library: libcommon-filetab-ffp.so
2024-01-11 04:41:17.804763 -06: finish ffp propagate
2024-01-11 04:41:17.804913 -06: daemons checking new configuration
configuration check succeeds
tar: jet/ser6er: Cannot stat: No such file or directory
tar: extension: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
2024-01-11 04:41:17.818528 -06: started pushing scripts to re1
2024-01-11 04:41:18.59894 -06: finished pushing scripts to re1
2024-01-11 04:41:18.160301 -06: sending pull-configuration rpc to re1
2024-01-11 04:41:18.160373 -06: filename /var/run/db/juniper.db-patch.sync, size 0
2024-01-11 04:41:18.261088 -06: pull-configuration success. URL: /var/tmp/juniper.db-patch.sync
2024-01-11 04:41:18.261151 -06: sending load-patch rpc to re1
2024-01-11 04:41:18.361953 -06: remote load-configuration success on re1
2024-01-11 04:41:18.362008 -06: sending file-delete rpc to re1
2024-01-11 04:41:18.461988 -06: syncing commit db revision to  re1 
2024-01-11 04:41:18.462049 -06: asking re1 to commit check
 

Solution

  • We can see the commit is placing error just after config is verified and before script is checked:
configuration check succeeds
tar: jet/ser6er: Cannot stat: No such file or directory
tar: extension: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
2024-01-11 04:41:17.818528 -06: started pushing scripts to re1 
2024-01-11 04:41:18.59894 -06: finished pushing scripts to re1

 

  • Check the script directory on RE0:
root@Lab_RE0:/var/db/scripts/jet # ls -l
total 12
drwxrws--x  9 root  wheel  512 Nov 23  2020 .,
lrwxr-xr-x  1 root  wheel   62 Sep 27 01:29 nc_grpc_app.pyc -> /packages/mnt/junos-runtime/var/db/scripts/jet/nc_grpc_app.pyc
lrwxr-xr-x  1 root  wheel   66 Sep 27 01:29 nc_grpc_app_lib.pyc -> /packages/mnt/junos-runtime/var/db/scripts/jet/nc_grpc_app_lib.pyc
drwxrws--x  2 root  wheel  512 Nov 23  2020 ser6er?extension
drwxrws--x  2 root  wheel  512 Nov 23  2020 server-extension
> We can see a corrupted Directory present: ser6er?extension
> Remove the directory:

root@Lab_RE0:/var/db/scripts/jet # rm -rf ser6er?extension
> Once the corrupt directory is removed, we can see the commit is not showing errors anymore.
root@Lab_RE0# commit check 
re0: 
configuration check succeeds
re1: 
configuration check succeeds
 

 

Modification History

2024-01-15 : Article Created