pulumi/pulumi · critical
failed to start loader server: %w
Error message
failed to start loader server: %w
What it means
The loader server is a gRPC server exposing the schema loader and provider mapper to the language host. `plugin.NewServer` failure is wrapped as `failed to start loader server` in `evalSource.Iterate`. This means the engine could not start the local gRPC service the program uses to fetch provider schemas and mapping info.
Source
Thrown at pkg/resource/deploy/source_eval.go:263
)
if err != nil {
return nil, fmt.Errorf("failed to start resource monitor: %w", err)
}
// Also start up a schema loader and a provider mapper for the language runtime to use to fetch
// schema and mapping information.
loaderRegistration := schema.LoaderRegistration(
schema.NewLoaderServer(schema.NewPluginLoader(src.plugctx)))
mapper, err := newRunMapper(ctx, src.plugctx)
if err != nil {
return nil, fmt.Errorf("failed to create provider mapper: %w", err)
}
mapperRegistration := pconvert.MapperRegistration(pconvert.NewMapperServer(mapper))
loaderServer, err := plugin.NewServer(src.plugctx, loaderRegistration, mapperRegistration)
if err != nil {
return nil, fmt.Errorf("failed to start loader server: %w", err)
}
// Create a new iterator with appropriate channels, and gear up to go!
iter := &evalSourceIterator{
loaderServer: loaderServer,
mon: mon,
src: src,
regChan: regChan,
regOutChan: regOutChan,
regReadChan: regReadChan,
finChan: finChan,
programComplete: programComplete,
panicErrs: src.panicErrs,
}
// Now invoke Run in a goroutine. All subsequent resource creation events will come in over the gRPC channel,
// and we will pump them through the channel. If the Run call ultimately fails, we need to propagate the error.
iter.forkRun(config, configSecretKeys)View on GitHub (pinned to 793f7b2e16)
Solutions
- Re-run with `--logtostderr -v=9` for the wrapped root cause
- Reinstall plugins (`pulumi plugin rm --all`, then retry) and/or reinstall the CLI
- Check that the environment allows binding local sockets/ports and has free resources
- Retry the deployment; transient startup failures may clear
Example fix
// before pulumi up // after pulumi plugin rm --all && pulumi up
Defensive patterns
Strategy: retry
Validate before calling
// shell: confirm environment permits local listeners pulumi preview --logtostderr -v=3 --dry-run > /dev/null 2>&1 || echo 'engine startup problem'
Try / catch
// TS automation API
try {
await stack.up();
} catch (err) {
if (String(err).includes("failed to start loader server")) {
// transient local gRPC startup failure: retry once
return stack.up();
}
throw err;
} Prevention
- Avoid sandbox/SELinux policies that block local socket binds for the pulumi process
- Keep engine and plugin binaries consistent versions
- Retry deployments in CI once on transient engine startup failures
When it happens
Trigger: `pulumi up`/`preview` when `plugin.NewServer(src.plugctx, loaderRegistration, mapperRegistration)` fails — usually gRPC server/socket startup failure within the plugin context.
Common situations: Resource exhaustion or restricted networking preventing local listeners; corrupted plugin infrastructure; unusual sandboxed CI environments.
Related errors
- load %q: %w
- load provider: %w
- could not run plugin at %q: %w
- getting schema: %w
- could not execute plugin %s (%s): %w
AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31).
Data as JSON: /api/errors/1b2193332ce26b96.
Report an issue: GitHub.