argoproj/argo-workflows · error

this is impossible if you are not using the Argo Server, see

Error message

this is impossible if you are not using the Argo Server, see %s

What it means

ErrNoArgoServer is the sentinel error returned by argoKubeClient for services that only exist on the argo-server: ArchivedWorkflowService, InfoService, and SyncService. The direct-kube (argoKube) client implements workflow/template services in-process against Kubernetes, but has no backing implementation for archive/info/sync, so it returns this declared error explaining that these RPCs are impossible without an Argo Server.

Source

Thrown at pkg/apiclient/argo-kube-client.go:38

	workflowarchivepkg "github.com/argoproj/argo-workflows/v4/pkg/apiclient/workflowarchive"
	"github.com/argoproj/argo-workflows/v4/pkg/apiclient/workflowtemplate"
	workflow "github.com/argoproj/argo-workflows/v4/pkg/client/clientset/versioned"
	"github.com/argoproj/argo-workflows/v4/server/auth"
	clusterworkflowtmplserver "github.com/argoproj/argo-workflows/v4/server/clusterworkflowtemplate"
	cronworkflowserver "github.com/argoproj/argo-workflows/v4/server/cronworkflow"
	syncserver "github.com/argoproj/argo-workflows/v4/server/sync"
	"github.com/argoproj/argo-workflows/v4/server/types"
	workflowserver "github.com/argoproj/argo-workflows/v4/server/workflow"
	"github.com/argoproj/argo-workflows/v4/server/workflow/store"
	workflowtemplateserver "github.com/argoproj/argo-workflows/v4/server/workflowtemplate"
	"github.com/argoproj/argo-workflows/v4/util/help"
	"github.com/argoproj/argo-workflows/v4/util/instanceid"
	rbacutil "github.com/argoproj/argo-workflows/v4/util/rbac"
)

var (
	argoKubeOffloadNodeStatusRepo = sqldb.ExplosiveOffloadNodeStatusRepo
	ErrNoArgoServer               = fmt.Errorf("this is impossible if you are not using the Argo Server, see %s", help.CLI())
)

type ArgoKubeOpts struct {
	// Closing caching channel will stop caching informers
	CachingCloseCh chan struct{}

	// Whether to cache Workflows
	// This improves performance of reading Workflows, but it increases memory usage and startup time
	//
	// Workflow caching uses in-memory SQLite DB and it provides full capabilities
	CacheWorkflows bool

	// Whether to cache WorkflowTemplates
	// This improves performance of reading WorkflowTemplates, but it increases memory usage and startup time
	// It is especially visible during validating templates with many references,
	//
	// Note that templates caching currently uses informers, so not all template
	// get/list can use it, since informer has limited capabilities (such as filtering)

View on GitHub (pinned to 35bff19146)

Solutions

  1. Point the client at an Argo Server (set ARGO_SERVER / pass --argo-server) so these services are reachable
  2. If you only need workflow/template CRUD, keep direct-kube access and use NewWorkflowServiceClient
  3. Start the argo server (`argo server`) locally if you need archive access without a remote server

Example fix

// before
client, _ := apiclient.NewAPIClient(ctx, apiclient.Opts{ClientConfigSupplier: kubeConf})
arch, err := client.NewArchivedWorkflowServiceClient() // ErrNoArgoServer
// after
client, _ := apiclient.NewAPIClient(ctx, apiclient.Opts{ArgoServerOpts: apiclient.ArgoServerOpts{URL: serverURL}, AuthSupplier: auth})
arch, err := client.NewArchivedWorkflowServiceClient()
Defensive patterns

Strategy: fallback

Validate before calling

// detect direct-kube mode before using server-only services
usingArgoServer := os.Getenv("ARGO_SERVER") != ""
if !usingArgoServer && needsArchiveOrInfo {
    return errors.New("archive/info/sync services require an Argo Server: set ARGO_SERVER or pass --argo-server")
}

Try / catch

client, err := apiclient.NewAPIClient(ctx, opts)
if err != nil { return err }
arch, err := client.NewArchivedWorkflowServiceClient()
if errors.Is(err, apiclient.ErrNoArgoServer) {
    return fmt.Errorf("direct-kube mode has no archive API; connect to an Argo Server: %w", err)
}

Prevention

When it happens

Trigger: Creating a client with the direct-kube transport (apiclient.NewClientFromOptsWithContext with a kube ClientConfig and no ArgoServerOpts.URL — e.g. `argo archive list` running with KUBECONFIG access but no --argo-server) and then calling NewArchivedWorkflowServiceClient(), NewInfoServiceClient(), or NewSyncServiceClient().

Common situations: Running `argo archive get/list` or `argo server info` commands with direct-kube access (ARGO_SERVER unset); scripts assuming the archive API works everywhere; offline/off-cluster tools using the kube client.

Related errors


AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03). Data as JSON: /api/errors/5f5a8a652f864bd5. Report an issue: GitHub.