elasticsearchwriter不能用
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 5.7k
- PR merge metrics
- No merged PRs in 30d
Description
运行报错:
Caused by: java.lang.IllegalArgumentException: Preemptive authentication set without credentials provider
at io.searchbox.client.config.HttpClientConfig$Builder.build(HttpClientConfig.java:301)
at com.alibaba.datax.plugin.writer.elasticsearchwriter.ESClient.createClient(ESClient.java:65)
at com.alibaba.datax.plugin.writer.elasticsearchwriter.ESWriter$Job.prepare(ESWriter.java:49)
at com.alibaba.datax.core.job.JobContainer.prepareJobWriter(JobContainer.java:724)
at com.alibaba.datax.core.job.JobContainer.prepare(JobContainer.java:309)
at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:115)
... 3 more
本地的elasticsearch环境没有配置auth。
job相关配置如下:
"writer": {
"name": "elasticsearchwriter",
"parameter": {
"endpoint": "http://localhost:9200",
"index": "xxx",
"type": "xxx",
"accessId": "",
"accessKey": "",
"cleanup": true,
"settings": {"index" :{"number_of_shards": 5, "number_of_replicas": 0}},
"discovery": false,
"batchSize": 1000,
"splitter": ",",
……
}
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in ESClient.java at createClient, especially the HttpClientConfig.Builder call reported at line 301. Reproduce the job against the unauthenticated localhost:9200 endpoint and compare the accessId/accessKey handling with the authentication options. Done means the provided no-auth configuration can prepare the Elasticsearch writer without the credentials-provider exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100