{"record":{"id":"dd26dafa87fbc7ef","repo":"probelabs/goreplay","slug":"pcap-handles-error-s","errorCode":null,"errorMessage":"pcap handles error:%s","messagePattern":"pcap handles error:(.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/capture/capture.go","lineNumber":637,"sourceCode":"\tvar msg string\n\tfor _, ifi := range l.Interfaces {\n\t\tif _, found := l.Handles[ifi.Name]; found {\n\t\t\tcontinue\n\t\t}\n\n\t\tvar handle *pcap.Handle\n\t\thandle, e = l.PcapHandle(ifi)\n\t\tif e != nil {\n\t\t\tmsg += (\"\\n\" + e.Error())\n\t\t\tcontinue\n\t\t}\n\t\tl.Handles[ifi.Name] = packetHandle{\n\t\t\thandler: handle,\n\t\t\tips:     interfaceIPs(ifi),\n\t\t}\n\t}\n\tif len(l.Handles) == 0 {\n\t\treturn fmt.Errorf(\"pcap handles error:%s\", msg)\n\t}\n\treturn nil\n}\n\nfunc (l *Listener) activateVxLanSocket() error {\n\thandler, err := newVXLANHandler(l.config.VXLANPort, l.config.VXLANVNIs)\n\tif err != nil {\n\t\treturn err\n\t}\n\tl.Handles[\"vxlan\"] = packetHandle{\n\t\thandler: handler,\n\t}\n\n\treturn nil\n}\n\nfunc (l *Listener) activateRawSocket() error {\n\tif runtime.GOOS != \"linux\" {","sourceCodeStart":619,"sourceCodeEnd":655,"githubUrl":"https://github.com/probelabs/goreplay/blob/251e45abd242886bb64ff2b2dc98789556b56330/internal/capture/capture.go#L619-L655","documentation":"activatePcap aggregates per-interface PcapHandle errors into msg and, only if no interface yielded a usable handle, returns this combined error — meaning pcap capture cannot start at all; partial successes keep the working handles.","triggerScenarios":"Thrown at internal/capture/capture.go:637 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the embedded per-interface messages to find the root cause (permissions, missing interface, BPF errors)","Ensure at least one target interface is capturable (root/CAP_NET_RAW)","Fix interface names passed to --input-raw; typos mean no handle can be created"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"251e45abd242886bb64ff2b2dc98789556b56330","analyzedAt":"2026-09-02T16:44:11.369Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T21:17:11.164Z"}