1
  • I have tried to setup the Magento cloud project using docker desktop preview. And I am using Mac M1 chip.

  • Docker desktop preview installed successfully.

  • Followed magento devdocs for docker setup and get the magento cloud projects successfully.

  • While trying to execute the docker-compose up -d command and elastic search container throws the below error.

Exception in thread "main" java.io.IOException: Cannot run program "/usr/share/elasticsearch/jdk/bin/java": error=0, Failed to exec spawn helper: pid: 240, exit value: 1

at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)

at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)

at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:114)

at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:88)

at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:59)

at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:139)

at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:95)

Caused by: java.io.IOException: error=0, Failed to exec spawn helper: pid: 240, exit value: 1

at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)

at java.base/java.lang.ProcessImpl.(ProcessImpl.java:319)

at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:250)

at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)

0

I had a similar problem, same exception. I used this version docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2 after change version to docker.elastic.co/elasticsearch/elasticsearch:7.12.1 the problem is solved. You can search a docker compose file and change the image version to newer

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.