OSX 10.13.2 (17C60c) - Unable to determine usable IP Address


(Mat Taylor) #1

Gradle does not run due to socket exceptions (octl SIOCGIFNETMASK_IN6 failed) after updating to High Sierra Developer Beta (10.13.2 (17C60c))

* Get more help at https://help.gradle.org
mtaylor-mbp15:ups mtaylor$ ./gradlew bootrun --debug --stacktrace
11:55:35.953 [INFO] [org.gradle.internal.nativeintegration.services.NativeServices] Initialized native services in: /Users/mtaylor/.gradle/native
11:55:36.295 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Executing build b51e666b-6057-4e41-bd14-d5319500c7eb.1 in daemon client {pid=2791}
11:55:36.314 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
11:55:36.314 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
11:55:36.315 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
11:55:36.319 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
11:55:36.319 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Could not determine a usable local IP for this machine.
11:55:36.319 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
11:55:36.319 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is:
11:55:36.321 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] java.lang.RuntimeException: Could not determine a usable local IP for this machine.
11:55:36.321 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.remote.internal.inet.InetAddressFactory.getLocalBindingAddress(InetAddressFactory.java:89)
11:55:36.321 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.cache.internal.FileLockCommunicator.<init>(FileLockCommunicator.java:38)
11:55:36.321 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.getCommunicator(DefaultFileLockContentionHandler.java:153)
11:55:36.321 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.reservePort(DefaultFileLockContentionHandler.java:145)
11:55:36.321 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:85)
11:55:36.321 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:73)
11:55:36.321 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.cache.internal.OnDemandFileAccess.readFile(OnDemandFileAccess.java:36)
11:55:36.321 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.cache.internal.SimpleStateCache.get(SimpleStateCache.java:47)
11:55:36.321 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.cache.internal.FileIntegrityViolationSuppressingPersistentStateCacheDecorator.get(FileIntegrityViolationSuppressingPersistentStateCacheDecorator.java:31)
11:55:36.321 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.registry.PersistentDaemonRegistry.getAll(PersistentDaemonRegistry.java:69)
11:55:36.321 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:112)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:127)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:81)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:281)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:254)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:33)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:247)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:182)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.Main.doAction(Main.java:33)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
11:55:36.322 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at java.lang.reflect.Method.invoke(Method.java:498)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at java.lang.reflect.Method.invoke(Method.java:498)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:31)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.net.SocketException: Operation not permitted (ioctl SIOCGIFNETMASK_IN6 failed)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at java.net.NetworkInterface.getAll(Native Method)
11:55:36.323 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:343)
11:55:36.3

(Jay Graves) #2

This is also happening for me.


(Jay Graves) #3

This has something to do with the Java on OS X. If I set my JAVA_HOME to the Java that comes with Android Studio then Gradle works again.
JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home" ./gradlew list


(Jasmin Börsig) #4

I am not using Android Studio, any suggestions on to what I should set JAVA_HOME?

So far I tried updating the Mac OS Internet Plugin for Java and using that as JAVA_HOME:
For me: /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/

And installing the latest Java version via download from the oracle page and using that as JAVA_HOME:
For me: /Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/

Both did not resolve the problem.

I also updated Gradle with no effect regarding the problem whatsoever.

I am stuck here and as it is I cannot use Gradle at all :confused:


(Stanislav Levental) #5

Experiencing the same problem: using last available gradle 4.4.1. And getting:
java.lang.RuntimeException: Could not determine a usable local IP for this machine.

Caused by:
Caused by: java.net.SocketException: Operation not permitted (ioctl SIOCGIFNETMASK_IN6 failed)

Java:
java version "1.8.0_144"