You are likely running something on your local machine that is listening on port 9000 that your R code is connecting to. Whatever that is, it isn't running in rstudio.cloud, and therefore you cannot connect to it. You can either make that server/service publicly available, or you can run it within your project on rstudio.cloud.