hashicorp/nomad · error

%s: %q

Error message

%s: %q

What it means

StreamingRpcRegistry.GetHandler wraps the registry lookup miss: the requested streaming RPC method name is not registered. The generic guard fires when an agent receives a streaming connection for an unknown/outdated method.

Source

Thrown at nomad/structs/streaming_rpc.go:52

// NewStreamingRpcRegistry creates a new registry. All registrations of
// handlers should be done before retrieving handlers.
func NewStreamingRpcRegistry() *StreamingRpcRegistry {
	return &StreamingRpcRegistry{
		registry: make(map[string]StreamingRpcHandler),
	}
}

// Register registers a new handler for the given method name
func (s *StreamingRpcRegistry) Register(method string, handler StreamingRpcHandler) {
	s.registry[method] = handler
}

// GetHandler returns a handler for the given method or an error if it doesn't exist.
func (s *StreamingRpcRegistry) GetHandler(method string) (StreamingRpcHandler, error) {
	h, ok := s.registry[method]
	if !ok {
		return nil, fmt.Errorf("%s: %q", ErrUnknownMethod, method)
	}

	return h, nil
}

// Bridge is used to just link two connections together and copy traffic
func Bridge(a, b io.ReadWriteCloser) {
	wg := sync.WaitGroup{}
	wg.Add(2)
	go func() {
		defer wg.Done()
		_, _ = io.Copy(a, b)
		a.Close()
		b.Close()
	}()
	go func() {
		defer wg.Done()
		_, _ = io.Copy(b, a)

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Verify the method name matches a registered streaming handler
  2. Check for version mismatch between client and server agents
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at nomad/structs/streaming_rpc.go:52 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/10e962e410ede322. Report an issue: GitHub.