Troubleshooting Posit Connect restart issues in Kubernetes
This article is for when a Posit Connect instance deployed to Kubernetes will not restart after a minor change, like a new password for the database, with errors that look like network errors.
Description
After a minor change, restarting Connect should just work. If it doesn’t, and we see networking errors like the following:
Warning Unhealthy 25m (x192 over 3h1m) kubelet Readiness probe failed: Get "http://10.75.11.96:3939/__ping__": dial tcp 10.75.11.96:3939: connect: connection refused
Warning BackOff 60s (x742 over 3h) kubelet Back-off restarting failed container connect in pod connect-vtvkt_posit-connect(67c77e57-e98a-4bf6-b0cc-188ea26f1aae)time="2026-02-01T15:02:52.245Z" level=fatal msg="Error: Unable to wait for launcher to come up: timeout waiting for the launcher to start: last error: unable to send request to https://connect-vhffx:5559/v1/status: Get \"https://connect-vhffx:5559/v1/status\": dial tcp 10.75.9.11:5559: connect: connection refused"The obvious thing to check is if port 5559 is working - but if netstat -tulpn | grep 5559 doesn’t return any values, the important part of the log message is:
time="2026-02-01T15:03:39.501Z" level=fatal msg="Error: Unable to wait for launcher to come up: timeout waiting for the launcher to start...
Solution
This can happen if there are too many jobs or services in the namespace when the launcher tries to start. Check the output from these commands:
# job count
kubectl get jobs -l connect.rstudio.com/content-guid | wc -l
# service count
kubectl get svc -l connect.rstudio.com/content-guid | wc -lIf the number is high, try clearing out the stopped jobs and services before restarting Connect.
The development team has suggested that high can be 1000+, but it will depend on the resources available to the Kubernetes deployment. We have seen this in a situation where there were 0 jobs and 218 services.
The following commands can be used to delete the stopped or failed jobs and services.
kubectl delete jobs -l connect.rstudio.com/content-guid
kubectl delete svc -l connect.rstudio.com/content-guidIf you’re still having issues, you can reach out to Support by opening a ticket.