I'm trying to start Gradle (-bin version from site, 3.1) and every time it fails with "Unable to find a usable idle daemon. I have connected to 100 different daemons but I could not use any of them to run the build." If I turn off firewalld, it works. Something about firewalld is blocking Gradle from connecting to its own daemon. I can't find any information about what port it tries to connect on. I'm assuming it tries to connect via loopback. Is there a way to allow all traffic for the loopback interface? I tried adding the lo interface to the 'trusted' zone, but that didn't work. I am not as familiar with firewalld as I am with iptables, so not sure what to do next.
Asked
Active
Viewed 781 times
1 Answers
0
I discovered the problem. The Gradle daemon does listen on the loopback interface, as I suspected, but it will not allow connections from anything but the loopback interface. The firewalld on this box (which wasn't set up by me) had masquerade enabled for tcp connections to localhost so anything going to localhost appeared to come from the public network interface. I disabled masquerade (which no one was using) with firewall-cmd --remove-masquerade
and it works now.
Solution found here: https://stackoverflow.com/questions/25046319/android-studio-failed-gradle-execution-cause-broken-pipe/32777685#32777685