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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Shang Yuanchun (Jira)
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)