Hi JB,
This is the version of the Elastic Search I wish to push to:
{
"name" : "sitesc104w224m7",
"cluster_name" : "vela",
"cluster_uuid" : "fNKKGBcoTJmh42LDDxDkow",
"version" : {
"number" : "6.8.12",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "7a15d2a",
"build_date" : "2020-08-12T07:27:20.804867Z",
"build_snapshot" : false,
"lucene_version" : "7.7.3",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
> On Nov 2, 2020, at 21:17, Jean-Baptiste Onofre <[email protected]> wrote:
>
> Hi Mark,
>
> What elasticsearch version are you using ?
>
> Regards
> JB
>
>> Le 2 nov. 2020 à 22:11, Mark Bordelon <[email protected]> a écrit :
>>
>> With the following minimal configuration, (just setting the address,
>> authentication, and index prefix) …
>>
>> ################################################
>> # Decanter Elasticsearch Appender Configuration
>> ################################################
>>
>> # HTTP address of the elasticsearch nodes (separated with comma)
>> addresses=http://elasticsearch-vela-1.sit.etrade.com:9200
>> <http://elasticsearch-vela-1.sit.etrade.com:9200/>
>>
>> # Basic username and password authentication
>> username=batchoi
>> password=batchoipwd
>>
>> # The index name.
>> # The index prefix is a static string used to construct the index
>> index.prefix=karafCamelCWS
>> # If true, it creates an index per Decanter event day
>> #index.event.timestamped=true
>> # For Elasticsearch < 7.5, index type is mandatory (not defined by default)
>> index.type=
>>
>> # Marshaller to use (json is heavily recommended)
>> marshaller.target=(dataFormat=json)
>>
>>
>> I get this 405 error when i install the elasticsearch appender feature.
>>
>> 2020-11-02T15:32:15,870 | WARN | EventAdminAsyncThread #23 |
>> ElasticsearchAppender | 188 -
>> org.apache.karaf.decanter.appender.elasticsearch - 2.5.0 | Can't append into
>> Elasticsearch
>> org.elasticsearch.client.ResponseException: method [POST], host
>> [http://elasticsearch-vela-1.sit.etrade.com:9200], URI
>> [/karafCamelCWS-2020.11.02/], status line [HTTP/1.1 405 Method Not Allowed
>> <http://elasticsearch-vela-1.sit.etrade.com:9200], uri
>> [/karafCamelCWS-2020.11.02/], status line [HTTP/1.1 405 Method Not Allowed>]
>> {"error":"Incorrect HTTP method for uri [/karafCamelCWS-2020.11.02/] and
>> method [POST], allowed: [HEAD, GET, PUT, DELETE]","status":405}
>> at
>> org.elasticsearch.client.RestClient.convertResponse(RestClient.java:283)
>> ~[!/:?]
>> at
>> org.elasticsearch.client.RestClient.performRequest(RestClient.java:261)
>> ~[!/:?]
>> at
>> org.elasticsearch.client.RestClient.performRequest(RestClient.java:235)
>> ~[!/:?]
>> at
>> org.apache.karaf.decanter.appender.elasticsearch.ElasticsearchAppender.send(ElasticsearchAppender.java:172)
>> ~[!/:?]
>> at
>> org.apache.karaf.decanter.appender.elasticsearch.ElasticsearchAppender.handleEvent(ElasticsearchAppender.java:152)
>> [!/:?]
>> at
>> org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)
>> [!/:?]
>> at
>> org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82)
>> [!/:?]
>> at
>> org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104)
>> [!/:?]
>> at
>> org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:166)
>> [!/:?]
>> at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>> [?:1.8.0_51]
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> [?:1.8.0_51]
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>> [?:1.8.0_51]
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>> [?:1.8.0_51]
>> at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]
>>
>>
>> If the HTTP verb could be set to PUT, seems like it might work based on this:
>> curl -H "Content-Type: application/json" --user batchoi:batchoipwd \
>> -XPOST "http://elasticsearch-vela-1.sit.etrade.com:9200/karafCamelCws
>> <http://elasticsearch-vela-1.sit.etrade.com:9200/karafCamelCws>" -d ‘{
>> "field" : "value"}’
>> {"error":"Incorrect HTTP method for uri [/] and method [POST], allowed:
>> [HEAD, GET, DELETE]","status":405}
>>
>> curl -H "Content-Type: application/json" --user batchoi:batchoipwd \
>> -XPUT "http://elasticsearch-vela-1.sit.etrade.com:9200/karafCamelCws
>> <http://elasticsearch-vela-1.sit.etrade.com:9200/karafCamelCws>" -d ‘{
>> "field" : "value"}’
>> {"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[sitesm111w88m7][10.247.33.25:9300][indices:admin/create]"}],"type":"illegal_argument_exception","reason":"unknown
>> setting [index.field] please check that any required plugins are installed,
>> or check the breaking changes documentation for removed
>> settings"},"status":400}
>>
>