This article describes the issue of the following message being generated, when committing the configuration:
error: /config/juniper.conf+: was not properly closed: No such file or directory error: commit failed: commit to file failed during export to /config/juniper.conf+
This error message is generated when trying to commit a configuration. After this error message is generated, the configuration will not be committed and you will not be able to proceed further with the configuration.
At times, a file is generated in the /config directory, which may cause the above error message. Also, this error message is generated if the partition is corrupted.
At first, if you are not sure what is causing this issue, perform the following procedure:
Run the following command (it is recommended to take a backup of the local workstation, before executing this command):
show configuration | no-more | save current-config
start shell user root <enter password>
. cd /config
rm -f juniper.conf+
Exit the shell.
Enter the configuration mode, perform load override current-config , and commit.
If the above procedure is not helpful, perform the following procedure:
SRX:
Take a USB stick and plug it in a working device.
Run the request system snapshot media usb partition command.
When you have a snapshot of the working device on the USB stick, it can be plugged into the device that has the issue.
Run the request system reboot media usb command to verify if the snapshot is working on the device that has the issue.
Finally, you can save the snapshot via the request system snapshot media internal partition command.
The device should now work normally.
EX/QFX:
For EX devices upgrading to the latest recommended version and rebooting the device can help to resolve this issue.
If the above procedure is not helpful then, perform Format install to recover the Switch.
Added workaround for EX devices.