Exitcode -2 ConfigurationFileNotFoundException package metadata file chmetadata.json not found
27/11/2019 Cliff Hobbs ID: 267115
When attempting to deploy a Cloudhouse Container, the Cloudhouse.Container.Deployer.exe fails with Exitcode 2 and reports the configuration metadata file chmetadata.json cannot be found even when it is in the Container.
The following is displayed in the Windows Command Prompt, a 3rd party deployment tool or the DeploymentWorkflowLog.txt file or in the Container's folder.
c:> Container\Cloudhouse.Container.Deployment.exe --deploydir c:\programdata\cloudhouse 2017-02-02 13:45:19,625 ERROR Cloudhouse.Container.Deployment.Program - Failed to deploy: Cloudhouse.Container.Core.Exceptions.ConfigurationFileNotFoundException: Package metadata file C:\Users\stuartm\Downloads\chmetadata.json is not found in package directory. at Cloudhouse.Container.Core.PackageMetadata.Parse(String path) at Cloudhouse.Container.Core.Package..ctor(String packageDirectory) at Cloudhouse.Container.Deployment.Program.Main(String args) 2017-02-02 13:45:19,656 ERROR Cloudhouse.Container.Deployment.Program - Exiting with code: -2
Cloudhouse.Container.Deployer.exe is unable to find the metadata file which it expects to find in the Container folder.
To resolve this issue:
- Navigate to the Container's folder.
- If chmetadata.json is missing, restore the Container from backup or recreate the Container.
- If chmetadata.json is present, open a Command Prompt.
- Change to the Container's folder.
- Run the command Cloudhouse.Container.Deployer.exe --deploydir path
- If the command fails with Exit Code -2 contact Cloudhouse Support.
Applies to scripts, deployment tools and running from the command line.