fImports not working. Error: certificate common name doesn't match requested host name

Bug #1606279 reported by K Marks
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fimport (Ubuntu)
New
Undecided
Unassigned

Bug Description

I am getting the following error for this code;

library(fImport)
x <- fredImport(query = "MPRIME")

--2016-07-25 15:51:22-- http://research.stlouisfed.org/fred2/series/MPRIME/downloaddata/MPRIME.txt
Resolving research.stlouisfed.org... 65.89.18.120
Connecting to research.stlouisfed.org|65.89.18.120|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://fred.stlouisfed.org/series/MPRIME/downloaddata/MPRIME.txt [following]
--2016-07-25 15:51:23-- https://fred.stlouisfed.org/series/MPRIME/downloaddata/MPRIME.txt
Resolving fred.stlouisfed.org... 65.89.18.120
Connecting to fred.stlouisfed.org|65.89.18.120|:443... connected.
ERROR: certificate common name “research.stlouisfed.org” doesn’t match requested host name “fred.stlouisfed.org”.
To connect to fred.stlouisfed.org insecurely, use ‘--no-check-certificate’.
Read 0 items
Warning message:
In download.file(url = url, destfile = tmp) :
  download had nonzero exit status

I believe this is a bug, a possible fix could be in file R/import-fred.R line 84, add the argument: extra = "--no-check-certificate" to the function download.file(), as suggested in the error message, i.e.

download.file(url = url, destfile = tmp, extra = "--no-check-certificate")

Which should bypass the certification of the url. I have written this into a function fredImport2 to test and this is the response;

x <- fredImport2(query = "MPRIME")

--2016-07-25 15:57:05-- http://research.stlouisfed.org/fred2/series/MPRIME/downloaddata/MPRIME.txt
Resolving research.stlouisfed.org... 65.89.18.120
Connecting to research.stlouisfed.org|65.89.18.120|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://fred.stlouisfed.org/series/MPRIME/downloaddata/MPRIME.txt [following]
--2016-07-25 15:57:05-- https://fred.stlouisfed.org/series/MPRIME/downloaddata/MPRIME.txt
Resolving fred.stlouisfed.org... 65.89.18.120
Connecting to fred.stlouisfed.org|65.89.18.120|:443... connected.
WARNING: certificate common name “research.stlouisfed.org” doesn’t match requested host name “fred.stlouisfed.org”.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: “/tmp/RtmpRzvEEZ/file384c1e7da42”

     0K .......... ..... 144K=0.1s

2016-07-25 15:57:05 (144 KB/s) - “/tmp/RtmpRzvEEZ/file384c1e7da42” saved [16117]

Read 824 items

(using ‘fImport’ version 3000.82, on RStudio Server, Platform: x86_64-pc-linux-gnu (64-bit),
Running under: CentOS release 6.3 (Final))

K Marks (kmarks)
summary: - fredImports not working. Error: certificate common name doesn't match
+ frImports not working. Error: certificate common name doesn't match
requested host name
summary: - frImports not working. Error: certificate common name doesn't match
+ fImports not working. Error: certificate common name doesn't match
requested host name
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.