[GRADLE-930] SocketException when running buildSrc tests Created: 05/May/10 Updated: 04/Jan/13 Resolved: 24/Nov/10
|Reporter:||Marcus Better||Assignee:||Adam Murdoch|
My tests in buildSrc, using Groovy and TestNG, always fail to run with this exception:
The buildSrc/build.gradle is simple:
There are two test classes in buildSrc/src/test/groovy. They compile correctly but do not seem to run (I think) before the failure.
|Comment by Adam Murdoch [ 05/May/10 ]|
I can't reproduce this. I assume it's something to do with your network configuration. For some reason, the test process cannot connect to the loopback address on your machine. Possibly a firewall issue? I've added some trace to head, to see if we can determine why. Could you try this out with gradle -d?
|Comment by Marcus Better [ 06/May/10 ]|
I should have thought of this earlier, it has to do with the mess with IPv6-mapped IPv4 addresses:
Setting "sysctl net.ipv6.bindv6only=0" fixes it.
Not sure what Gradle is trying to do here, but it looks like it is listening on an IPv6 address (::1) and then trying to connect over IPv4. That will no longer work on Debian squeeze with default settings, and not on some other Unixes either.
|Comment by Adam Murdoch [ 06/May/10 ]|
Thanks for that. I can reproduce it now, with net.ipv6.bindv6only=1
I've pushed a fix to head. Could you try it out (with the default value for net.ipv6.bindv6only)?