probelabs/goreplay · error
pcap handles error:%s
Error message
pcap handles error:%s
What it means
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.
Source
Thrown at internal/capture/capture.go:637
var msg string
for _, ifi := range l.Interfaces {
if _, found := l.Handles[ifi.Name]; found {
continue
}
var handle *pcap.Handle
handle, e = l.PcapHandle(ifi)
if e != nil {
msg += ("\n" + e.Error())
continue
}
l.Handles[ifi.Name] = packetHandle{
handler: handle,
ips: interfaceIPs(ifi),
}
}
if len(l.Handles) == 0 {
return fmt.Errorf("pcap handles error:%s", msg)
}
return nil
}
func (l *Listener) activateVxLanSocket() error {
handler, err := newVXLANHandler(l.config.VXLANPort, l.config.VXLANVNIs)
if err != nil {
return err
}
l.Handles["vxlan"] = packetHandle{
handler: handler,
}
return nil
}
func (l *Listener) activateRawSocket() error {
if runtime.GOOS != "linux" {View on GitHub (pinned to 251e45abd2)
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
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at internal/capture/capture.go:637 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of probelabs/goreplay@251e45abd2 (2026-09-02).
Data as JSON: /api/errors/dd26dafa87fbc7ef.
Report an issue: GitHub.