DaemonDisappearedException unless running gradle with "sudo"

Hey all,

I’m trying to use the gradle daemon and have a strange problem. If I run the daemon (currently doing so by putting “org.gradle.daemon=true” in gradle.properties), I get a DaemonDisappearedException when running ANY gradle task, even simple ones like “tasks”. However, if I run it using “sudo” it runs fine. So this seems to be a permissions issue but I’m not sure where to look to find the problem.

Using:

OS X 10.9.2

gradle version 1.11

Here is the console output of running “gradle tasks --info --debug --stacktrace”

https://gist.github.com/djova/ad594da5124372e95c7f

Any ideas?!

Thanks, Dusan

Hi Dusan,

The daemon log probably has the info. According to your gist it is at ‘/Users/djova/.gradle/daemon/1.11/daemon-2067.out.log’. Can you please provide it.

Here’s the daemon log: https://gist.github.com/djova/3f1e63793430efbad8fe

No real info there either.

It’s likely to be something in ‘/Users/djova/.gradle/’. Might be worth just resetting the perms there all the way down.

No good. Tried granting full permissions recursively to that directory. Tried moving it and letting gradle create a brand new one itself. Either way I still get the same exception!

The problem went away when I switched from Java 1.6 to 1.7!