1

When searching for a possibility to use an Elasticsearch data store as a data source in GeoServer, I found this inofficial plugin.

Its documentation states that you have to clone the Git repository and then build the plugin with Maven via

git clone git@github.com:ngageoint/elasticgeo.git
cd elasticgeo && mvn install

However, this fails on my machine with

Tests run: 193, Failures: 62, Errors: 2, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] elasticgeo ......................................... SUCCESS [  1.120 s]
[INFO] GeoTools Elasticsearch Module ...................... FAILURE [02:11 min]
[INFO] GeoServer Elasticsearch Module ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:13 min
[INFO] Finished at: 2016-01-07T10:35:11+01:00
[INFO] Final Memory: 19M/490M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.                                                             18.1:test (default-test) on project gt-elasticsearch: There are test failures.

Is there anything I could do in order to easily solve the test failures or is there any stable version of this plugin around?

Since the documentation page starts with

Warning

Ensure GeoTools/GeoServer and Elasticsearch versions in the plugin configuration are consistent with your environment

, could this maybe be the reason and if so, in which of the source files would I have to change these settings?


Edit: Following the line

[ERROR] Please refer to D:\tmp\es\elasticgeo\gt-elasticsearch\target\surefire-re                                                             ports for the individual test results.

, the following tests indicate failures:

-------------------------------------------------------------------------------
Test set: mil.nga.giat.data.elasticsearch.ElasticDataStoreFinderTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.998 sec 

<<< FAILURE! - in mil.nga.giat.data.elasticsearch.ElasticDataStoreFinderTest
mil.nga.giat.data.elasticsearch.ElasticDataStoreFinderTest  Time elapsed: 3.998 sec  <<< ERROR!
org.elasticsearch.action.ActionRequestValidationException: Validation Failed: 1: type is missing;

-------------------------------------------------------------------------------
Test set: mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest
-------------------------------------------------------------------------------
Tests run: 37, Failures: 29, Errors: 1, Skipped: 0, Time elapsed: 44.57 sec 

<<< FAILURE! - in mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest
testBBOXFilterWithBBOXType(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.327 sec  <<< FAILURE!
java.lang.AssertionError: expected:<3> but was:<0>

testCountWithIsEqualFilter(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.278 sec  <<< FAILURE!
java.lang.AssertionError: expected:<4> but was:<0>

testScrollHonorsMaxFeatures(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.189 sec  <<< FAILURE!
java.lang.AssertionError: expected:<7> but was:<0>

testGetFeaturesWithIsBetweenFilterOnObjectType(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.136 sec  <<< FAILURE!
java.lang.AssertionError: expected:<5> but was:<0>

testGetFeaturesWithIsNullFilter(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.16 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testCount(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.163 sec  <<< FAILURE!
java.lang.AssertionError: expected:<11> but was:<0>

testGetFeaturesWithIsGreaterThanFilterOnNestedChildType(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.146 sec  <<< FAILURE!
java.lang.AssertionError: expected:<8> but was:<0>

testGetFeaturesWithIsGreaterThanOrEqualToFilter(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.219 sec  <<< FAILURE!
java.lang.AssertionError: expected:<5> but was:<0>

testScrollSizesDoesntChangesOutputSize(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.143 sec  <<< FAILURE!
java.lang.AssertionError: expected:<8> but was:<0>

testCountWithIsNotEqualFilter(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.146 sec  <<< FAILURE!
java.lang.AssertionError: expected:<7> but was:<0>

testScrollEnabledDoesntChangesOutputSize(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.203 sec  <<< FAILURE!
java.lang.AssertionError: expected:<8> but was:<0>

testGetFeaturesWithSort(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.265 sec  <<< FAILURE!
java.lang.AssertionError: expected:<11> but was:<0>

testGetFeaturesWithBetweenFilter(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.138 sec  <<< FAILURE!
java.lang.AssertionError: expected:<9> but was:<0>

testGetFeaturesWithIsGreaterThanFilterOnNestedType(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.143 sec  <<< FAILURE!
java.lang.AssertionError: expected:<8> but was:<0>

testGetFeaturesWithIdFilter(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.166 sec  <<< FAILURE!
java.lang.AssertionError: expected:<2> but was:<0>

testGetFeaturesWithIsLikeFilter(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.169 sec  <<< FAILURE!
java.lang.AssertionError: expected:<11> but was:<0>

testGetFeaturesWithORLogicFilter(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.131 sec  <<< FAILURE!
java.lang.AssertionError: expected:<6> but was:<0>

testGetFeaturesWithQuery(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.281 sec  <<< FAILURE!
java.lang.AssertionError: expected:<8> but was:<0>

testGetFeaturesWithIsBetweenFilterOnNestedType(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.133 sec  <<< FAILURE!
java.lang.AssertionError: expected:<10> but was:<0>

testCountWithOffsetLimit(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.153 sec  <<< FAILURE!
java.lang.AssertionError: expected:<6> but was:<0>

testOnlyStoredFields(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.185 sec  <<< FAILURE!
java.lang.AssertionError: expected:<11> but was:<0>

testGetFeaturesWithLessThanOrEqualToFilter(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.233 sec  <<< FAILURE!
java.lang.AssertionError: expected:<9> but was:<0>

testBounds(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.115 sec  <<< FAILURE!
java.lang.AssertionError: expected:<24> but was:<-1>

testGetFeaturesWithAndLogicFilter(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.169 sec  <<< FAILURE!
java.lang.AssertionError: expected:<3> but was:<0>

testGetFeaturesWithIsGreaterThanFilterOnObjectType(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.116 sec  <<< FAILURE!
java.lang.AssertionError: expected:<6> but was:<0>

testScrollNoSuchElement(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.159 sec  <<< ERROR!
java.lang.Exception: Unexpected exception, expected<java.util.NoSuchElementException> but was<java.lang.AssertionError>

testGetFeaturesWithNOTLogicFilter(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.172 sec  <<< FAILURE!
java.lang.AssertionError: expected:<7> but was:<0>

testScrollTimeDoesntChangesOutputSize(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.154 sec  <<< FAILURE!
java.lang.AssertionError: expected:<8> but was:<0>

testGetFeaturesWithOffsetLimit(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.222 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testOnlySourceFields(mil.nga.giat.data.elasticsearch.ElasticFeatureSourceTest)  Time elapsed: 1.158 sec  <<< FAILURE!
java.lang.AssertionError: expected:<11> but was:<0>

-------------------------------------------------------------------------------
Test set: mil.nga.giat.data.elasticsearch.ElasticGeometryTest
-------------------------------------------------------------------------------
Tests run: 15, Failures: 14, Errors: 0, Skipped: 0, Time elapsed: 32.647 sec

testContainsFilter(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.256 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testAlternateGeometry(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.171 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testClipToWorldFilter(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.314 sec  <<< FAILURE!
java.lang.AssertionError: expected:<7> but was:<0>

testWithinFilter(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.162 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testIntersectsFilter(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.14 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testDisjointFilter(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.133 sec  <<< FAILURE!
java.lang.AssertionError: expected:<2> but was:<0>

testBBOXLimitSplittedFilter(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.182 sec  <<< FAILURE!
java.lang.AssertionError: expected:<11> but was:<0>

testTouchesFilter(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.245 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testOverlapsFilter(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.159 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testDWithinFilter(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.185 sec  <<< FAILURE!
java.lang.AssertionError: expected:<2> but was:<0>

testCrossesFilter(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.136 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testPolygonLimitSplittedFilter(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.182 sec  <<< FAILURE!
java.lang.AssertionError: expected:<11> but was:<0>

testEqualFilter(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.135 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testBeyondFilter(mil.nga.giat.data.elasticsearch.ElasticGeometryTest)  Time elapsed: 2.123 sec  <<< FAILURE!
java.lang.AssertionError: expected:<9> but was:<0>

-------------------------------------------------------------------------------
Test set: mil.nga.giat.data.elasticsearch.ElasticTemporalTest
-------------------------------------------------------------------------------
Tests run: 14, Failures: 14, Errors: 0, Skipped: 0, Time elapsed: 29.831 sec

testEndedBy(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.168 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testCompareDateFilter(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.126 sec  <<< FAILURE!
java.lang.AssertionError: expected:<4> but was:<0>

testEnds(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.13 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testLessDateFilterLong(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.117 sec  <<< FAILURE!
java.lang.AssertionError: expected:<4> but was:<0>

testAfterFilter(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.131 sec  <<< FAILURE!
java.lang.AssertionError: expected:<5> but was:<0>

testBegunBy(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.13 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testAfterInterval(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.108 sec  <<< FAILURE!
java.lang.AssertionError: expected:<4> but was:<0>

testGreaterDateFilterLong(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.127 sec  <<< FAILURE!
java.lang.AssertionError: expected:<7> but was:<0>

testBeforeFilter(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.113 sec  <<< FAILURE!
java.lang.AssertionError: expected:<4> but was:<0>

testTContains(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.14 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testBegins(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.137 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testDuring(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.113 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testBeforeInterval(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.164 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testTEquals(mil.nga.giat.data.elasticsearch.ElasticTemporalTest)  Time elapsed: 2.127 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

-------------------------------------------------------------------------------
Test set: mil.nga.giat.data.elasticsearch.ElasticViewParametersTest
-------------------------------------------------------------------------------
Tests run: 5, Failures: 5, Errors: 0, Skipped: 0, Time elapsed: 10.605 sec

testSinglesQParameters(mil.nga.giat.data.elasticsearch.ElasticViewParametersTest)  Time elapsed: 2.123 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testMultipleFQParameters(mil.nga.giat.data.elasticsearch.ElasticViewParametersTest)  Time elapsed: 2.124 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testSinglesFQParameters(mil.nga.giat.data.elasticsearch.ElasticViewParametersTest)  Time elapsed: 2.125 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testMixQandFQParameters(mil.nga.giat.data.elasticsearch.ElasticViewParametersTest)  Time elapsed: 2.107 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>

testMultipleQParameters(mil.nga.giat.data.elasticsearch.ElasticViewParametersTest)  Time elapsed: 2.126 sec  <<< FAILURE!
java.lang.AssertionError: expected:<2> but was:<0>

Another Edit: Maven-building the plugin works at least under Ubuntu, see the answer below. However, I only get it building with the GeoServer and Elasticsearch versions that are specified by default in the pom.xml file in the repository which are outdated. Changing them to the newest versions (currently: GeoServer 2.8.1, GeoTools 14.1, Elasticsearch 2.1.1) lets the build fail again. Has anybody been able to build this successfully for the most current versions?

  • any clues as to which tests fail? – Ian Turton Jan 7 '16 at 9:42
  • Yes, please see my edit. By the way, I tried this with Cygwin on Windows 7, however, to my understanding this should not make a difference with Java/Maven. – Dirk Jan 7 '16 at 10:18
1

It looks like it could be a Cygwin/Windows 7 issue as the build is fine on my machine (Linux/Oracle JDK 1.8).

I'm a little confused as to why you would use cygwin to control the build, as one of the joys of JAva is it works even on windows (as does Maven).

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] elasticgeo ........................................ SUCCESS [10.671s]
[INFO] GeoTools Elasticsearch Module ..................... SUCCESS [6:20.192s]
[INFO] GeoServer Elasticsearch Module .................... SUCCESS [3:10.696s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9:41.644s
[INFO] Finished at: Thu Jan 07 11:04:30 GMT 2016
[INFO] Final Memory: 45M/287M
[INFO] ------------------------------------------------------------------------
  • Confirmed, I also get it successfully built under Ubuntu. However, building on Windows in a normal console instead of Cygwin does not work either, giving the same errors as described. (I only used Cygwin for convenience because of the nicer looking console :) ). – Dirk Jan 7 '16 at 14:00
0

Following the discussion, it looks like the newest release of the plugin is supposed to be compatible with Elasticsearch v2.2.0. However, meanwhile Elasticsearch v2.3.1 has been released and v5.0.0 is already available as an alpha release, so it would be interesting to know if the plugin is compatible at least with the former (the latter will probably include too many breaking changes).

I did not have the time yet to try it out but if anyone else already did, feedback is much appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.