{"record":{"id":"427d90127fb3a499","repo":"wavetermdev/waveterm","slug":"unable-to-obtain-remote-info-from-connserver-w","errorCode":null,"errorMessage":"unable to obtain remote info from connserver: %w","messagePattern":"unable to obtain remote info from connserver: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/blockcontroller/durableshellcontroller.go","lineNumber":248,"sourceCode":"\t\tCols: shellutil.DefaultTermCols,\n\t}\n\tif rtOpts != nil && rtOpts.TermSize.Rows > 0 && rtOpts.TermSize.Cols > 0 {\n\t\ttermSize = rtOpts.TermSize\n\t}\n\tcmdStr := blockMeta.GetString(waveobj.MetaKey_Cmd, \"\")\n\tcwd := blockMeta.GetString(waveobj.MetaKey_CmdCwd, \"\")\n\topts, err := remote.ParseOpts(connName)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"invalid ssh remote name (%s): %w\", connName, err)\n\t}\n\tconn := conncontroller.MaybeGetConn(opts)\n\tif conn == nil {\n\t\treturn \"\", fmt.Errorf(\"connection %q not found\", connName)\n\t}\n\tconnRoute := wshutil.MakeConnectionRouteId(connName)\n\tremoteInfo, err := wshclient.RemoteGetInfoCommand(wshclient.GetBareRpcClient(), &wshrpc.RpcOpts{Route: connRoute, Timeout: 2000})\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"unable to obtain remote info from connserver: %w\", err)\n\t}\n\tshellType := shellutil.GetShellTypeFromShellPath(remoteInfo.Shell)\n\tswapToken := makeSwapToken(ctx, ctx, dsc.BlockId, blockMeta, connName, shellType)\n\tsockName := wavebase.GetPersistentRemoteSockName(wstore.GetClientId())\n\trpcContext := wshrpc.RpcContext{\n\t\tProcRoute: true,\n\t\tSockName:  sockName,\n\t\tBlockId:   dsc.BlockId,\n\t\tConn:      connName,\n\t}\n\tjwtStr, err := wshutil.MakeClientJWTToken(rpcContext)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"error making jwt token: %w\", err)\n\t}\n\tswapToken.RpcContext = &rpcContext\n\tswapToken.Env[wshutil.WaveJwtTokenVarName] = jwtStr\n\tcmdOpts := shellexec.CommandOptsType{\n\t\tInteractive: true,","sourceCodeStart":230,"sourceCodeEnd":266,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/pkg/blockcontroller/durableshellcontroller.go#L230-L266","documentation":"The controller sends a RemoteGetInfoCommand RPC (2s timeout) to the remote connserver over the connection's wsh route to learn about the remote environment (e.g. which shell it runs). This error means that RPC failed — the remote wsh/connserver is unreachable, not installed, or too slow to respond.","triggerScenarios":"RemoteGetInfoCommand returns an error: remote connserver not running, wsh not installed on the remote, network drop mid-handshake, or response exceeding the 2000ms timeout.","commonSituations":"First connection to a new remote where wsh hasn't been installed; slow VPN/high-latency link blowing the 2s timeout; remote daemon crashed; firewall blocking the wsh route.","solutions":["Verify wsh is installed on the remote host and the connserver is running.","Increase tolerance by retrying Start once the link is stable (timeout is hardcoded at 2000ms).","Test basic SSH connectivity to the remote first.","Reinstall/upgrade wsh on the remote if the version is incompatible."],"exampleFix":"// before\nerr := controller.Start(ctx, blockMeta, rtOpts, false) // fails: connserver unreachable\n// after\nconn := conncontroller.MaybeGetConn(opts)\nif conn.DeriveConnStatus().Status != conncontroller.Status_Connected {\n    return fmt.Errorf(\"connect the remote before starting the shell\")\n}\nerr := controller.Start(ctx, blockMeta, rtOpts, false)","handlingStrategy":"retry","validationCode":"connRoute := wshutil.MakeConnectionRouteId(connName)\nif _, err := wshclient.RemoteGetInfoCommand(wshclient.GetBareRpcClient(), &wshrpc.RpcOpts{Route: connRoute, Timeout: 2000}); err != nil {\n    return fmt.Errorf(\"remote connserver not reachable: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"err := controller.Start(ctx, meta, rtOpts, false)\nif err != nil && strings.Contains(err.Error(), \"connserver\") {\n    time.Sleep(time.Second) // brief backoff for slow links\n    err = controller.Start(ctx, meta, rtOpts, false)\n}","preventionTips":["Install/verify wsh on every remote host before first use","Allow for >2s latency on VPN/satellite links; retry on first failure","Monitor remote connserver health as part of connection status"],"tags":["network","rpc","wsh","remote","timeout"],"backgroundTag":"connserver-unreachable","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}