Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work under macOS due to missing execute bit #29

Open
tgharold opened this issue Sep 14, 2020 · 0 comments
Open

Does not work under macOS due to missing execute bit #29

tgharold opened this issue Sep 14, 2020 · 0 comments

Comments

@tgharold
Copy link

When the elasticsearch.lz4 file is extracted on macOS (and I'd assume Linux) by the ExtractEmbeddedLz4Stream method, it creates the files as -rw-r--r-- (in es/modules/x-pack-ml/platform/darwin-x86_64/bin in the temporary directory).

Because the execute bit is not set on those files, Elasticsearch will fail to start.

I'm not sure whether the problem lies in the LZ4Encoder throwing away the file attributes, or if it's the process of extracting the es.zip via 7z. The attributes are correct in the elasticsearch-7.1.0-windows-x86_64.zip that is being downloaded.

image

Startup error in the console log

Starting Elasticsearch 6.6.1
Extracted jre in 4.37 seconds
Extracted elasticsearch in 4.48 seconds
Environment ready after 4.5168837 seconds
Process started
[2020-09-14T08:30:30,559][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node-es-54933] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: org.elasticsearch.bootstrap.BootstrapException: java.io.IOException: Cannot run program "/var/folders/bw/h0jxn1qs5r7_nsx1166tffdjgk027p/T/af525efecc5147c0858ff60558a8aa0c/es/modules/x-pack-ml/platform/darwin-x86_64/bin/controller": error=13, Permission denied
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.6.1.jar:6.6.1]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.6.1.jar:6.6.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.6.1.jar:6.6.1]
Caused by: org.elasticsearch.bootstrap.BootstrapException: java.io.IOException: Cannot run program "/var/folders/bw/h0jxn1qs5r7_nsx1166tffdjgk027p/T/af525efecc5147c0858ff60558a8aa0c/es/modules/x-pack-ml/platform/darwin-x86_64/bin/controller": error=13, Permission denied
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:167) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.6.1.jar:6.6.1]
        ... 6 more
Caused by: java.io.IOException: Cannot run program "/var/folders/bw/h0jxn1qs5r7_nsx1166tffdjgk027p/T/af525efecc5147c0858ff60558a8aa0c/es/modules/x-pack-ml/platform/darwin-x86_64/bin/controller": error=13, Permission denied
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) ~[?:1.8.0_77]
        at org.elasticsearch.bootstrap.Spawner.spawnNativeController(Spawner.java:118) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.bootstrap.Spawner.spawnNativeControllers(Spawner.java:86) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:165) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.6.1.jar:6.6.1]
        ... 6 more
Caused by: java.io.IOException: error=13, Permission denied
        at java.lang.UNIXProcess.forkAndExec(Native Method) ~[?:1.8.0_77]
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:248) ~[?:1.8.0_77]
        at java.lang.ProcessImpl.start(ProcessImpl.java:134) ~[?:1.8.0_77]
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ~[?:1.8.0_77]
        at org.elasticsearch.bootstrap.Spawner.spawnNativeController(Spawner.java:118) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.bootstrap.Spawner.spawnNativeControllers(Spawner.java:86) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:165) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.6.1.jar:6.6.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.6.1.jar:6.6.1]
        ... 6 more

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

No branches or pull requests

1 participant