sonian / elasticsearch-jetty

Apache License 2.0
284 stars 79 forks source link

Not working with elasticsearch 1.4.0 #69

Open devoyster opened 9 years ago

devoyster commented 9 years ago

Latest plugin version (1.2.1) is not working with elasticsearch 1.4.0. There is an error when elasticsearch starts:

{1.4.0}: Initialization Failed ...
1) IllegalArgumentException[argument type mismatch]

Tested on Windows 7 x64, Java 7 Update 55 x64

raja3 commented 9 years ago

I managed to get a version of elasticsearch-jetty working with 1.4.0 by doing the following

use

http.type: com.sonian.elasticsearch.http.jetty.JettyHttpServerTransport

This seems to start elasticsearch with elasticsearch-jetty. I don't use the logging features and did not test that

sandey60 commented 9 years ago

Hi raja3, What did you change the version of the module and elasticsearch in the pom xml. Could you please paste the content with the xml tag. Thanks

raja3 commented 9 years ago

Module version in version tag

 <name>elasticsearch-jetty</name>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.sonian</groupId>
  <artifactId>elasticsearch-jetty</artifactId>
  <version>ssn-1.4.0</version>
  <packaging>jar</packaging>

elasticsearch dependency

  <properties>
    <elasticsearch.version>1.4.0</elasticsearch.version>
    <jetty.version>8.1.14.v20131031</jetty.version>
    <github.global.server>github</github.global.server>
  </properties>
sandey60 commented 9 years ago

Thank you sir I'll give it a shot.

devoyster commented 9 years ago

I'm using elasticsearch-jetty for HTTP digest auth only, and for me change in elasticsearch config alone worked, without any version changes/rebuilds etc. So I've downloaded plugin v1.2.1 and used

http.type: com.sonian.elasticsearch.http.jetty.JettyHttpServerTransport

And that's it - auth works together with ES 1.4.0

sendkb commented 9 years ago

I'm experimenting with ES-1.4 and the jetty plugin and we need the request logs for our use case and are hitting the same illegal argument exception. It is probably because of the backward incompatible change introduced in ES 1.4 [1]. Do you have any plans to fix the jetty issue in the near future. If not any other suggestions would be helpful.

[1] - https://github.com/elasticsearch/elasticsearch/commit/247ff7d80117ee841b3e8296d125df5aad6f0d30

ashishcoolbhargava commented 9 years ago

Hi ,

I want to setup my ELS engine to have a support of the SSL. Can somebody suggest anything for that. i had already tried the modification with jetty

https://github.com/sonian/elasticsearch-jetty

which is not supporting the latest ELS version 1.4.1.

72

i tried with nginx also but not able to configure with windows.

Can anybody suggest anything on that.

ashishcoolbhargava commented 9 years ago

Getting this issue with apache jetty 1.2.1 even i am using the same Transport class.

[2015-02-16 15:48:15,929][INFO ][node ] [copy] version[1.4.2], pid[6844], build[927caff/2014-12-16T14:11:12Z] [2015-02-16 15:48:15,929][INFO ][node ] [copy] initializing ... [2015-02-16 15:48:15,992][INFO ][plugins ] [copy] loaded [xml-1.2.2.1-4f0a0c1, QueryResultCachePlugin, ExtensionPlugin, jetty, jdbc-1 .4.0.5-0774f01], sites [head] [2015-02-16 15:48:19,465][INFO ][node ] [copy] initialized [2015-02-16 15:48:19,465][INFO ][node ] [copy] starting ... [2015-02-16 15:48:19,621][INFO ][transport ] [copy] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.18.58:9 300]} [2015-02-16 15:48:19,761][INFO ][discovery ] [copy] AdvancedSearch/96FeXNAjQaGVB1PVBBoCFQ [2015-02-16 15:48:23,569][INFO ][cluster.service ] [copy] new_master [copy][96FeXNAjQaGVB1PVBBoCFQ][WLW7-ASHISHB][inet[/192.168.18.58:9300]], reason: zen-disco-join (elected_as_master) [2015-02-16 15:48:23,616][ERROR][com.sonian.elasticsearch.http.jetty.JettyHttpServerTransport] [copy] Jetty Startup Failed org.elasticsearch.env.FailedToResolveConfigException: Failed to resolve config path [jetty.xml], tried file path [jetty.xml], path file [D:\Desktop\sh iro\elastic\elasticsearch-1.4.1 - Copy\config\jetty.xml], and classpath at org.elasticsearch.env.Environment.resolveConfig(Environment.java:213) at com.sonian.elasticsearch.http.jetty.JettyHttpServerTransport$1.onPortNumber(JettyHttpServerTransport.java:111) at org.elasticsearch.common.transport.PortsRange.iterate(PortsRange.java:69) at com.sonian.elasticsearch.http.jetty.JettyHttpServerTransport.doStart(JettyHttpServerTransport.java:100) at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) at org.elasticsearch.http.HttpServer.doStart(HttpServer.java:89) at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) at org.elasticsearch.node.internal.InternalNode.start(InternalNode.java:255) at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:122) at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:206) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32) {1.4.2}: Startup Failed ...

gbutt commented 9 years ago

@sendkb I have a fork that fixes the binding errors for FilterHttpServerTransport so you can use that for your request logging. I didn't upgrade jetty in this build so you can probably drop and replace the jar. If you want a cleaner approach then use mvn package to generate the plugin.zip

https://github.com/RallySoftware/elasticsearch-jetty