You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "kannan (JIRA)" <ji...@apache.org> on 2019/01/16 14:01:00 UTC

[jira] [Created] (FLINK-11346) Could not enable basic authentication with elastic search connector

kannan created FLINK-11346:
------------------------------

             Summary: Could not enable basic authentication with elastic search connector
                 Key: FLINK-11346
                 URL: https://issues.apache.org/jira/browse/FLINK-11346
             Project: Flink
          Issue Type: Bug
          Components: ElasticSearch Connector
            Reporter: kannan


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



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)