Gradle build failed with “Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.36.215] failed: Connection refused: connect” error


(MOHANRAJ KANAGARAJ) #1

I am trying to do the kafka setup in IntelliJ. but before that as per the instructions I cloned the kafka GIt repository using the GIT bash. Later when I tried to do gradle build, I am getting the connection refused error.
GIT repository ==> https://github.com/apache/kafka.git

I am running in Windows10. Below is the exact error message. I tried the same setup in my personal MAC book and it worked like charm. But I am trying to do the same in my Windows 10 office desktop but I keep getting this error. Please help me how to resolve this.

165071@PC384162 MINGW64 ~
$ cd kafka/

165071@PC384162 MINGW64 ~/kafka (trunk)
$ gradle
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

Configure project :
Building project ‘core’ with Scala version 2.11.12
Building project ‘streams-scala’ with Scala version 2.11.12

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ‘:core’.

Could not resolve all files for configuration ‘:core:scoverage’.
Could not resolve org.scoverage:scalac-scoverage-plugin_2.11:1.3.1.
Required by:
project :core
Could not resolve org.scoverage:scalac-scoverage-plugin_2.11:1.3.1.
Could not get resource ‘https://repo.maven.apache.org/maven2/org/scoverage/scalac-scoverage-plugin_2.11/1.3.1/scalac-scoverage-plugin_2.11-1.3.1.pom’.
Could not GET ‘https://repo.maven.apache.org/maven2/org/scoverage/scalac-scoverage-plugin_2.11/1.3.1/scalac-scoverage-plugin_2.11-1.3.1.pom’.
Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.36.215] failed: Connection refused: connect
Could not resolve org.scoverage:scalac-scoverage-runtime_2.11:1.3.1.
Required by:
project :core
Could not resolve org.scoverage:scalac-scoverage-runtime_2.11:1.3.1.
Could not get resource ‘https://repo.maven.apache.org/maven2/org/scoverage/scalac-scoverage-runtime_2.11/1.3.1/scalac-scoverage-runtime_2.11-1.3.1.pom’.
Could not GET ‘https://repo.maven.apache.org/maven2/org/scoverage/scalac-scoverage-runtime_2.11/1.3.1/scalac-scoverage-runtime_2.11-1.3.1.pom’.
Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.36.215] failed: Connection refused: connect

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 58s