Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

Support elastic search7 travis fix - support platforms. #98

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

pablotdl
Copy link

Added support for downloading the platform specific versions of elasticsearch listed at https://www.elastic.co/downloads/elasticsearch.

This should complement the work by @eynand and @bekihm. Let's see what travis says.

@pablotdl pablotdl mentioned this pull request Apr 10, 2020
Copy link

@bekihm bekihm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added just two remarks on the code.

return false;
}
String esV = jsonNode.get("version").get("number").asText();
return Integer.parseInt(esV.substring(0,1)) >= 7; //if version is 7 and above
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens with elasticsearch version above 9? Can we use split with '.' sign to use the structure of the version number?


EmbeddedElastic.Builder baseEmbeddedElastic() {
return EmbeddedElastic.builder()
.withElasticVersion("6.3.0")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use here an older elasticsearch version for the tests?

@pablotdl
Copy link
Author

Applied both suggestions @bekihm , thanks!

Copy link

@bekihm bekihm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@bekihm
Copy link

bekihm commented Apr 20, 2020

Exception in thread "ElsInstanceCleaner" java.lang.RuntimeException: pl.allegro.tech.embeddedelasticsearch.EmbeddedElasticsearchStartupException: Could not delete data directory of embedded elasticsearch server. Possibly an instance is running.

@pablotdl Had travis temporarily problems to run the build?

@pablotdl
Copy link
Author

Looks like a problem with an ES plugin

@pablotdl
Copy link
Author

Indeed, the discovery-file plugin is removed in 7.3, let's see if another one makes the trick.

Copy link

@bekihm bekihm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that the alternative plugin has done the job 👍

@pablotdl
Copy link
Author

Yep, hope it gets merged now.

1 similar comment
@pablotdl
Copy link
Author

Yep, hope it gets merged now.

@vojtapol
Copy link

vojtapol commented May 2, 2020

This PR is broken for 6.4.3, looks like the startup fails because of file system permissions:

2020-05-02 11:28:36 [     main] .e.ElasticSearchInstaller: Installing Elasticsearch into /var/folders/fv/t18bf1dx3pddjnxhrpcwt2yc0000gn/T/embedded-elasticsearch-temp-dir... 
2020-05-02 11:28:38 [     main] .e.ElasticSearchInstaller: Done 
2020-05-02 11:28:38 [     main]     p.a.t.e.ElasticServer: Waiting for ElasticSearch to start... 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: [2020-05-02T11:28:39,269][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: org.elasticsearch.bootstrap.StartupException: org.elasticsearch.bootstrap.BootstrapException: java.io.IOException: Cannot run program "/var/folders/fv/t18bf1dx3pddjnxhrpcwt2yc0000gn/T/embedded-elasticsearch-temp-dir/elasticsearch-6.4.3/modules/x-pack-ml/platform/darwin-x86_64/bin/controller": error=13, Permission denied 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:140) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: Caused by: org.elasticsearch.bootstrap.BootstrapException: java.io.IOException: Cannot run program "/var/folders/fv/t18bf1dx3pddjnxhrpcwt2yc0000gn/T/embedded-elasticsearch-temp-dir/elasticsearch-6.4.3/modules/x-pack-ml/platform/darwin-x86_64/bin/controller": error=13, Permission denied 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:168) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	... 6 more 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: Caused by: java.io.IOException: Cannot run program "/var/folders/fv/t18bf1dx3pddjnxhrpcwt2yc0000gn/T/embedded-elasticsearch-temp-dir/elasticsearch-6.4.3/modules/x-pack-ml/platform/darwin-x86_64/bin/controller": error=13, Permission denied 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) ~[?:1.8.0_242] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Spawner.spawnNativeController(Spawner.java:118) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Spawner.spawnNativeControllers(Spawner.java:86) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:166) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	... 6 more 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: Caused by: java.io.IOException: error=13, Permission denied 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at java.lang.UNIXProcess.forkAndExec(Native Method) ~[?:1.8.0_242] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247) ~[?:1.8.0_242] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at java.lang.ProcessImpl.start(ProcessImpl.java:134) ~[?:1.8.0_242] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ~[?:1.8.0_242] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Spawner.spawnNativeController(Spawner.java:118) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Spawner.spawnNativeControllers(Spawner.java:86) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:166) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.4.3.jar:6.4.3] 
2020-05-02 11:28:39 [lsHandler]     p.a.t.e.ElasticServer: 	... 6 more 

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants