TestProject Forum

Docker Agent cannot be initialized because of a specific Error

When mounting a Volume or at least trying to do it so right from here > https://hub.docker.com/r/testproject/agent

By using the following command:

docker run --name testproject-agent \
    -e TP_API_KEY="REPLACE_WITH_YOUR_KEY" \
    -e TP_AGENT_ALIAS="My First Agent" \
    -v </path/to/host/folder>:/var/testproject/agent \
    testproject/agent:latest

I’m getting the following error:

    2021-04-23 20:24:16.709 [INFO ] i.t.a.Program                            *** AGENT - START ***
2021-04-23 20:24:18.846 [INFO ] i.t.a.h                                  TestProject Agent 2.1.1 (b9872de53) on Linux
This command is not for general use and should only be run as the result of a call to
2021-04-23 20:24:18.999 [ERROR] i.t.a.m.c.b                              Failed to determine user type
java.io.IOException: Cannot run program "whoami": error=0, Failed to exec spawn helper.
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at java.base/java.lang.Runtime.exec(Runtime.java:589)
	at java.base/java.lang.Runtime.exec(Runtime.java:413)
	at java.base/java.lang.Runtime.exec(Runtime.java:310)
	at io.testproject.agent.managers.c.b.getAccountType(TestProjectAgent:137)
	at io.testproject.agent.h.f(TestProjectAgent:209)
	at io.testproject.agent.e.b.a.v.a(TestProjectAgent:71)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at io.testproject.agent.c.d.run(TestProjectAgent:33)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.io.IOException: error=0, Failed to exec spawn helper.
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:319)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:250)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	... 13 common frames omitted
This command is not for general use and should only be run as the result of a call to
2021-04-23 20:24:19.033 [ERROR] i.t.a.m.c.b                              Failed to determine user type
java.io.IOException: Cannot run program "whoami": error=0, Failed to exec spawn helper.
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at java.base/java.lang.Runtime.exec(Runtime.java:589)
	at java.base/java.lang.Runtime.exec(Runtime.java:413)
	at java.base/java.lang.Runtime.exec(Runtime.java:310)
	at io.testproject.agent.managers.c.b.getAccountType(TestProjectAgent:137)
	at io.testproject.agent.managers.c.b.hasAdminPrivileges(TestProjectAgent:156)
	at io.testproject.agent.h.f(TestProjectAgent:210)
	at io.testproject.agent.e.b.a.v.a(TestProjectAgent:71)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at io.testproject.agent.c.d.run(TestProjectAgent:33)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.io.IOException: error=0, Failed to exec spawn helper.
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:319)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:250)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	... 14 common frames omitted

Can you please help me out?
Thx in advance!

Hello,
I just test it on my local environment and all seems work fine.
From the error Cannot run program "whoami" , any chance You do not have insufficient permissions?
Please try as following (with sudo) :

mkdir my-agent ; cd my-agent
sudo docker run --name testproject-agent \
    -e TP_API_KEY="REPLACE_WITH_YOUR_KEY" \
    -e TP_AGENT_ALIAS="My First Agent" \
    -v $PWD:/var/testproject/agent \
    testproject/agent:latest

If You still have a problem, please provide the Linux distribution You use.
Thank You!

Hi,

I am also seeing the same error as mentioned in the ticket. @gershon.alvais1 tried the solution you provided, no luck with that as well.
I am using linux/amd64/v8.

Please see the below log:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Using Agent Alias: My Docker Agent
Obtained execution configuration for Agent: My Docker Agent
2021-05-05 08:08:07.112 [INFO ] i.t.a.Program                            *** AGENT - START ***
2021-05-05 08:08:07.967 [INFO ] i.t.a.h                                  TestProject Agent 2.2.1 (0922f1b7d) on Linux
This command is not for general use and should only be run as the result of a call to
2021-05-05 08:08:08.058 [ERROR] i.t.a.m.c.b                              Failed to determine user type
java.io.IOException: Cannot run program "whoami": error=0, Failed to exec spawn helper.
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at java.base/java.lang.Runtime.exec(Runtime.java:589)
	at java.base/java.lang.Runtime.exec(Runtime.java:413)
	at java.base/java.lang.Runtime.exec(Runtime.java:310)
	at io.testproject.agent.managers.c.b.getAccountType(TestProjectAgent:137)
	at io.testproject.agent.h.e(TestProjectAgent:204)
	at io.testproject.agent.e.b.a.w.a(TestProjectAgent:71)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at io.testproject.agent.c.d.run(TestProjectAgent:33)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.io.IOException: error=0, Failed to exec spawn helper.
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:319)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:250)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	... 13 common frames omitted
This command is not for general use and should only be run as the result of a call to
2021-05-05 08:08:08.076 [ERROR] i.t.a.m.c.b                              Failed to determine user type
java.io.IOException: Cannot run program "whoami": error=0, Failed to exec spawn helper.
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at java.base/java.lang.Runtime.exec(Runtime.java:589)
	at java.base/java.lang.Runtime.exec(Runtime.java:413)
	at java.base/java.lang.Runtime.exec(Runtime.java:310)
	at io.testproject.agent.managers.c.b.getAccountType(TestProjectAgent:137)
	at io.testproject.agent.managers.c.b.hasAdminPrivileges(TestProjectAgent:156)
	at io.testproject.agent.h.e(TestProjectAgent:205)
	at io.testproject.agent.e.b.a.w.a(TestProjectAgent:71)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at io.testproject.agent.c.d.run(TestProjectAgent:33)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.io.IOException: error=0, Failed to exec spawn helper.
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:319)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:250)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	... 14 common frames omitted
2021-05-05 08:08:08.079 [INFO ] i.t.a.h                                  Running under user agent (/home/agent) of type Unknown with Guest privileges
2021-05-05 08:08:08.080 [INFO ] i.t.a.h                                  Running inside docker ef12e833e904
2021-05-05 08:08:08.122 [INFO ] i.t.a.h                                  No X11 available - headless mode.
2021-05-05 08:08:08.133 [INFO ] i.t.a.s.IdentityManager                  No identity file was found - Agent is not registered
2021-05-05 08:08:08.142 [INFO ] i.t.a.h                                  Working folder: /opt/testproject/agent
2021-05-05 08:08:08.142 [INFO ] i.t.a.h                                  Data folder: /var/testproject/agent
This command is not for general use and should only be run as the result of a call to
2021-05-05 08:08:08.155 [ERROR] i.t.a.m.c.b                              Failed to determine user type
java.io.IOException: Cannot run program "whoami": error=0, Failed to exec spawn helper.
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at java.base/java.lang.Runtime.exec(Runtime.java:589)
	at java.base/java.lang.Runtime.exec(Runtime.java:413)
	at java.base/java.lang.Runtime.exec(Runtime.java:310)
	at io.testproject.agent.managers.c.b.getAccountType(TestProjectAgent:137)
	at io.testproject.agent.h.e(TestProjectAgent:3392)
	at io.testproject.agent.e.b.a.w.a(TestProjectAgent:71)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at io.testproject.agent.c.d.run(TestProjectAgent:33)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.io.IOException: error=0, Failed to exec spawn helper.
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:319)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:250)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	... 13 common frames omitted
2021-05-05 08:08:08.163 [INFO ] i.t.a.h                                  Agent IP addresses: 
2021-05-05 08:08:09.608 [INFO ] i.t.a.m.f.l                              No Android SDK found
2021-05-05 08:08:09.625 [INFO ] i.t.a.i.l                                Waiting a bit for IOS Wrapper to come up...
This command is not for general use and should only be run as the result of a call to
This command is not for general use and should only be run as the result of a call to
2021-05-05 08:08:20.112 [WARN ] i.t.a.m.c.a                              Failed to inspect .NET Core version: (Cannot run program "dotnet": error=0, Failed to exec spawn helper.)
2021-05-05 08:08:20.118 [INFO ] i.t.a.m.c.a                              Running in docker - ADB version querying will be skipped.
2021-05-05 08:08:20.119 [INFO ] i.t.a.m.c.a                              Detected Java [13-ea]
2021-05-05 08:08:20.129 [INFO ] i.t.a.m.c.b                              Searching for installed browsers...
This command is not for general use and should only be run as the result of a call to
2021-05-05 08:08:20.158 [WARN ] i.t.a.g.k                                Failed to run the command '[which, google-chrome]': Cannot run program "which": error=0, Failed to exec spawn helper.
This command is not for general use and should only be run as the result of a call to
2021-05-05 08:08:20.171 [WARN ] i.t.a.g.k                                Failed to run the command '[which, google-chrome-stable]': Cannot run program "which": error=0, Failed to exec spawn helper.
This command is not for general use and should only be run as the result of a call to
2021-05-05 08:08:20.183 [WARN ] i.t.a.g.k                                Failed to run the command '[which, firefox]': Cannot run program "which": error=0, Failed to exec spawn helper.
2021-05-05 08:08:20.184 [INFO ] i.t.a.m.c.b                              Finished detecting installed browsers.
2021-05-05 08:08:20.187 [INFO ] i.t.a.m.c.a                              Running in docker - drivers detection will be skipped.
2021-05-05 08:08:20.442 [INFO ] i.t.a.m.b                                Starting gRPC Server on port localhost:36173
2021-05-05 08:08:21.281 [INFO ] i.t.a.m.O                                Runtime information saved
2021-05-05 08:08:21.284 [INFO ] i.t.a.h                                  Agent initialization is complete.
2021-05-05 08:08:21.289 [INFO ] i.t.a.s.IdentityManager                  No identity file was found - Agent is not registered
2021-05-05 08:08:21.321 [INFO ] i.t.a.m.f.k                              Appium server executable not found, assuming mobile components are not installed.
2021-05-05 08:08:21.323 [ERROR] i.t.a.m.x                                [Alert Message] - Mobile recording session can not be started because Appium failed to start.
Your Antivirus or malware protection software might be blocking it, turn it off and try again.
If this problem persists, please contact TestProject support.
2021-05-05 08:08:21.326 [INFO ] i.t.a.w.b                                Starting Web Server...
2021-05-05 08:08:21.326 [INFO ] i.t.a.w.b                                Starting internal web server...
2021-05-05 08:08:21.364 [INFO ] i.t.a.m.K                                Checking Agent's connectivity with the outside world...
2021-05-05 08:08:24.364 [INFO ] i.t.a.m.K                                Connection established successfully.
2021-05-05 08:08:24.368 [INFO ] i.t.a.e.a.a.k                            Direct connection (no proxy) is possible.
2021-05-05 08:08:24.369 [INFO ] i.t.a.e.a.a.k                            External connectivity is possible, proceeding to Authentication...
2021-05-05 08:08:24.378 [INFO ] i.t.a.e.a.a.a                            Trying to load Agent remote identity...
2021-05-05 08:08:24.379 [INFO ] i.t.a.s.IdentityManager                  No identity file was found - Agent is not registered
2021-05-05 08:08:24.387 [INFO ] i.t.a.e.a.a.a                            Checking if configuration passed via environment variable is present...
2021-05-05 08:08:24.388 [INFO ] i.t.a.e.a.a.a                            Trying to register with configuration provided...
2021-05-05 08:08:24.390 [INFO ] i.t.a.e.a.a.a                            Registering agent with configuration
2021-05-05 08:08:24.488 [INFO ] i.t.a.b.b.g                              Connecting TestProject servers...
2021-05-05 08:08:24.490 [INFO ] i.t.a.m.K                                Checking Agent's connectivity with the outside world...
2021-05-05 08:08:27.159 [INFO ] i.t.a.w.b                                Web server started on http://localhost:8585
2021-05-05 08:08:30.623 [INFO ] i.t.a.m.K                                Connection established successfully.
2021-05-05 08:08:30.623 [INFO ] i.t.a.b.b.g                              Registering Agent...
2021-05-05 08:08:30.623 [INFO ] i.t.a.b.b.g                              Preparing to send registration request to host https://api.testproject.io/
2021-05-05 08:08:30.643 [INFO ] i.t.a.b.b.g                              Sending registration request to https://api.testproject.io/agents/registration/agents
2021-05-05 08:08:32.019 [INFO ] i.t.a.b.a.d                              POST https://api.testproject.io/agents/registration/agents - 200 (9d9FGOnd): No Message
2021-05-05 08:08:32.023 [INFO ] i.t.a.b.b.g                              Registration request succeeded.
2021-05-05 08:08:32.208 [INFO ] i.t.a.m.L                                Registered successfully
2021-05-05 08:08:32.367 [INFO ] i.t.a.s.IdentityManager                  Agent identity has been saved
2021-05-05 08:08:32.432 [INFO ] i.t.a.e.a.a.a                            Agent is registered as [My Docker Agent] (d2FVoyzlM0mCZp-iPr9Isg), proceeding to authentication...
2021-05-05 08:08:32.440 [INFO ] i.t.a.e.a.a.a                            Authenticating with TestProject...
2021-05-05 08:08:32.446 [INFO ] i.t.a.s.c                                Requesting authenticating token...
2021-05-05 08:08:33.656 [INFO ] i.t.a.s.c                                Authenticated successfully
2021-05-05 08:08:33.695 [INFO ] i.t.a.e.a.a.h                            Starting Signal...
2021-05-05 08:08:36.938 [INFO ] i.t.a.b.c.a                              Signal connected, awaiting authentication result...
2021-05-05 08:08:36.958 [INFO ] i.t.a.b.c.a                              Sent empty Session ID
2021-05-05 08:08:38.275 [INFO ] i.t.a.b.c.a                              Signal authentication finished
2021-05-05 08:08:38.298 [INFO ] i.t.a.b.c.a                              Connection Session ID: TMEdDIH8T
2021-05-05 08:08:38.300 [INFO ] i.t.a.b.c.a                              Signal authorized
2021-05-05 08:08:39.949 [INFO ] i.t.a.b.a.d                              POST https://api.testproject.io/api/v1/agent/certificate - 200 (1wlleZGw): No Message
2021-05-05 08:08:40.521 [INFO ] i.t.a.w.b                                Added SSL connector
2021-05-05 08:08:40.523 [INFO ] i.t.a.s.IdentityManager                  Requesting remote identity...
2021-05-05 08:08:42.281 [INFO ] i.t.a.b.a.d                              GET https://api.testproject.io/api/v1/agent - 200 (d9zvQjUv): No Message
2021-05-05 08:08:42.340 [WARN ] i.t.a.s.IdentityManager                  Latest version is unknown, Agent might be outdated
2021-05-05 08:08:42.351 [INFO ] i.t.a.s.IdentityManager                  Agent identity has been saved
2021-05-05 08:08:42.352 [INFO ] i.t.a.e.a.a.d                            Account plan: Free
2021-05-05 08:08:42.353 [INFO ] i.t.a.h                                  Refreshing & reporting capabilities...
This command is not for general use and should only be run as the result of a call to
2021-05-05 08:08:42.379 [WARN ] i.t.a.m.c.a                              Failed to inspect .NET Core version: (Cannot run program "dotnet": error=0, Failed to exec spawn helper.)
2021-05-05 08:08:42.380 [INFO ] i.t.a.m.c.a                              Running in docker - ADB version querying will be skipped.
2021-05-05 08:08:42.381 [INFO ] i.t.a.m.c.a                              Detected Java [13-ea]
2021-05-05 08:08:42.381 [INFO ] i.t.a.m.c.a                              Running in docker - drivers detection will be skipped.
2021-05-05 08:08:42.829 [INFO ] i.t.a.b.a.d                              POST https://api.testproject.io/api/v1/agent/capabilities - 200 (w2n6YBCx): Capabilities were received
2021-05-05 08:08:42.834 [INFO ] i.t.a.m.f.l                              No Android SDK found
2021-05-05 08:08:42.836 [INFO ] i.t.a.i.l                                Waiting a bit for IOS Wrapper to come up...
2021-05-05 08:08:52.907 [INFO ] i.t.a.b.b.c                              Reporting state: Idle
2021-05-05 08:09:03.272 [INFO ] i.t.a.m.A                                Reported Agent state and got response - [Agent Version: 2.2.1]
2021-05-05 08:09:03.307 [INFO ] i.t.a.m.d.p                              Report uploading manager started.

Thank you!!

Hello @shivam .
You are right. Here is some problem to run our agent on M1.
We aware of that and working to resolve this issue.
Thank’s.

Hi @gershon.alvais1 ,

Thanks for the update. Is there any ETA on the fixes? if not, how will I get to know if the fixes are live?

Hi @shivam

Please add an environment variable to your Docker container:

JAVA_OPTS

And set it to:

jdk.lang.Process.launchMechanism=vfork

This is a temporary workaround until we will have a permanent solution for Agent running in Docker on M1 machines.

Hi @marat ,

Thanks for the workaround. I am working on docker for first time, so could you please help me to what’s the error I am making here. I tried implementing above solution.

shivam@Shivams-MacBook-Pro docker-agent % docker run --name testproject-agent \
    -e TP_API_KEY="API_KEY" \
    -e JAVA_OPTS = 'jdk.lang.Process.launchMechanism=vfork' \
    -e TP_AGENT_ALIAS="My Docker Agent" \
    -v $PWD:/var/testproject/agent \
    testproject/agent:latest
docker: invalid reference format.

Please remove the spaces after JAVA_OPTS and after the =

docker run --name testproject-agent \
    -e TP_API_KEY="API_KEY" \
    -e JAVA_OPTS='jdk.lang.Process.launchMechanism=vfork' \
    -e TP_AGENT_ALIAS="My Docker Agent" \
    -v $PWD:/var/testproject/agent \
    testproject/agent:latest

Thanks for all the help. My docker agent is now able to start.
But I am still seeing the same error as I initially mentioned and also docker is not able to setup Agent IP address.

You are still seeing Failed to exec spawn helper.?
Can you please collect your docker container logs and send them to support@testproject.io ?

Yes, i am still seeing Failed to exec spawn helper.
Sent the logs to above mail.

This means that the JAVA_OPTS are not taken into an account.
Not sure if it matters, but please try using double quotes instead of single quotes:
-e JAVA_OPTS="jdk.lang.Process.launchMechanism=vfork" \
I will check this on M1 machine and get back to you ASAP.

Double quotes doesn’t help as well!!

Thanks for checking that, we will release a fix next week and let you know.

That would be great.
Thank You!!

Any updates on this?

HI @marat ,

Any ETA on mac M1 fixes?

Thanks

@shivam Hello,
I did another test on the M1. Below is an exact format. Please update me if there is still a problem.
Thanks

docker run --name testproject-agent \
    -e TP_API_KEY="MY KEY HERE" \
    -e JAVA_OPTS="-Djdk.lang.Process.launchMechanism=vfork" \
    -e TP_AGENT_ALIAS="My First Agent" \
    -v $PWD:/var/testproject/agent \
    testproject/agent:latest

@gershon.alvais1 hi,

this totally works. Thank you!!

With this done, how can I setup docker-compose.yml for my M1. I tried adding the JAVA_OPTS as mentioned above in the environment section of agent, but that does not solves the issue.

version: "3.8"
services:
  testproject-agent-1:
    image: testproject/agent:latest
    container_name: testproject-agent-1
    depends_on:
      - chrome
      - firefox
    environment:
      TP_API_KEY: "api key"
      JAVA_OPTS: "-Djdk.lang.rocess:.launchMechanism=vfork"
      TP_SDK_PORT: "8686"             # Agent will listen on port 8686 for SDK connections
      CHROME: "chrome:4444"           # Address for Agent to communicate with Chrome browser
      CHROME_EXT: "localhost:5555"    # Address for accessing the Chrome Selenium server
      FIREFOX: "firefox:4444"         # Address for Agent to communicate with Firefox browser
      FIREFOX_EXT: "localhost:5556"   # Address for accessing the Firefox Selenium server
    ports:
      - "8585:8585"
      - "8686:8686"                     # Expose port for SDK<->Agent communication

@shivam Is that a typo ?

"-Djdk.lang.rocess:.launchMechanism=vfork"

instead of:

-Djdk.lang.Process.launchMechanism=vfork