Google Groups

Re: Advanced Configuration for es-jetty


imotov Apr 27, 2012 5:34 PM
Posted in group: elasticsearch-jetty
Do you still have an issue, or the issue was caused by MD5 instead of OBF?

On Friday, April 27, 2012 10:46:44 AM UTC-4, Pulkit Singhal wrote:
https://github.com/sonian/elasticsearch-jetty/issues/22

On Fri, Apr 27, 2012 at 9:37 AM, Pulkit Singhal <pulkit...@gmail.com> wrote:
With the realm.properties, keystore.jks, jetty.xml, jetty-ssl.xml in place ... and the http.type, sonian.elasticsearch.http.jetty.config, and other settings in elasticsearch.yml  ... the server just spits out:
====
WARNING: ElasticSearch may have failed to start.
====

The logs don't have much more than:
====
[2012-04-27 14:31:15,276][INFO ][node                     ] [Patriot I] {0.19.0.RC4-SNAPSHOT}[19402]: initializing ...
[2012-04-27 14:31:15,289][INFO ][plugins                  ] [Patriot I] loaded [jetty, river-couchdb], sites [head]
====

Can anyone offer some suggestion on how to get more debug info and proceed forward?


On Fri, Apr 27, 2012 at 9:07 AM, Pulkit Singhal <pulkit...@gmail.com> wrote:
Re-pasting the chunk for Q1:
====
447 # Jetty Settings
448 sonian.elasticsearch.http.jetty:
449     port: XXXX
450     ssl_port: XXXX
451     keystore_password: "blah"
452     config: jetty.xml,jetty-ssl.xml
====


On Fri, Apr 27, 2012 at 9:04 AM, Pulkit Singhal <pulkit...@gmail.com> wrote:
Found it! Silly me:
====
371     # Filter should use netty instead of jetty (default)
372     #transport_type": "netty"
====

Another follow-up Q that is based in my ignorance of Jetty + the plugin alike:

Q1: Does the following line have to be uncommented for jetty-ssl.xml to be picked up?
====
461 #    config: jetty.xml,jetty-ssl.xml
====

Q2: Or is it simply enough for jetty-ssl.xml to be present in the config directory?


On Fri, Apr 27, 2012 at 7:34 AM, Pulkit Singhal <pulkit...@gmail.com> wrote:
Thank you for the awesome explanation. Its a lot clearer to me now.

I suppose that sicne FilterHttpTransportModule wraps JettyHttpServerTransportModule by default, I didn't see a configuration setting for it anywhere that would setup this relationship. If I had seen a commented out version of it, I might have caught on sooner ... though I doubt it :p


On Thu, Apr 26, 2012 at 11:58 AM, imotov <imo...@gmail.com> wrote:
The http.type parameter in elasticsearch.yml defines which http transport should be used to process http requests. The default transport that comes with elasticsearch is netty. The elasticsearch-jetty plugin adds two additional options: JettyHttpServerTransportModule and FilterHttpTransportModule. 

JettyHttpServerTransportModule wraps jetty server and allows elasticsearch to use it as HttpServerTransport. As you know, the jetty server by itself doesn't know how to process any requests - it needs to be configured. By default, JettyHttpServerTransportModule configures jetty using the jetty.xml file. The supplied jetty.xml file contains the following stack of handlers:

GzipHandler (from jetty - handles gzip compression)
  RestConstraintSecurityHandler (from elasticsearch-jetty - handles authorization)
    JettyHttpServerTransportHandler (from elasticsearch-jetty - dispatches http requests to elasticsearch)

Jetty handles http requests and passes them to the top handler in the stack. Each handler processes requests and then passes them to the underlying handler. When requests reach JettyHttpServerTransportHandler, it dispatches them to elasticsearch. 

FilterHttpTransportModule wraps another HttpServerTransport. It can wrap JettyHttpServerTransportModule (that's used by default) or NettyHttpServerTransportModule. Wrapping underlying HttpServerTransport allows us to intercept http requests after they are parsed but before they are dispatched to elaticsearch, and pass them through a series of filters. FilterHttpTransportModule accepts a stack of filters defined in the sonian.elasticsearch.http.filter parameter in elasticsearch.yml file. We are using several filters in our deployment including logging filter (LoggingFilterHttpServerAdapter) that logs all http requests sent to elasticsearch.


On Thursday, April 26, 2012 8:56:37 AM UTC-4, Pulkit Singhal wrote:
@imotov - BCC'ed you since you aren't on the list yet :)

Question:
It may just be my ignorance of Jetty (though I have tried to fill the gap) but based on the REAME on github, it seems that the JettyHttpServerTransportModule is supposed to go hand in hand with JettyHttpServerTransportHandler.

But in the files provided for the advanced configuration:
config/elasticsearch.yml
config/jetty.xml
... it is the FilterHttpTransportModule (yml file)which is being configured with the JettyHttpServerTransportHandler (xml file).

Is this intended? I suppose I simply don't understand the similarities and differences between JettyHttpServerTransport and FilterHttpTransportModule ... could you elaborate? Which of these two is a subset of the other? And which one is the superset in terms of functionality and features? Is there any thing that only one of them does and the other doesn't?

Thanks!

--
You received this message because you are subscribed to the Google Groups "elasticsearch-jetty" group.
To view this discussion on the web visit https://groups.google.com/d/msg/elasticsearch-jetty/-/ZRd5ezxHYPAJ.
To post to this group, send email to elasticse...@googlegroups.com.
To unsubscribe from this group, send email to elasticsearch-jetty+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/elasticsearch-jetty?hl=en.