Gradle Daemon does not execute Build on MacOS

I have kind of a strange problem with Gradle daemon on MacOS. When I start a gradle Build (doesn’t matter if 5.5 or 6.0.1) it prints this:

Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details
> IDLE

And then just stays there. From time to time the line with busy daemons is printed again with an increasing number of daemons.

Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details
Starting a Gradle Daemon, 2 busy Daemons could not be reused, use --status for details
Starting a Gradle Daemon, 3 busy Daemons could not be reused, use --status for details
Starting a Gradle Daemon, 4 busy Daemons could not be reused, use --status for details
> IDLE

A gradle --status runs a long time and returns something like this:

PID STATUS   INFO
20347 UNKNOWN  UNKNOWN
22078 UNKNOWN  UNKNOWN
19410 UNKNOWN  UNKNOWN
21208 UNKNOWN  UNKNOWN
22950 UNKNOWN  UNKNOWN

Currently I have no idea, why this isn’t working. It was working a few days ago, with no Java/Gradle/OS update
If you need further information, let me know. Thanks in advance.

Running with --no-parallel and --no-daemon produces this:
./gradlew build --no -parallel --no-daemon --stacktrace
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon:
https://docs.gradle.org/6.0.1/userguide/gradle_daemon.html.

FAILURE: Build failed with an exception.

* What went wrong:
The first result from the daemon was empty. Most likely the process died immediately after connection.

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.launcher.daemon.client.DaemonInitialConnectException: The first result from the daemon was empty. Most likely the process died immediately after connection.
        at org.gradle.launcher.daemon.client.DaemonClient.executeBuild(DaemonClient.java:172)
        at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:55)
        at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:38)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:56)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:212)
        at org.gradle.launcher.cli.DefaultCommandLineActionFactory$ParseAndBuildAction.execute(DefaultCommandLineActionFactory.java:404)
        at org.gradle.launcher.cli.DefaultCommandLineActionFactory$ParseAndBuildAction.execute(DefaultCommandLineActionFactory.java:376)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:38)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23)
        at org.gradle.launcher.cli.DefaultCommandLineActionFactory$WithLogging.execute(DefaultCommandLineActionFactory.java:369)
        at org.gradle.launcher.Main.doAction(Main.java:35)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:31)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:31)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)


* Get more help at https://help.gradle.org

I found out, that when disabling my firewall (ESET) the communication between the Gradle Wrapper Main process and the gradle daemon starts working again.
The workaround is to disable the firewall. I need to clarify this with ESET directly.

2 Likes

Did you contact ESET and did they provide a solution? I am experiencing the same problem, but turning the firewall off completly seems like a bad solution

Sadly the only advice they gave me so far was to switch my firewall to interactive mode and allow the requests coming from the gradle wrapper. Of course this still does not perfectly help here, as everything requesting network access will result in a prompt to either allow or deny it manually and every wrapper uses a different port somewhere around 55000. Currently I just disable my firewall while working with gradle.

I did not find a better solution yet.

1 Like