{"record":{"id":"564ae8f9021a25de","repo":"owasp-amass/amass","slug":"the-amass-engine-did-not-respond-within-the-timeou","errorCode":null,"errorMessage":"the Amass engine did not respond within the timeout period","messagePattern":"the Amass engine did not respond within the timeout period","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/amass/main.go","lineNumber":183,"sourceCode":"\t\tviz.CLIWorkflow(cmdName, os.Args[2:])\n\tdefault:\n\t\tusage()\n\t\t_, _ = afmt.R.Fprintf(color.Error, \"subcommand provided but not defined: %s\\n\", os.Args[1])\n\t\tos.Exit(1)\n\t}\n}\n\nfunc waitForEngineResponse() error {\n\tt := time.NewTicker(time.Second)\n\tdefer t.Stop()\n\n\tfor range 60 {\n\t\t<-t.C\n\t\tif engineIsRunning() {\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn fmt.Errorf(\"the Amass engine did not respond within the timeout period\")\n}\n","sourceCodeStart":165,"sourceCodeEnd":185,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/cmd/amass/main.go#L165-L185","documentation":"waitForEngineResponse polls engineIsRunning() on a 1-second tick for 60 iterations (60 seconds). If the Amass engine process never becomes responsive within that window, it returns this timeout error and main aborts startup.","triggerScenarios":"Starting the amass engine and it fails to bind/respond to its health/IPC endpoint within 60 seconds — engine binary crashes on launch, port conflict, or slow startup under load.","commonSituations":"Engine crashing silently because stdout/stderr are discarded (io.Discard) so startup errors are invisible; firewall or missing graph service (e.g. Neo4j/DB) delaying readiness; running in resource-starved containers.","solutions":["Check engine logs/startup errors — startEngine discards cmd.Stdout/Stderr, so temporarily capture them to see why the engine never starts.","Verify engineIsRunning's endpoint (port/socket) is reachable and not blocked by firewall or occupied by another process.","Increase the 60-iteration timeout if the machine is slow, and confirm the engine binary launches correctly (run it manually)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// before waiting, confirm the engine can start:\ncmd := exec.Command(enginePath, \"--version\")\nif err := cmd.Run(); err != nil {\n    return fmt.Errorf(\"engine binary not runnable: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := waitForEngineResponse(); err != nil {\n    // capture engine stdout/stderr logs, check port availability, then retry once\n    log.Fatalf(\"engine startup failed: %v\", err)\n}","preventionTips":["Don't send engine stdout/stderr to io.Discard — capture to a log file.","Pre-check that the engine's listen port/socket is free.","Ensure any backing services (graph DB) are up before starting the engine."],"tags":["timeout","process","go"],"backgroundTag":"request-timeout","analyzedSha":"79299dce87b0085db0f2f4ef3e9c52cccb49f514","analyzedAt":"2026-09-06T08:22:48.198Z","contentChangedAt":"2026-09-06T08:22:48.198Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}