0

I have built an elasticsearch proxy that works for performing elasticsearch CRUD operations. It seems that when I try to invoke the head plugin via the proxy with the following.

http://localhost:8124/_plugin/head/

I get the following error.

Error: No handler found for uri [/_plugin/head] and method [GET]

When I attempt to invoke the plugin via the regular port 9200 it works with no problems, that is the following...

http://localhost:9200/_plugin/head

There is also a filter that is running as another plugin on elasticsearch, which the request is passed to first. This is invoked regardless of being passed via the proxy or directly to elasticsearch.

The only thing that I could think so far is that it's the headers, because node.js will convert all http headers to lower case. I have tried invoking with same headers via proxy though, and still I get the same error. Alas, I have come here for some possible insight into this problem. Any help is greatly appreciated.

EDIT

So after digging through some of the elasticsearch code it seems that it has something to do with the elasticsearch thrift transport plugin. Actually, It is using the rest controller that is passed in via the constructor on boot up. Still not sure what problem is.

Gary Drocella
  • 337
  • 1
  • 2
  • 11

1 Answers1

0

It turned out to be some kind of bug with the elasticsearch thrift transfer plugin. If you invoke elasticsearch via the thrift service, then it does not recognize the head plugin as a registered handler.

I have gotten around it, by making straight http calls to elasticsearch through the proxy when invoking the plugin.

Gary Drocella
  • 337
  • 1
  • 2
  • 11