Unable to connect from R 3.2.2
7
0
Entering edit mode
@michelrenou-9181
Last seen 9.0 years ago
France/Versailles/INRA

Hello,

I just installed the 3.2.2 version from R and want now to install packages that I am using in my script (among them tKWidgets). However when entering :

> source("https://bioconductor.org/biocLite.R")

I get the following error message :


Error in file(filename, "r", encoding = encoding) :
  cannot open the connection
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  InternetOpenUrl failed: 'An error occurred in the secure channel support'

Could you help me to fix it ?

Thanks,

Michel

 

PS the command: source("http://bioconductor.org/biocLite.R") is working when entered from my old 3.0.2 version

 

 

biocinstaller source • 12k views
ADD COMMENT
0
Entering edit mode

Folloxing are  more info on my R session:

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows XP (build 2600) Service Pack 3

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252   
[3] LC_MONETARY=French_France.1252 LC_NUMERIC=C                  
[5] LC_TIME=French_France.1252    

attached base packages:
[1] tcltk     stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] survival_2.38-3     lattice_0.20-33     XLConnect_0.2-11   
[4] XLConnectJars_0.2-9

loaded via a namespace (and not attached):
[1] splines_3.2.2 grid_3.2.2    rJava_0.9-7  
>

 


 

ADD REPLY
0
Entering edit mode

Does http:// work on your new R version?

ADD REPLY
0
Entering edit mode

Since you're on Windows XP, you may even run into issues with SSL certificate validation.  My understanding is that Windows controls all of this through "Internet Options" in Internet Explorer.  To confirm that communication to  bioconductor resources works, you could open Internet Explorer and enter "https://bioconductor.org/" in the address bar.  Hopefully this works.  If not, let us know the outcome.  Alternatively, you might try this : 

  1. Click Tools and select Internet Options
  2. Click the Security
  3. Consider lowering the "Security level" (this is be dangerous as it'll affect other Internet resources), or you can try adding Bioconductor.org to the list of "Trusted Sites" 
ADD REPLY
1
Entering edit mode
@james-w-macdonald-5106
Last seen 27 minutes ago
United States

Try using http instead of https (you note that http works for R-3.0.2, whereas https doesn't work for R-3.2.2, so you are doing different things with the two different R versions).

 

ADD COMMENT
0
Entering edit mode
@michelrenou-9181
Last seen 9.0 years ago
France/Versailles/INRA

Thank you for your responses. I have tried the following :

1- From R version 3.0.2 (2013-09-25), still installed on my PC

the command "> source("http://bioconductor.org/biocLite.R")" is working

but the command "> source("https://bioconductor.org/biocLite.R")" is not working issuing in the following error message:

Error in file(filename, "r", encoding = encoding) :
  cannot open the connection
In addition: Warning message:
In file(filename, "r", encoding = encoding) : unsupported URL scheme

2-  From Firefox

Entering : http://bioconductor.org/packages/3.1/bioc/src/contrib/PACKAGES

give me access to the list of package:

Package: a4
Version: 1.16.0
Depends: a4Base, a4Preproc, a4Classif, a4Core, a4Reporting
Suggests: MLP, nlcv, ALL, Cairo
License: GPL-3
MD5sum: 1bd22944d9e6d7bb2f6c742dcf7e340f
NeedsCompilation: no

Package: a4Base
Version: 1.16.0
Depends: methods, graphics, grid, Biobase, AnnotationDbi, annaffy, mpm,
        genefilter, limma, multtest, glmnet, a4Preproc, a4Core, gplots
Suggests: Cairo, ALL
Enhances: gridSVG, JavaGD
License: GPL-3
MD5sum: 0be52bafda21bc84cb17c27376a0b61a
NeedsCompilation: no

etc....

3 - From  the newly installed R version:

R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

neither > source("http://bioconductor.org/biocLite.R")

nor > source("https://bioconductor.org/biocLite.R")

are working with different error message.Respectively, for the http command
> source("http://bioconductor.org/biocLite.R")
Warning: unable to access index for repository https://bioconductor.org/packages/3.2/bioc/src/contrib
Warning: unable to access index for repository https://bioconductor.org/packages/3.2/bioc/bin/windows/contrib/3.2

and for the https

> source("https://bioconductor.org/biocLite.R")
Error in file(filename, "r", encoding = encoding) :
  cannot open the connection
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  InternetOpenUrl failed: 'An error occurred in the secure channel support'

From the fact that I could get the list of packages from firefox, I am encline to think that the problems are not coming from Windows or some configuration but rather from some thing getting wrong with  installation of R 3.2.

Best wishes,

Michel

ADD COMMENT
0
Entering edit mode
@michelrenou-9181
Last seen 9.0 years ago
France/Versailles/INRA

 

Very curiously I tried to acces BioC through the menu "Package", command "Select repositories". In the proposed list I selected "BioC software". And It worked !

the called function was : setRepositories()
Then I had acces to the list of packages,  from which I was able to select and install the different packages that I needed to run  my application (neurone activity analysis).

My current problems are solved but still, I am interested in knowing why it did not worked the regular way ! I suspect something in the format of the http command was badly interpreted.

Best regards,

 

Michel

ADD COMMENT
0
Entering edit mode

R 3.2.2 is the first version of R to support https, so attempts to use 3.0.2 with https:// for installing packages is not relevant; let's leave it out of any further discussion.

Your use of firefox did not use https://, so we do not know the status of native https:// support on your system. It would be interesting to discover this.

After using Rstudio's menu command, options("repos") likely returns an http:// protocol, so that you are using http://. The same effect could have been achieved using options(useHTTPS=FALSE) or options(BioC_mirror="http://bioconductor.org").

BiocInstaller tries to guess at https:// support. It would be interesting to know what BiocInstaller:::.protocol() returns on your system. If it returns "https" then it would be interesting to know what file("https://bioconductor.org") returns, and if that succeeds whether the following output is observed

> length(readLines(file("https://bioconductor.org")))
[1] 411

 

ADD REPLY
0
Entering edit mode
@michelrenou-9181
Last seen 9.0 years ago
France/Versailles/INRA

Hi Martin,

New trials and responses hereafter:

1- FIREFOX

https://bioconductor.org/packages/3.1/bioc/src/contrib/PACKAGES is working well with FIREFOX

2-  I am not using R studio, but the standard Rgui interface window with a few menus (File Edit, Misc Packages,  ...) on the upper bar of the window. This is what I get after choosing bioconductor as repository: and entering the options() function:

> setRepositories()
> options("repos")
$repos
                                   BioCsoft
"http://bioconductor.org/packages/3.1/bioc"

 

3 - BiocInstaller is failing :
> BiocInstaller:::.protocol()
Error in loadNamespace(name) : there is no package called ‘BiocInstaller’
>

But I think Biocinstaller is not installed on my machine.

4-

> file("https://bioconductor.org")
               description                      class
"https://bioconductor.org"              "url-wininet"
                      mode                       text
                       "r"                     "text"
                    opened                   can read
                  "closed"                      "yes"
                 can write
                      "no"

5-  changing options does fix anything

options(useHTTPS=TRUE)

6- I have now installed and loaded BiocInstaller 1.18.5 and tried again

> BiocInstaller:::.protocol()
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
  object '.protocol' not found

ADD COMMENT
0
Entering edit mode

4. What does length(readLines(file("https://bioconductor.org"))) return?

5. 'does fix anything' do you mean does _not_ fix anything, or that it does fix the problem?

6. For R-3.2.2 the correct version of BiocInstaller is 1.20. This is the version that is installed with

source("http://bioconductor.org/biocLite.R")

How did you install BiocInstaller  1.18.5? (.protocol() is not available in 1.18.5).

ADD REPLY
0
Entering edit mode
@michelrenou-9181
Last seen 9.0 years ago
France/Versailles/INRA

for 4- I get the number of lines with http:

> length(readLines(file("https://bioconductor.org")))
Error in readLines(file("https://bioconductor.org")) :
  cannot open the connection
In addition: Warning message:
In readLines(file("https://bioconductor.org")) :
  InternetOpenUrl failed: 'An error occurred in the secure channel support'

but :

> length(readLines(file("http://bioconductor.org")))
[1] 411

 

5 - Sorry, it was "DOES NOT fix anything"

6- After choosing the repository, I selected 'BiocInstaller' in the list of packages to be installed. Typing  the command you suggested confirms its version 1.18.5 I will download:

> source("http://bioconductor.org/biocLite.R")
Bioconductor version 3.1 (BiocInstaller 1.18.5), ?biocLite for help
A newer version of Bioconductor is available for this version of R,
  ?BiocUpgrade for help

7-  Trying to upgrade as suggested above produce mixed results, I guess again due to "https".

> biocLite("BiocUpgrade")
Upgrade all packages to Bioconductor version 3.2? [y/n]: y
trying URL 'http://bioconductor.org/packages/3.2/bioc/bin/windows/contrib/3.2/BiocInstaller_1.20.0.zip'
Content type 'application/zip' length 116517 bytes (113 KB)
downloaded 113 KB

package ‘BiocInstaller’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Documents and Settings\Michel\Local Settings\Temp\RtmpecHjV9\downloaded_packages
Bioconductor version 3.2 (BiocInstaller 1.20.0), ?biocLite for help
'BiocInstaller' changed to version 1.20.0
'no packages in repository (no internet connection?)' while trying
  https://bioconductor.org/packages/3.2/bioc, trying
  https://bioconductor.org/packages/3.1/bioc
Error: no packages in repository (no internet connection?)
>

But now :

> BiocInstaller:::.protocol()
[1] "https:"

and :

> file("https://bioconductor.org")
               description                      class
"https://bioconductor.org"              "url-wininet"
                      mode                       text
                       "r"                     "text"
                    opened                   can read
                  "closed"                      "yes"
                 can write
                      "no"

 

 

 

 

 

 

> source("http://bioconductor.org/biocLite.R")
Bioconductor version 3.1 (BiocInstaller 1.18.5), ?biocLite for help
A newer version of Bioconductor is available for this version of R,
  ?BiocUpgrade for help

 

> source("http://bioconductor.org/biocLite.R")
Bioconductor version 3.1 (BiocInstaller 1.18.5), ?biocLite for help
A newer version of Bioconductor is available for this version of R,
  ?BiocUpgrade for help

 

 

 

 

 

ADD COMMENT
0
Entering edit mode

Does setting

options(download.file.method="libcurl", url.method="libcurl")

at the start of your R session change anything?

ADD REPLY
0
Entering edit mode
@michelrenou-9181
Last seen 9.0 years ago
France/Versailles/INRA

Yes Jim Java,

it seems that after, R accept the commands with https, that did not work formerly:

> options(download.file.method="libcurl", url.method="libcurl")
> source("https://bioconductor.org/biocLite.R")
Bioconductor version 3.2 (BiocInstaller 1.20.0), ?biocLite for help
>

or :

> length(readLines(file("https://bioconductor.org")))
[1] 411
>

 

 

ADD COMMENT
0
Entering edit mode

I'm able to cause a problem similar to yours on a Windows 10 upgrade. If the FIPS security mode is turned off, running

source("https://www.bioconductor.org/biocLite.R")

in R fails; if I turn FIPS mode on, it works. Microsoft apparently doesn't recommend FIPS mode any more, but that may not keep its settings from causing a few problems still.

Your solution might be changing a registry entry. See here for details; in short, you could try changing the Windows registry key

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy]

to the value 1. Then relaunch R from a fresh command line or GUI and try the source() above again. If you need FIPS mode turned off for some reason, then starting an R session with

options(download.file.method="libcurl", url.method="libcurl")

or adding that line to your .Rprofile file might solve your problem.

ADD REPLY
0
Entering edit mode
@michelrenou-9181
Last seen 9.0 years ago
France/Versailles/INRA

Thanks Jim Java,

The packages are now loaded, and prefer not to change the windows register. I will had the options setting you suggest in the function .First I have customized for my applications so to avoid proplems in the future.

 

ADD COMMENT

Login before adding your answer.

Traffic: 945 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6