{"record":{"id":"a4b2d1ac6b9f4e0e","repo":"t8y2/dbx","slug":"connect-rocketmq-endpoint-s-w","errorCode":null,"errorMessage":"connect RocketMQ endpoint %s: %w","messagePattern":"connect RocketMQ endpoint (.+?): %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/rocketmq/routing.go","lineNumber":212,"sourceCode":"\t\t\t\tauth = &proxy.Auth{User: socks.Username, Password: socks.Password}\n\t\t\t}\n\t\t\tdialer, dialErr := proxy.SOCKS5(\"tcp\", formatSocketAddress(socks.Host, fmt.Sprintf(\"%d\", socks.Port)), auth, &net.Dialer{Timeout: endpoint.manager.config.ConnectTimeout})\n\t\t\tif dialErr != nil {\n\t\t\t\tlastErr = dialErr\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconn, err = dialer.Dial(\"tcp\", target)\n\t\t} else {\n\t\t\tctx, cancel := context.WithTimeout(context.Background(), endpoint.manager.config.ConnectTimeout)\n\t\t\tconn, err = (&net.Dialer{}).DialContext(ctx, \"tcp\", target)\n\t\t\tcancel()\n\t\t}\n\t\tif err == nil {\n\t\t\treturn conn, nil\n\t\t}\n\t\tlastErr = err\n\t}\n\treturn nil, fmt.Errorf(\"connect RocketMQ endpoint %s: %w\", endpoint.original, lastErr)\n}\n\nfunc (endpoint *proxyEndpoint) forward(source, destination net.Conn, response bool) error {\n\tfor {\n\t\tframe, err := readRemotingFrame(source)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcommand, err := remoting.Decode(frame[4:])\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif response {\n\t\t\tif err := endpoint.manager.rewriteResponse(command); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\tsignCommand(command, endpoint.manager.config.AccessKey, endpoint.manager.config.SecretKey)","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/rocketmq/routing.go#L194-L230","documentation":"Returned by dialRemote in the rocketmq proxy when dialing a remote broker endpoint (directly or via SOCKS5) failed for all candidate targets; the last error is wrapped with the endpoint address. It means the proxy listener accepted a client connection but could not reach the upstream broker.","triggerScenarios":"Thrown at agents/drivers/rocketmq/routing.go:212 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error and endpoint address; verify the broker host:port is reachable from the agent","For SOCKS routes verify socks_proxy host/port and credentials","Check firewall/NAT rules between the agent and the private broker network","Retry — transient broker restarts or network blips can cause this"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}