Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use multi-byte characters in index name #75

Open
myu65 opened this issue Dec 27, 2023 · 0 comments
Open

Unable to use multi-byte characters in index name #75

myu65 opened this issue Dec 27, 2023 · 0 comments

Comments

@myu65
Copy link

myu65 commented Dec 27, 2023

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_日本語_index_name" to "test_?????????_index_name") so that it seems to be encoding errors in java http clients.

out:
  type: elasticsearch
  mode: insert
  nodes:
    - {host: "elasticsearch", port: 9200}
  index: "test_日本語_index_name"
  index_type: "embulk"
  id: "id"

...
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}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant