hashicorp/nomad · error
unexpected message type: %#v
Error message
unexpected message type: %#v
What it means
Exec streaming loop guard: a message arrived on the exec stream that is none of stdin-close, tty-resize, or heartbeat — an unknown/unset message type, indicating a protocol violation or version mismatch between client and driver.
Source
Thrown at plugins/drivers/execstreaming.go:62
errCh <- err
return
}
} else if msg.Stdin != nil && msg.Stdin.Close {
inWriter.Close()
} else if msg.TtySize != nil {
select {
case resize <- TerminalSize{
Height: int(msg.TtySize.Height),
Width: int(msg.TtySize.Width),
}:
case <-ctx.Done():
// process terminated before resize is processed
return
}
} else if isHeartbeat(msg) {
// do nothing
} else {
errCh <- fmt.Errorf("unexpected message type: %#v", msg)
}
}
}()
var sendLock sync.Mutex
send := func(v *ExecTaskStreamingResponseMsg) error {
sendLock.Lock()
defer sendLock.Unlock()
return stream.Send(v)
}
var outWg sync.WaitGroup
outWg.Add(2)
// handle Stdout
go func() {
defer outWg.Done()
View on GitHub (pinned to 482b49bf1a)
Solutions
- Match client and driver plugin versions so the exec protocol messages agree
- Check the custom driver's streaming implementation sends only known message types
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at plugins/drivers/execstreaming.go:62 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/a596c6c4a2df7bba.
Report an issue: GitHub.