{"record":{"id":"58bac96c8a67a300","repo":"shadow1ng/fscan","slug":"stomp-request-send-failed-w","errorCode":null,"errorMessage":"STOMP request send failed: %w","messagePattern":"STOMP request send failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/activemq.go","lineNumber":224,"sourceCode":"\n\tconn, err := session.DialTCP(ctx, \"tcp\", target, timeout)\n\tif err != nil {\n\t\treturn &ScanResult{\n\t\t\tSuccess: false,\n\t\t\tService: \"activemq\",\n\t\t\tError:   err,\n\t\t}\n\t}\n\tdefer func() { _ = conn.Close() }()\n\n\tstompConnect := \"CONNECT\\naccept-version:1.0,1.1,1.2\\nhost:/\\n\\n\\x00\"\n\n\t_ = conn.SetWriteDeadline(time.Now().Add(timeout))\n\tif _, writeErr := conn.Write([]byte(stompConnect)); writeErr != nil {\n\t\treturn &ScanResult{\n\t\t\tSuccess: false,\n\t\t\tService: \"activemq\",\n\t\t\tError:   fmt.Errorf(\"STOMP request send failed: %w\", writeErr),\n\t\t}\n\t}\n\n\t_ = conn.SetReadDeadline(time.Now().Add(timeout))\n\tresponse := make([]byte, 512)\n\tn, err := conn.Read(response)\n\tif err != nil {\n\t\treturn &ScanResult{\n\t\t\tSuccess: false,\n\t\t\tService: \"activemq\",\n\t\t\tError:   fmt.Errorf(\"failed to read response: %w\", err),\n\t\t}\n\t}\n\tif n == 0 {\n\t\treturn &ScanResult{\n\t\t\tSuccess: false,\n\t\t\tService: \"activemq\",\n\t\t\tError:   fmt.Errorf(\"%s\", i18n.GetText(\"activemq_stomp_empty_response\")),","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/activemq.go#L206-L242","documentation":"identifyService probes an ActiveMQ endpoint by sending a STOMP CONNECT frame and inspecting the reply. If conn.Write fails, the ScanResult carries 'STOMP request send failed' wrapping the underlying write error (note: this path uses a hardcoded English string, not i18n).","triggerScenarios":"Write deadline expiry, connection reset by the peer, or a broken socket when the probe writes its CONNECT frame during service identification.","commonSituations":"Service-identification sweeps hitting hosts that close connections aggressively, firewalls RST-ing non-HTTP protocols, timeouts too small during mass scans, or the port being filtered mid-handshake.","solutions":["Increase the module timeout (session.Config.ModuleTimeout())","Exclude non-ActiveMQ hosts or restrict the scan to known 61613 ports","Check firewall rules that reset unexpected protocol traffic","Treat it as a signal the service is not STOMP-capable"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"conn, err := net.DialTimeout(\"tcp\", target, timeout)\nif err != nil { return fmt.Errorf(\"unreachable %s: %w\", target, err) }","typeGuard":null,"tryCatchPattern":"res := plugin.identifyService(ctx, host, session)\nif res.Error != nil && strings.Contains(res.Error.Error(), \"STOMP request send failed\") {\n    // host likely non-STOMP or aggressive; skip or retry\n}","preventionTips":["Tune ModuleTimeout for the scan environment","Throttle scans to avoid triggering RSTs from security devices","Restrict identification to plausible ActiveMQ ports","Check res.Error on every ScanResult before use"],"tags":["network","stomp","service-identification"],"backgroundTag":"broken-pipe","analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}