Edge Proxy upgrade Fails: Windows Lock on file or folder


Description

Edge Encryption proxy upgrade fails. Logs report a lock on the logs file or folder.

Logs:

08/10/19 21:34:01 (973) SEVERE java.lang.RuntimeException: java.io.IOException: Unable to delete directory D:\Data\EdgeProd\logs.
        at com.snc.dist.upgrade.container.command.unit.CommandDistUpgrade.run(CommandDistUpgrade.java:118)
        at com.snc.dist.upgrade.container.command.CommandProcessor.process(CommandProcessor.java:37)
        at com.snc.dist.upgrade.container.DistUpgrade.invokeCommand(DistUpgrade.java:132)
        at com.snc.dist.upgrade.container.DistUpgrade.start(DistUpgrade.java:106)
        at com.snc.edgeencryption.dist.upgrade.Main.main(Main.java:37)
Caused by: java.io.IOException: Unable to delete directory D:\Data\EdgeProd\logs.
        at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1581)
        at org.apache.commons.io.FileUtils.moveDirectory(FileUtils.java:2916)
        at com.snc.dist.upgrade.common.ShellUtils.moveDirectoryContents(ShellUtils.java:92)
        at com.snc.dist.upgrade.container.DistUpgradeBackup.processBackup(DistUpgradeBackup.java:78)
        at com.snc.dist.upgrade.container.DistUpgradeBackup.processBackupFullDist(DistUpgradeBackup.java:65)
        at com.snc.dist.upgrade.container.command.unit.CommandDistUpgrade.backupAndEmptyFullDistribution(CommandDistUpgrade.java:143)
        at com.snc.dist.upgrade.container.command.unit.CommandDistUpgrade.run(CommandDistUpgrade.java:108)
        ... 4 more

Release or Environment

Kingston, London, Madrid

Cause

A temporary windows lock on the directory or folder causes this.

This lock is sometimes not visible on Computer Management => Open Files.

Resolution

  1. Stop Edge Encryption Proxy Services
  2. Restart Edge Encryption Proxy's host VM
  3. Above two steps will remove the lock, now try the upgrade again.