{"record":{"id":"bd410b2ff14e4e2a","repo":"hashicorp/packer","slug":"a-host-must-be-specified-please-reference-your-co","errorCode":null,"errorMessage":"a Host must be specified, please reference your communicator documentation","messagePattern":"a Host must be specified, please reference your communicator documentation","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"builder/null/config.go","lineNumber":43,"sourceCode":"\n\terr := config.Decode(c, &config.DecodeOpts{\n\t\tPluginType:        BuilderId,\n\t\tInterpolate:       true,\n\t\tInterpolateFilter: &interpolate.RenderFilter{},\n\t}, raws...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar errs *packersdk.MultiError\n\tif es := c.CommConfig.Prepare(nil); len(es) > 0 {\n\t\terrs = packersdk.MultiErrorAppend(errs, es...)\n\t}\n\n\tif c.CommConfig.Type != \"none\" {\n\t\tif c.CommConfig.Host() == \"\" {\n\t\t\terrs = packersdk.MultiErrorAppend(errs,\n\t\t\t\tfmt.Errorf(\"a Host must be specified, please reference your communicator documentation\"))\n\t\t}\n\n\t\tif c.CommConfig.User() == \"\" {\n\t\t\terrs = packersdk.MultiErrorAppend(errs,\n\t\t\t\tfmt.Errorf(\"a Username must be specified, please reference your communicator documentation\"))\n\t\t}\n\n\t\tif !c.CommConfig.SSHAgentAuth && c.CommConfig.Password() == \"\" && c.CommConfig.SSHPrivateKeyFile == \"\" {\n\t\t\terrs = packersdk.MultiErrorAppend(errs,\n\t\t\t\tfmt.Errorf(\"one authentication method must be specified, please reference your communicator documentation\"))\n\t\t}\n\n\t\tif (c.CommConfig.SSHAgentAuth &&\n\t\t\t(c.CommConfig.SSHPassword != \"\" || c.CommConfig.SSHPrivateKeyFile != \"\")) ||\n\t\t\t(c.CommConfig.SSHPassword != \"\" && c.CommConfig.SSHPrivateKeyFile != \"\") {\n\t\t\terrs = packersdk.MultiErrorAppend(errs,\n\t\t\t\tfmt.Errorf(\"only one of ssh_agent_auth, ssh_password, and ssh_private_key_file must be specified\"))\n","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/builder/null/config.go#L25-L61","documentation":"Config validation error from the null builder's Prepare: the communicator type is not \"none\" but no host is set, so Packer has no machine to connect to. The null builder delegates connection checks to the communicator config and only runs when type != none.","triggerScenarios":"Thrown at builder/null/config.go:43 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set communicator.host (or host) to the address of the existing machine you want to provision","Set communicator = \"none\" if you don't need a connection for this build"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eb36e3c3e48a036f3e8cc94087636ee72e1303c9","analyzedAt":"2026-09-05T13:20:43.127Z","contentChangedAt":"2026-09-05T13:20:43.127Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}