Search code examples
relasticsearchconfigurationopensslropensci

Secured Elastic Search R connection Error - Client requested protocal TLSv1 not enabled or not supported


I use the elastic 0.7.8 R package to connect to my Elastic Search instance. Recently, I tried to secure the Elastic Search by using Search Guard 2.

Everything work fines after securing it. But when I try to connect from R, it fails.

library(elastic)
connect(es_base = "https://localhost", es_port = 9200, es_user = USER, es_pwd = PASS)

The error in the log is "Client requested protocal TLSv1 not enabled or not supported"

I tried to connect to Elastic Search using cURL as below:

I am unable to figure out how to force R to use TLSv1.1.

Please assist.

Below are the version:

  • R : 3.3.1
  • Elastic Search: 2.4.1
  • GCC: 4.9.2
  • OS: RHEL 6.7
  • Openssl: 1.0.1.e-fips 11 Feb 2013

Solution

  • In elasticsearch.yml simply set

    searchguard.ssl.http.enabled_protocols:
      - "TLSv1.2"
      - "TLSv1.1"
      - "TLSv1"
    

    See also https://github.com/floragunncom/search-guard-ssl/blob/master/searchguard-ssl-config-template.yml