temporalio/temporal · error

bucket not found

Error message

bucket not found

What it means

The HTTP RoundTrip helper picks a random frontend member from cluster membership and rewrites the request address to use the HTTP port. It calls net.SplitHostPort on member.Identity() to strip the original port; if the identity is not in host:port form, SplitHostPort errors and this wrapping error is returned. The error is public API surface on the round-tripper.

Source

Thrown at common/archiver/gcloud/connector/client.go:21

package connector

import (
	"bytes"
	"context"
	"errors"
	"io"
	"os"

	"cloud.google.com/go/storage"
	"go.temporal.io/server/common/archiver"
	"go.temporal.io/server/common/config"
	"go.uber.org/multierr"
	"google.golang.org/api/iterator"
)

var (
	// ErrBucketNotFound is non retryable error that is thrown when the bucket doesn't exist
	ErrBucketNotFound = errors.New("bucket not found")
	errObjectNotFound = errors.New("object not found")
)

type (
	// Precondition is a function that allow you to filter a query result.
	// If subject match params conditions then return true, else return false.
	Precondition func(subject any) bool

	// Client is a wrapper around Google cloud storages client library.
	Client interface {
		Upload(ctx context.Context, URI archiver.URI, fileName string, file []byte) error
		Get(ctx context.Context, URI archiver.URI, file string) ([]byte, error)
		Query(ctx context.Context, URI archiver.URI, fileNamePrefix string) ([]string, error)
		QueryWithFilters(ctx context.Context, URI archiver.URI, fileNamePrefix string, pageSize, offset int, filters []Precondition) ([]string, bool, int, error)
		Exist(ctx context.Context, URI archiver.URI, fileName string) (bool, error)
	}

	storageWrapper struct {

View on GitHub (pinned to bde624efd1)

Solutions

  1. Check the membership provider: ensure frontend members register identities as host:port (bracket IPv6 like [::1]:7233).
  2. Log/inspect member.Identity() for the selected member to find the malformed value.
  3. Fix the frontend service's identity/advertising address configuration (e.g. rpc address or membership bind config).
  4. As a caller, retry — a different random member may be well-formed — while fixing the bad member's registration.

Example fix

// before (membership identity)
Identity: "frontend-1.internal"
// after
Identity: "frontend-1.internal:7233"
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-check member identities before issuing HTTP requests
for _, m := range members {
	if _, _, err := net.SplitHostPort(m.Identity()); err != nil {
		return fmt.Errorf("member %q has malformed identity: %w", m.Identity(), err)
	}
}

Type guard

func wellFormedMemberIdentity(id string) bool {
	_, _, err := net.SplitHostPort(id)
	return err == nil
}

Try / catch

resp, err := rt.RoundTrip(req)
if err != nil {
	var opErr *net.OpError
	if errors.As(err, &opErr) || strings.Contains(err.Error(), "failed to extract port from frontend member") {
		// skip malformed member or refresh membership list, then retry once
	}
	return nil, err
}

Prevention

When it happens

Trigger: Calling RoundTrip (e.g. via an HTTP client using this transport) when the selected frontend member's Identity() string lacks a parseable port — e.g. an identity with no colon, a bare hostname vs an IPv6 literal without brackets, or a corrupted membership record.

Common situations: Membership service advertising malformed identities (custom hostnames without ports); IPv6 addresses not bracketed; tests/stubs registering members with identities that don't match the expected host:port format; membership cache populated from stale/bad data.

Related errors


AI-assisted analysis of temporalio/temporal@bde624efd1 (2026-09-01). Data as JSON: /api/errors/553b72008d046b56. Report an issue: GitHub.