Elasticsearch index names allow multi-byte characters. ref: Create index API
But we use multi-byte characters for index in embulk-output-elasticsearch, it caused error.
in error message, multi-byte character become "?????????" (such as "test_日本語_indexname" to "test?????????_index_name") so that it seems to be encoding errors in java http clients.
...
2023-12-27 06:49:16.953 +0000 [INFO] (0001:transaction): Connecting to Elasticsearch version:7.17.9
2023-12-27 06:49:16.953 +0000 [INFO] (0001:transaction): Executing plugin with 'insert' mode.
2023-12-27 06:49:16.954 +0000 [INFO] (0001:transaction): Inserting data into index[test_日本語_index_name]
2023-12-27 06:49:17.027 +0000 [INFO] (0001:transaction): {done: 0 / 1, running: 0}
...
org.embulk.exec.PartialExecutionException: org.eclipse.jetty.client.HttpResponseException: Response not 2xx: 405 Method Not Allowed {"error":"Incorrect HTTP method for uri [/test_?????????_index_name/embulk/_bulk] and method [POST], allowed: [GET, PUT, HEAD, DELETE]","status":405}
at org.embulk.exec.BulkLoader$LoaderState.buildPartialExecuteException(BulkLoader.java:340)
at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:580)
at org.embulk.exec.BulkLoader.access$000(BulkLoader.java:36)
at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:353)
at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:350)
at org.embulk.spi.ExecInternal.doWith(ExecInternal.java:26)
at org.embulk.exec.BulkLoader.run(BulkLoader.java:350)
at org.embulk.EmbulkEmbed.run(EmbulkEmbed.java:278)
at org.embulk.EmbulkRunner.runInternal(EmbulkRunner.java:288)
at org.embulk.EmbulkRunner.run(EmbulkRunner.java:153)
at org.embulk.cli.EmbulkRun.runInternal(EmbulkRun.java:108)
at org.embulk.cli.EmbulkRun.run(EmbulkRun.java:24)
at org.embulk.cli.Main.main(Main.java:53)
Caused by: org.eclipse.jetty.client.HttpResponseException: Response not 2xx: 405 Method Not Allowed {"error":"Incorrect HTTP method for uri [/test_?????????_index_name/embulk/_bulk] and method [POST], allowed: [GET, PUT, HEAD, DELETE]","status":405}
at org.embulk.util.retryhelper.jetty92.Jetty92RetryHelper$1.call(Jetty92RetryHelper.java:138)
at org.embulk.util.retryhelper.RetryExecutor.run(RetryExecutor.java:109)
at org.embulk.util.retryhelper.RetryExecutor.runInterruptible(RetryExecutor.java:90)
at org.embulk.util.retryhelper.jetty92.Jetty92RetryHelper.requestWithRetry(Jetty92RetryHelper.java:114)
at org.embulk.output.elasticsearch.ElasticsearchHttpClient.sendRequest(ElasticsearchHttpClient.java:359)
at org.embulk.output.elasticsearch.ElasticsearchHttpClient.push(ElasticsearchHttpClient.java:105)
at org.embulk.output.elasticsearch.ElasticsearchRecordBuffer.bufferRecord(ElasticsearchRecordBuffer.java:83)
at org.embulk.base.restclient.RestClientPageOutput.add(RestClientPageOutput.java:59)
at org.embulk.spi.PageBuilderImpl.doFlush(PageBuilderImpl.java:244)
at org.embulk.spi.PageBuilderImpl.flush(PageBuilderImpl.java:249)
at org.embulk.spi.PageBuilderImpl.addRecord(PageBuilderImpl.java:228)
at org.embulk.spi.PageBuilder.addRecord(PageBuilder.java:220)
at org.embulk.filter.expand_json.FilteredPageOutput.add(FilteredPageOutput.java:255)
at org.embulk.exec.LocalExecutorPlugin$ScatterTransactionalPageOutput$OutputWorker.call(LocalExecutorPlugin.java:367)
at org.embulk.exec.LocalExecutorPlugin$ScatterTransactionalPageOutput$OutputWorker.call(LocalExecutorPlugin.java:307)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Suppressed: org.eclipse.jetty.client.HttpResponseException: Response not 2xx: 405 Method Not Allowed {"error":"Incorrect HTTP method for uri [/test_?????????_index_name/embulk/_bulk] and method [POST], allowed: [GET, PUT, HEAD, DELETE]","status":405}
... 19 more
Suppressed: org.eclipse.jetty.client.HttpResponseException: Response not 2xx: 405 Method Not Allowed {"error":"Incorrect HTTP method for uri [/test_?????????_index_name/embulk/_bulk] and method [POST], allowed: [GET, PUT, HEAD, DELETE]","status":405}
... 19 more
Error: org.eclipse.jetty.client.HttpResponseException: Response not 2xx: 405 Method Not Allowed {"error":"Incorrect HTTP method for uri [/test_?????????_index_name/embulk/_bulk] and method [POST], allowed: [GET, PUT, HEAD, DELETE]","status":405}
Elasticsearch index names allow multi-byte characters. ref: Create index API
But we use multi-byte characters for index in embulk-output-elasticsearch, it caused error.
in error message, multi-byte character become "?????????" (such as "test_日本語_indexname" to "test?????????_index_name") so that it seems to be encoding errors in java http clients.