Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-11346

Could not enable basic authentication with elastic search connector

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Not A Problem
    • None
    • None
    • None

    Description

      Hello Team, 

      I am trying to add elasticsearch as sink and my current elasticsearch has enabled SSL and Basic authentication. 

      I could not connect to elasticsearch with basic authentication. 

      ===========

      code:

      val credentialsProvider = new BasicCredentialsProvider
      credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("user", "password"))

      esSinkBuilder.setRestClientFactory(
      restClientBuilder -> {
      restClientBuilder.setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback()

      { override def customizeHttpClient(httpClientBuilder: HttpAsyncClientBuilder) = httpClientBuilder .setDefaultCredentialsProvider(credentialsProvider) }

      )
      }
      )

      ===========

       

      Error Log:

      Error:(70, 7) not found: value restClientBuilder
      restClientBuilder -> {

       

      Application version used 

      scala - 2.11

      flink - 1.7

      elasticsearch - 6.5

      elasticsearch connector version - 2.11

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              itskannanraj kannan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: