Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradle not working on Bash on Ubuntu on Windows #2189

Closed
JesseBoulard opened this issue Jun 4, 2017 · 6 comments
Closed

gradle not working on Bash on Ubuntu on Windows #2189

JesseBoulard opened this issue Jun 4, 2017 · 6 comments

Comments

@JesseBoulard
Copy link

JesseBoulard commented Jun 4, 2017

Trying to run gradle on bash on Ubuntu on Windows has been a nightmare, wasting dozens of hours trying to find a workaround. I just reinstalled BoUoW today and installed java and gradle with sdkman. Here's the error with stacktrace:

jesse@DESKTOP-LNO2BVT:~/.sdkman/candidates/gradle/current/bin$ gradle init --stacktrace

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine a usable local IP for this machine.

  • Try:
    Run with --info or --debug option to get more log output.

  • Exception is:
    java.lang.RuntimeException: Could not determine a usable local IP for this machine.
    at org.gradle.internal.remote.internal.inet.InetAddressFactory.getLocalBindingAddress(InetAddressFactory.java:89)
    at org.gradle.cache.internal.FileLockCommunicator.(FileLockCommunicator.java:38)
    at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.getCommunicator(DefaultFileLockContentionHandler.java:153)
    at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.reservePort(DefaultFileLockContentionHandler.java:145)
    at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:85)
    at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:73)
    at org.gradle.cache.internal.OnDemandFileAccess.readFile(OnDemandFileAccess.java:36)
    at org.gradle.cache.internal.SimpleStateCache.get(SimpleStateCache.java:47)
    at org.gradle.cache.internal.FileIntegrityViolationSuppressingPersistentStateCacheDecorator.get(FileIntegrityViolationSuppressingPersistentStateCacheDecorator.java:31)
    at org.gradle.launcher.daemon.registry.PersistentDaemonRegistry.getAll(PersistentDaemonRegistry.java:69)
    at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:112)
    at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:127)
    at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:81)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:281)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:254)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:33)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:247)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:182)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    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:23)
    Caused by: java.net.SocketException: Cannot assign requested address (ioctl SIOCGIFNETMASK failed)
    at java.net.NetworkInterface.getAll(Native Method)
    at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:343)
    at org.gradle.internal.remote.internal.inet.InetAddresses.analyzeNetworkInterfaces(InetAddresses.java:48)
    at org.gradle.internal.remote.internal.inet.InetAddresses.(InetAddresses.java:40)
    at org.gradle.internal.remote.internal.inet.InetAddressFactory.init(InetAddressFactory.java:100)
    at org.gradle.internal.remote.internal.inet.InetAddressFactory.getLocalBindingAddress(InetAddressFactory.java:85)
    ... 31 more

@sunjoong
Copy link

sunjoong commented Jun 4, 2017

@JesseBoulard - #850 or gradle/gradle#773?

@JesseBoulard
Copy link
Author

JesseBoulard commented Jun 4, 2017 via email

@sunjoong
Copy link

sunjoong commented Jun 4, 2017

@JesseBoulard - The lastest comment #850 (comment) mentioned about Creator's update and after then WSL update, not a insider preview version but a public release, windows 10 version 1703. The lastest build number of 1703 is 15063; You can see it using ver comand in cmd.exe window like Microsoft Windows [Version 10.0.15063] and this information was asked in template when you opened this issue.

If you be using 1703, in other words Creator's update,... Hmm.... you look like to consider other thins like Anti-Virus or something....

@JesseBoulard
Copy link
Author

JesseBoulard commented Jun 4, 2017 via email

@sunjoong
Copy link

sunjoong commented Jun 4, 2017

@JesseBoulard
Copy link
Author

solved, thanks so much for rescuing my brain :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants