github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/enterprise/packer/builds/troubleshooting.html.md (about)

     1  ---
     2  layout: "enterprise"
     3  page_title: "Troubleshooting - Packer Builds - Terraform Enterprise"
     4  sidebar_current: "docs-enterprise-packerbuilds-troubleshooting"
     5  description: |-
     6    Packer builds can fail in Terraform Enterprise for a number of reasons – improper configuration, transient networking errors, and hardware constraints are all possible.
     7  ---
     8  
     9  # Troubleshooting Failing Builds
    10  
    11  Packer builds can fail in Terraform Enterprise for a number of reasons –
    12  improper configuration, transient networking errors, and hardware constraints
    13  are all possible. Below is a list of debugging options you can use.
    14  
    15  ### Verbose Packer Logging
    16  
    17  You can [set a variable](/docs/enterprise/packer/builds/build-environment.html#environment-variables) in the UI that increases the logging verbosity
    18  in Packer. Set the `PACKER_LOG` key to a value of `1` to accomplish this.
    19  
    20  After setting the variable, you'll need to [rebuild](/docs/enterprise/packer/builds/rebuilding.html).
    21  
    22  Verbose logging will be much louder than normal Packer logs and isn't
    23  recommended for day-to-day operations. Once enabled, you'll be able to see in
    24  further detail why things failed or what operations Packer was performing.
    25  
    26  This can also be used locally:
    27  
    28  ```text
    29  $ PACKER_LOG=1 packer build ...
    30  ```
    31  
    32  ### Hanging Builds
    33  
    34  Some VM builds, such as VMware or VirtualBox, may hang at various stages,
    35  most notably `Waiting for SSH...`.
    36  
    37  Things to pay attention to when this happens:
    38  
    39  - SSH credentials must be properly configured. AWS keypairs should match, SSH
    40    usernames should be correct, passwords should match, etc.
    41  
    42  - Any VM pre-seed configuration should have the same SSH configuration as your
    43    template defines
    44  
    45  A good way to debug this is to manually attempt to use the same SSH
    46  configuration locally, running with `packer build -debug`. See
    47  more about [debugging Packer builds](https://packer.io/docs/other/debugging.html).
    48  
    49  ### Hardware Limitations
    50  
    51  Your build may be failing by requesting larger memory or
    52  disk usage then is available. Read more about the [build environment](/docs/enterprise/packer/builds/build-environment.html#hardware-limitations).
    53  
    54  _Typically_ Packer builds that fail due to requesting hardware limits
    55  that exceed Terraform Enterprise's [hardware limitations](/docs/enterprise/packer/builds/build-environment.html#hardware-limitations)
    56  will fail with a _The operation was canceled_ error message as shown below:
    57  
    58  ```text
    59  # ...
    60  ==> vmware-iso: Starting virtual machine...
    61      vmware-iso: The VM will be run headless, without a GUI. If you want to
    62      vmware-iso: view the screen of the VM, connect via VNC without a password to
    63      vmware-iso: 127.0.0.1:5918
    64  ==> vmware-iso: Error starting VM: VMware error: Error: The operation was canceled
    65  ==> vmware-iso: Waiting 4.604392397s to give VMware time to clean up...
    66  ==> vmware-iso: Deleting output directory...
    67  Build 'vmware-iso' errored: Error starting VM: VMware error: Error: The operation was canceled
    68  
    69  ==> Some builds didn't complete successfully and had errors:
    70  --> vmware-iso: Error starting VM: VMware error: Error: The operation was canceled
    71  ```
    72  
    73  ### Local Debugging
    74  
    75  Sometimes it's faster to debug failing builds locally. In this case,
    76  you'll want to [install Packer](https://www.packer.io/intro/getting-started/setup.html) and any providers (like Virtualbox) necessary.
    77  
    78  Because Terraform Enterprise runs the open source version of Packer, there
    79  should be no difference in execution between the two, other than the environment
    80  that Packer is running in. For more on hardware constraints in the Terraform
    81  Enterprise environment read below.
    82  
    83  Once your builds are running smoothly locally you can push it up to Terraform
    84  Enterprise for versioning and automated builds.
    85  
    86  ### Internal Errors
    87  
    88  This is a short list of internal errors and what they mean.
    89  
    90  - SIC-001: Your data was being ingressed from GitHub but failed
    91  to properly unpack. This can be caused by bad permissions, using
    92  symlinks or very large repository sizes. Using symlinks inside of the
    93  packer directory, or the root of the repository, if the packer directory
    94  is unspecified, will result in this internal error.
    95  
    96      _**Note:** Most often this error occurs when applications or builds are
    97      linked to a GitHub repository and the directory and/or template paths are
    98      incorrect. Double check that the paths specified when you linked the GitHub
    99      repository match the actual paths to your template file._
   100  
   101  - SEC-001: Your data was being unpacked from a tarball uploaded
   102  and encountered an error. This can be caused by bad permissions, using
   103  symlinks or very large tarball sizes.
   104  
   105  ### Community Resources
   106  
   107  Packer is an open source project with an active community. If you're
   108  having an issue specific to Packer, the best avenue for support is
   109  the mailing list or IRC. All bug reports should go to GitHub.
   110  
   111  - Website: [packer.io](https://packer.io)
   112  - GitHub: [github.com/mitchellh/packer](https://github.com/mitchellh/packer)
   113  - IRC: `#packer-tool` on Freenode
   114  - Mailing list: [Google Groups](http://groups.google.com/group/packer-tool)
   115  
   116  ### Getting Support
   117  
   118  If you believe your build is failing as a result of a bug in Terraform
   119  Enterprise, or would like other support, please
   120  [email us](mailto:support@hashicorp.com).