I get this error on old Windows systems. I have an up to date Linux machine, there the following test runs fine:
length(readLines(file('https://saezlab.org/')))
On the same computer I have a Windows 7 virtual machine. There I get InternetOpenUrl failed: A connection with the server could not be established error. However for other URLs it works with no error:
length(readLines(file('https://google.com/')))
I tried to set the option download.file.method to wininet, internal, libcurl, without success. Also the webpage which fails from R (https://saezlab.org/) can be opened from Firefox. Searching for the error I got mostly irrelevant hits. My question is also about how to investigate further this issue? How can I get something similar to curl -vvv output, where I can see exactly where the communication fails? I see InternetOpenUrl sometimes gives more specific error messages (e.g. timeout, DNS issue, SSL error) but this message sounds quite vague: what's the reason why the connection can't be established? A little more background: I encountered this error when Bioconductor reported failed tests for my package on their Windows Server 2012 build machine (also an old Windows) while on their Windows Server 2019 machine the tests run fine. I used everywhere the latest R (4.0.2).