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

Permission denied Exception while Running Embedded ElasticSearch #90

Open
neerajjain92 opened this issue May 20, 2019 · 2 comments
Open

Comments

@neerajjain92
Copy link

neerajjain92 commented May 20, 2019

After fixing issue #89, I ended up in this problem. Permission Denied

My EmbeddedElastic configuration is :

@BeforeClass
public static void setup() {
 final EmbeddedElastic embeddedElastic = EmbeddedElastic.builder()
 .withElasticVersion("6.6.0")
 .withSetting(PopularProperties.TRANSPORT_TCP_PORT, "9200")
 .withSetting(PopularProperties.CLUSTER_NAME, "partner_portal_elasticsearch_cluster")
 .withPlugin("analysis-stempel") // Commented this line, with this line permission deined came while installing the plugin
  .build();

     try {
         embeddedElastic.start();
        System.out.println("Embedded Elastic Search instance started................");
     } catch (IOException e) {
         e.printStackTrace();
     } catch (InterruptedException e) {
        e.printStackTrace();
     }
  }

Here is the complete stack-trace.

Exception in thread "EmbeddedElsHandler" pl.allegro.tech.embeddedelasticsearch.EmbeddedElasticsearchStartupException: java.io.IOException: Cannot run program "/var/folders/ql/403xvvqs42v00xlnqgr6d8540000gn/T/embedded-elasticsearch-temp-dir/elasticsearch-6.6.0/bin/elasticsearch": error=13, Permission denied
	at pl.allegro.tech.embeddedelasticsearch.ElasticServer.lambda$startElasticProcess$6(ElasticServer.java:89)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.io.IOException: Cannot run program "/var/folders/ql/403xvvqs42v00xlnqgr6d8540000gn/T/embedded-elasticsearch-temp-dir/elasticsearch-6.6.0/bin/elasticsearch": error=13, Permission denied
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at pl.allegro.tech.embeddedelasticsearch.ElasticServer.lambda$startElasticProcess$6(ElasticServer.java:80)
	... 1 more
Caused by: java.io.IOException: error=13, Permission denied
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	... 3 more

Suspecting the issue is due to : thrau/jarchivelib#72

@johnsonlegend
Copy link

Did you solve it, thanks!

@vivekkanda
Copy link

vivekkanda commented May 12, 2020

Any updates on this issue ?

I am also getting below issue

May 12, 2020 8:40:56 PM org.rauschig.jarchivelib.FileModeMapper$UnixPermissionMapper chmod
WARNING: Could not set file permissions of /var/folders/kz/fm6wl8y57_q19p2z12jcps3w0000gn/T/embedded-elasticsearch-temp-dir/elasticsearch-6.3.0/modules/x-pack/x-pack-ml/platform/darwin-x86_64/lib/libMlCore.dylib. Exception was: null
May 12, 2020 8:40:56 PM org.rauschig.jarchivelib.FileModeMapper$UnixPermissionMapper chmod
WARNING: Could not set file permissions of /var/folders/kz/fm6wl8y57_q19p2z12jcps3w0000gn/T/embedded-elasticsearch-temp-dir/elasticsearch-6.3.0/modules/x-pack/x-pack-ml/platform/darwin-x86_64/lib/libboost_thread-clang-darwin42-mt-1_65_1.dylib. Exception was: null
May 12, 2020 8:40:56 PM org.rauschig.jarchivelib.FileModeMapper$UnixPermissionMapper chmod
WARNING: Could not set file permissions of /var/folders/kz/fm6wl8y57_q19p2z12jcps3w0000gn/T/embedded-elasticsearch-temp-dir/elasticsearch-6.3.0/modules/x-pack/x-pack-ml/platform/darwin-x86_64/lib/libMlModel.dylib. Exception was: null
May 12, 2020 8:40:56 PM org.rauschig.jarchivelib.FileModeMapper$UnixPermissionMapper chmod
WARNING: Could not set file permissions of /var/folders/kz/fm6wl8y57_q19p2z12jcps3w0000gn/T/embedded-elasticsearch-temp-dir/elasticsearch-6.3.0/modules/x-pack/x-pack-ml/platform/darwin-x86_64/lib/libMlMaths.dylib. Exception was: null
May 12, 2020 8:40:56 PM org.rauschig.jarchivelib.FileModeMapper$UnixPermissionMapper chmod
WARNING: Could not set file permissions of /var/folders/kz/fm6wl8y57_q19p2z12jcps3w0000gn/T/embedded-elasticsearch-temp-dir/elasticsearch-6.3.0/modules/x-pack/x-pack-ml/platform/darwin-x86_64/lib/libboost_iostreams-clang-darwin42-mt-1_65_1.dylib. Exception was: null
May 12,

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

No branches or pull requests

3 participants