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:

  1. Navigate to the Container's folder.
  2. If chmetadata.json is missing, restore the Container from backup or recreate the Container.
  3. If chmetadata.json is present, open a Command Prompt.
  4. Change to the Container's folder.
  5. Run the command Cloudhouse.Container.Deployer.exe --deploydir path
  6. If the command fails with Exit Code -2 contact Cloudhouse Support.

Applies to scripts, deployment tools and running from the command line.

Was this article helpful?

Table of Contents

    Can't find what you're looking for?

    Contact Support