profile
viewpoint
Attila Mravik evik42 Budapest, Hungary

evik42/codingame 0

Solutions to coginame.com puzzles

evik42/coursera 0

Coursera assignments

evik42/examples 0

Actix web examples

evik42/ExData_Plotting1 0

Plotting Assignment 1 for Exploratory Data Analysis

evik42/ProgrammingAssignment2 0

Repository for Programming Assignment 2 for R Programming on Coursera

evik42/ttsim 0

A simulator for the Turing Tumble

evik42/typeorm 0

ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.

evik42/ud120-projects 0

Starter project code for students taking Udacity ud120

issue openedgradle/gradle

Gradle daemon binds to unavailable address

<!--- Please follow the instructions below. We receive dozens of issues every week, so to stay productive, we will close issues that don't provide enough information.

Please open Android-related issues on the Android Issue Tracker at https://source.android.com/source/report-bugs Please open Gradle Native-related issues at https://github.com/gradle/gradle-native/issues -->

<!--- Provide a brief summary of the issue in the title above -->

Expected Behavior

Bind to the detected available address and IP version, send the correct information to clients.

Current Behavior

The daemon identified /127.0.0.1 as unreachable but /0:0:0:0:0:0:0:1 as an available loopback address. Then it logged that it is listening on 127.0.0.1 and that is what will be sent to clients.

2020-09-16T16:21:41.348+0200 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Adding IP addresses for network interface Software Loopback Interface 1
2020-09-16T16:21:41.352+0200 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Is this a loopback interface? true
2020-09-16T16:21:42.294+0200 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Ignoring unreachable local address on loopback interface /127.0.0.1
2020-09-16T16:21:42.295+0200 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Adding loopback address /0:0:0:0:0:0:0:1
...
2020-09-16T16:21:42.752+0200 [DEBUG] [org.gradle.internal.remote.internal.inet.TcpIncomingConnector] Listening on [e43ecb9d-8168-4589-992c-a3e2c7ff4014 port:53556, addresses:[localhost/127.0.0.1]].
2020-09-16T16:21:42.758+0200 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] Daemon starting at: Wed Sep 16 16:21:42 CEST 2020, with address: [e43ecb9d-8168-4589-992c-a3e2c7ff4014 port:53556, addresses:[localhost/127.0.0.1]]
2020-09-16T16:21:42.758+0200 [INFO] [org.gradle.launcher.daemon.server.DaemonRegistryUpdater] Advertising the daemon address to the clients: [e43ecb9d-8168-4589-992c-a3e2c7ff4014 port:53556, addresses:[localhost/127.0.0.1]]
...
2020-09-16T16:21:42.770+0200 [LIFECYCLE] [org.gradle.launcher.daemon.server.Daemon] Daemon server started.
2020-09-16T16:21:42.771+0200 [DEBUG] [org.gradle.launcher.daemon.bootstrap.DaemonStartupCommunication] Completed writing the daemon greeting. Closing streams...
2020-09-16T16:21:42.773+0200 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] stopOnExpiration() called on daemon
2020-09-16T16:21:42.774+0200 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] awaitExpiration() called on daemon
2020-09-16T16:21:42.774+0200 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] daemon is running. Sleeping until state changes.
2020-09-16T16:21:42.783+0200 [ERROR] [org.gradle.internal.remote.internal.inet.TcpIncomingConnector] Cannot accept connection from remote address /127.0.0.1.

Omitted the logs for all the other interfaces as I have a few, but all of them were identified correctly as not being loopback interfaces.

Context

The daemon could not communicate with gradle so a new daemon was started and it is repeated in a loop until memory is exhausted. Gradle identifies the running daemons as busy.

Steps to Reproduce

I changed which of my network connection is shared via the mobile hotspot and that might have caused the loopback interface to not have the IPv4 address working correctly. Restart of Windows fixed the issue. The bug is that the daemon identified that the address is not working and still tried to communicate via it instead of using the IPv6 one.

Your Environment

Windows 10 Pro - 20H2 (19042.508), Amazon Corretto JDK 11.0.8.10.1 64bit gradle-wrapper.properties:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-6.7-20200812220226+0000-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

created time in a month

more