I can't start a second instance of RStudio without receiving the "Error Starting R" page. The error message I don't know how to interpret or fix in the context of RStudio.
Are there any settings in RStudio I can tweak to fix this?
Thanks!
Details
From:
C:/Users/MyName/AppData/Local/RStudio/log/rsession-MyName.log
2022-06-07T06:52:01.004631Z [rsession-MyName] ERROR system error 10048 (Only one usage of each socket address (protocol/network address/port) is normally permitted); OCCURRED AT class rstudio::core::Error __cdecl rstudio::core::http::initTcpIpAcceptor(class rstudio::core::http::SocketAcceptorService<class rstudio_boost::asio::ip::tcp> &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &) src/cpp/session/http/SessionWin32HttpConnectionListener.cpp:122; LOGGED FROM: int __cdecl main(int,char *const []) src/cpp/session/SessionMain.cpp:2088
How i reproduce it:
- Have system proxy running
- Open an instance of RStudio normally in Windows 10. I have a few versions of R installed, using 4.0.3 in this case. This session works fine.
- Open a second instance of RStudio. This results in the "Error Starting R" warning and the set of error messages, copied below.
A few other items for context:
- Have installed and reinstalled RStudio. This first appeared after upgrading to the most recent version of RStudio (RStudio-2022.02.3-492); it still appeared after downgrading to RStudio-2021.09.3-396.exe
- it occurs whether i have had an RStudio project reopen or not.
- Removing my .renviron, .rhistory, and .rprofile doesn't fix this.
- If i have one instance of RStudio open and try opening an R console with R.exe, i can do so without any problem.
- I don't have any new system environmental variables I believe are mucking with this. I use a proxy (Clash for Windows), but the proxy settings are not in my system environmental variables, just in the windows proxy settings. When my proxy is turned off, i can open multiple RStudio instances without trouble. I've used this same proxy software for years without trouble, and I'd like to find a way for RStudio to keep working with this thing. Per Window's proxy settings window, my proxy settings are as follows:
address: 127.0.0.1 , port: 7890 (this is the port consistently)
excluded IPs:localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;192.168.*
The checkbox for "Don't use the proxy server for local (intranet) addresses" is checked. My proxy also has a loopback option for proxying local traffic, but this is also unused. I upgraded my proxy software to the latest version to no avail. - I have previously used httr::set_config to set a proxy address and httr::reset_config() to clear that, but seems unrelated to the current circumstance.
- Lastly, I tried googling the error message. I get the basics about how a socket is in use, etc. etc., but it seems odd to me I haven't had problems in years of using RStudio together with a proxy until I recently upgraded R Studio.
Finally, error messages below:
R Session Startup Failure Report
RStudio Version
RStudio 2021.09.3+396, "Ghost Orchid" (d3cd0996, 2022-04-21) for Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36
Error message
[No error available]
Process Output
The R session exited with code 1.
Error output:
[No errors emitted]
Standard output:
[No output emitted]
Logs
C:/Users/MyName/AppData/Local/RStudio/log/rsession-MyName.log
2022-06-07T06:52:01.004631Z [rsession-MyName] ERROR system error 10048 (Only one usage of each socket address (protocol/network address/port) is normally permitted); OCCURRED AT class rstudio::core::Error __cdecl rstudio::core::http::initTcpIpAcceptor(class rstudio::core::http::SocketAcceptorService<class rstudio_boost::asio::ip::tcp> &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &) src/cpp/session/http/SessionWin32HttpConnectionListener.cpp:122; LOGGED FROM: int __cdecl main(int,char *const []) src/cpp/session/SessionMain.cpp:2088
2022-06-07T06:58:46.187739Z [rsession-MyName] ERROR system error 10048 (Only one usage of each socket address (protocol/network address/port) is normally permitted); OCCURRED AT class rstudio::core::Error __cdecl rstudio::core::http::initTcpIpAcceptor(class rstudio::core::http::SocketAcceptorService<class rstudio_boost::asio::ip::tcp> &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &) src/cpp/session/http/SessionWin32HttpConnectionListener.cpp:122; LOGGED FROM: int __cdecl main(int,char *const []) src/cpp/session/SessionMain.cpp:2088
2022-06-07T06:58:46.187739Z [rsession-MyName] ERROR system error 10048 (Only one usage of each socket address (protocol/network address/port) is normally permitted); OCCURRED AT class rstudio::core::Error __cdecl rstudio::core::http::initTcpIpAcceptor(class rstudio::core::http::SocketAcceptorService<class rstudio_boost::asio::ip::tcp> &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &) src/cpp/session/http/SessionWin32HttpConnectionListener.cpp:122; LOGGED FROM: int __cdecl main(int,char *const []) src/cpp/session/SessionMain.cpp:2088