{"record":{"id":"f78fbb580027a939","repo":"txthinking/brook","slug":"combined-output-of-child-connect-process","errorCode":null,"errorMessage":"<combined output of child connect process>","messagePattern":"<combined output of child connect process>","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/brook/main.go","lineNumber":2615,"sourceCode":"\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t\tif c.String(\"link\") == \"\" {\n\t\t\t\t\treturn cli.ShowSubcommandHelp(c)\n\t\t\t\t}\n\t\t\t\tsocks5.Debug = true\n\t\t\t\tfmt.Println(\"Run brook connect to listen\", c.String(\"socks5\"))\n\t\t\t\tvar cmd *exec.Cmd\n\t\t\t\tvar err error\n\t\t\t\tgo func() {\n\t\t\t\t\tvar s string\n\t\t\t\t\ts, err = os.Executable()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\t// TODO append global dial options\n\t\t\t\t\tcmd = exec.Command(s, \"connect\", \"--link\", c.String(\"link\"), \"--socks5\", c.String(\"socks5\"))\n\t\t\t\t\tb, _ := cmd.CombinedOutput()\n\t\t\t\t\terr = errors.New(string(b))\n\t\t\t\t}()\n\t\t\t\ttime.Sleep(3 * time.Second)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\terr1 := brook.Socks5Test(c.String(\"socks5\"), \"\", \"\", c.String(\"domain\"), c.String(\"a\"), c.String(\"dns\"))\n\t\t\t\t_ = cmd.Process.Signal(syscall.SIGTERM)\n\t\t\t\treturn err1\n\t\t\t},\n\t\t},\n\t\t&cli.Command{\n\t\t\tName:  \"echoserver\",\n\t\t\tUsage: \"Echo server, echo UDP and TCP address of routes\",\n\t\t\tBashComplete: func(c *cli.Context) {\n\t\t\t\tl := c.Command.VisibleFlags()\n\t\t\t\tfor _, v := range l {\n\t\t\t\t\tfmt.Println(\"--\" + v.Names()[0])\n\t\t\t\t}","sourceCodeStart":2597,"sourceCodeEnd":2633,"githubUrl":"https://github.com/txthinking/brook/blob/5cd13ef3b1fb574e88ebf2c1b5d95f2ebe1342c8/cli/brook/main.go#L2597-L2633","documentation":"In the socks5 subcommand, brook spawns itself as a child 'connect' process and this error carries the child's entire combined stdout/stderr output. It means the underlying connect process exited or failed; the message text is whatever the child printed (e.g. link parse errors, dial failures), not a specific brook failure itself.","triggerScenarios":"Thrown at cli/brook/main.go:2615 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the embedded output to identify the child connect error","Verify the --link value is correct and the server is reachable","Run the connect subcommand directly with the same link to see the live error"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5cd13ef3b1fb574e88ebf2c1b5d95f2ebe1342c8","analyzedAt":"2026-09-06T04:35:00.432Z","contentChangedAt":"2026-09-06T04:35:00.432Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}