wavetermdev/waveterm · error
error checking connection status: %w
Error message
error checking connection status: %w
What it means
After loading the job, CheckJobConnected calls conncontroller.IsConnected on the job's connection. This error wraps any failure from that connectivity probe itself (as opposed to a definitive 'not connected' answer).
Source
Thrown at pkg/jobcontroller/jobcontroller.go:589
defer jobControllerLock.Unlock()
count := 0
for _, status := range jobConnStates {
if status == JobConnStatus_Connected {
count++
}
}
return count
}
func CheckJobConnected(ctx context.Context, jobId string) (*waveobj.Job, error) {
job, err := wstore.DBMustGet[*waveobj.Job](ctx, jobId)
if err != nil {
return nil, fmt.Errorf("failed to get job: %w", err)
}
isConnected, err := conncontroller.IsConnected(job.Connection)
if err != nil {
return nil, fmt.Errorf("error checking connection status: %w", err)
}
if !isConnected {
return nil, fmt.Errorf("connection %q is not connected", job.Connection)
}
jobConnStatus := GetJobConnStatus(jobId)
if jobConnStatus != JobConnStatus_Connected {
return nil, fmt.Errorf("job is not connected (status: %s)", jobConnStatus)
}
return job, nil
}
type StartJobParams struct {
ConnName string
JobKind string
Cmd string
Args []stringView on GitHub (pinned to a4447c1563)
Solutions
- Inspect the wrapped error to see why IsConnected failed
- Verify job.Connection names an existing configured connection
- Wait/retry if the connection router is still initializing
- Remove or reassign stale connections on the job
Example fix
// before
job, err := jobcontroller.CheckJobConnected(ctx, jobId)
if err != nil {
return err
}
// after
job, err := jobcontroller.CheckJobConnected(ctx, jobId)
if err != nil {
if strings.Contains(err.Error(), "error checking connection status") {
return retryLater // transient connectivity check failure
}
return err
} Defensive patterns
Strategy: retry
Validate before calling
connName := job.Connection
if _, ok := connRegistry[connName]; !ok {
return fmt.Errorf("connection %s is not configured", connName)
} Type guard
func isConnCheckErr(err error) bool {
return err != nil && strings.Contains(err.Error(), "error checking connection status")
} Try / catch
job, err := jobcontroller.CheckJobConnected(ctx, jobId)
if isConnCheckErr(err) {
time.Sleep(500 * time.Millisecond)
job, err = jobcontroller.CheckJobConnected(ctx, jobId)
}
if err != nil { return err } Prevention
- Keep job.Connection values in sync with the connection config
- Clean up jobs when their connection is removed
- Retry transient check failures with backoff
- Ensure the connection router is initialized before probing
When it happens
Trigger: conncontroller.IsConnected fails while checking job.Connection — unknown connection name, SSH config resolution failure, or internal router error.
Common situations: Connection removed from config while a job still references it; malformed SSH connection name; domain/socket router not yet started.
Related errors
- not connected: %s
- error setting up domain socket rpc client: %v
- failed to connect to tcp or unix domain socket: tcp err:%w:
- cannot call ${methodName}: no web endpoint
- call ${methodName} failed: ${resp.status} ${resp.statusText}
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/60d214127609ac43.
Report an issue: GitHub.