The connection check is not working as expected sometimes when publishing build scan

In the following log, the message ‘Connection refused (Connection refused) (local port 50994 to address 0:0:0:0:0:0:7f00:1, remote port 80 to address 127.0.0.1 (localhost))’’ looks weird, according to the user guide:

The build scan plugin captures information while the build is running and transmits it to a server after the build has completed.

The log said that “remote port 80” is used for “127.0.0.1”, but not the real gradle enterprise server host. in Mac or Ubuntu, non-root user could not use port 80 by default, which could be reason why the connection refused, I could make publishing successfully by “sudo”. Could anyone provide more ideas/suggestions why build-scan is trying to check connection to 127.0.0.1:80 in this case?

BUILD SUCCESSFUL in 18m 11s
79 actionable tasks: 29 executed, 50 up-to-date

Publishing build scan...
Publishing build scan failed due to network error 'java.net.ConnectException: Connection refused (Connection refused) (local port 54157 to address 0:0:0:0:0:0:7f00:1, remote port 80 to address 127.0.0.1 (localhost))' (2 retries remaining)...
Publishing build scan failed due to network error 'java.net.ConnectException: Connection refused (Connection refused) (local port 54158 to address 0:0:0:0:0:0:7f00:1, remote port 80 to address 127.0.0.1 (localhost))' (1 retry remaining)...

A network error occurred.

If you require assistance with this problem, please report it to your Gradle Enterprise administrator and include the following information via copy/paste.

Gradle version: 6.4.1
Plugin version: 3.3.3
Request URL: http://gradle.enterprise.host/scans/publish/gradle/3.3.3/token
Request ID: 7f6eed16-8c23-4691-bc66-05933938922b
Exception: java.net.ConnectException: Connection refused (Connection refused) (local port 54159 to address 0:0:0:0:0:0:7f00:1, remote port 80 to address 127.0.0.1 (localhost))

when checking the gradle environment piece by piece, I found the following empty properites in ~/.gradle/gradle.properties:

systemProp.http.proxyHost=
systemProp.http.proxyPort=
systemProp.http.nonProxyHosts=
systemProp.https.proxyHost=
systemProp.https.proxyPort=
systemProp.https.nonProxyHosts=

After remove these properties, the build scan could work well now.