Getting plugins from jcenter no longer works

Suddently building fails getting plugins.

> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.beryx:badass-runtime-plugin:1.12.4.
     Required by:
         project : > org.beryx.runtime:org.beryx.runtime.gradle.plugin:1.12.4
      > Could not resolve org.beryx:badass-runtime-plugin:1.12.4.
         > Could not get resource 'https://plugins.gradle.org/m2/org/beryx/badass-runtime-plugin/1.12.4/badass-runtime-plugin-1.12.4.module'.
            > Could not GET 'https://jcenter.bintray.com/org/beryx/badass-runtime-plugin/1.12.4/badass-runtime-plugin-1.12.4.module'.
               > Read timed out

Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'.
Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'https://plugins.gradle.org/m2/org/beryx/badass-runtime-plugin/1.12.4/badass-runtime-plugin-1.12.4.module'.
Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'https://jcenter.bintray.com/org/beryx/badass-runtime-plugin/1.12.4/badass-runtime-plugin-1.12.4.module'.

This has worked fine before, but not anymore.
Sometimes it is a different plugin that fails this way.

Has it something to do with JFrog to Shut down JCenter and Bintray?

1 Like

I’m also seeing this error. Curling the URL https://jcenter.bintray.com/org/beryx/badass-runtime-plugin/1.12.4/badass-runtime-plugin-1.12.4.module directly takes over a minute.

Are there any issues currently?

Facing the same issue.
It’s seems that Gradle Plugin Portal redirects to JCenter when a requested file is not found and JCenter seems to have downtime now …

A way around this was to configure our nexus maven repository during buildscript.
Then it would fetch gradle plugins through our Nexus instead.

build.gradle

buildscript {
    repositories {
        maven {
            url publicRepoUrl
        }
    }
}

I ended up with putting this within an init.d gradle script in our gradle distribution

GRADLE_HOME/init.d/repositories.gradle

allprojects {
    repositories {
        maven {
            url publicRepoUrl
        }
    }
    buildscript {
        repositories {
            maven {
                url publicRepoUrl
            }
        }
    }
}
1 Like

I also see the same error now: Gradle Status - JCenter slow response time

See JCenter shutdown impact on Gradle builds. JFrog may have disabled even read-only access. This is why you should setup an internal repo, like Artifactory or Nexus.

Hey folks,

The issue was resolved a couple hours later on the same day.
Service is back online.
We are actively working to reduce the JCenter dependency as much as possible.

Note that while JFrog announced a read-only version of JCenter would stay up, this shows it may not have the quality of service Gradle needs.

As a reminder, you can use status.gradle.com to check for any disruption to service.

1 Like

Hi, thanks for your suggestion.
I tried your solution but it seems gradle will still try to connect jcenter anyway.

①I changed my local host and point jcenter.bintray.com to an non-exist ip like 192.168.0.5
②Applied the script you suggested at the beginning of the build
then , still got something like this ( timeout error in the end)

00:08:08.892 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection [id: 0][route: {s}->https://plugins.gradle.org:443] can be kept alive indefinitely
00:08:08.892 [DEBUG] [org.apache.http.impl.conn.DefaultManagedHttpClientConnection] http-outgoing-0: set socket timeout to 0
00:08:08.892 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection released: [id: 0][route: {s}->https://plugins.gradle.org:443][total kept alive: 1; route allocated: 1 of 20; total allocated: 1 of 20]
00:08:08.896 [DEBUG] [org.gradle.internal.resource.transport.http.AlwaysRedirectRedirectStrategy] Redirect requested to location 'https://jcenter.bintray.com/com/***'
00:08:08.897 [DEBUG] [org.apache.http.impl.execchain.RedirectExec] Resetting target auth state
00:08:08.898 [DEBUG] [org.apache.http.impl.execchain.RedirectExec] Redirecting to 'https://jcenter.bintray.com/com/***' via {s}->https://jcenter.bintray.com:443
00:08:08.899 [DEBUG] [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: default
00:08:08.899 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth cache not set in the context
00:08:08.899 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection request: [route: {s}->https://jcenter.bintray.com:443][total kept alive: 1; route allocated: 0 of 20; total allocated: 1 of 20]
00:08:08.899 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection leased: [id: 1][route: {s}->https://jcenter.bintray.com:443][total kept alive: 1; route allocated: 1 of 20; total allocated: 2 of 20]
00:08:08.899 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Opening connection {s}->https://jcenter.bintray.com:443
00:08:08.900 [DEBUG] [org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connecting to jcenter.bintray.com/192.168.0.5:443
00:08:08.900 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Connecting socket to jcenter.bintray.com/192.168.0.5:443 with timeout 30000

I can see it tries to connect to https://plugins.gradle.org, but in my case I can see it downloads the plugin from our Nexus.

2021-09-30T06:50:18.506+0000 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection request: [route: {s}->https://plugins.gradle.org:443][total available: 0; route allocated: 0 of 20; total allocated: 0 of 20]
2021-09-30T06:50:18.523+0000 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection leased: [id: 0][route: {s}->https://plugins.gradle.org:443][total available: 0; route allocated: 1 of 20; total allocated: 1 of 20]
2021-09-30T06:50:18.524+0000 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Opening connection {s}->https://plugins.gradle.org:443
2021-09-30T06:50:18.557+0000 [DEBUG] [org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connecting to plugins.gradle.org/104.18.190.9:443
2021-09-30T06:50:18.557+0000 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Connecting socket to plugins.gradle.org/104.18.190.9:443 with timeout 30000
2021-09-30T06:50:18.576+0000 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Enabled protocols: [TLSv1.2, TLSv1.3]
2021-09-30T06:50:18.576+0000 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Enabled cipher suites:[TLS_AES_256_GCM_SHA384, TLS_AES_128_GCM_SHA256, TLS_CHACHA20_POLY1305_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
2021-09-30T06:50:18.577+0000 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Starting handshake


2021-09-30T06:50:24.119+0000 [INFO] [org.gradle.internal.resource.transport.http.HttpClientHelper] Resource missing. [HTTP HEAD: https://plugins.gradle.org/m2/org/beryx/runtime/org.beryx.runtime.gradle.plugin/1.12.6/org.beryx.runtime.gradle.plugin-1.12.6.jar]

2021-09-30T06:50:24.209+0000 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Resolve org.beryx.runtime:org.beryx.runtime.gradle.plugin:1.12.6' started

2021-09-30T06:50:24.214+0000 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Metadata of https://nexus.company.com:8443/repository/maven-public/org/beryx/runtime/org.beryx.runtime.gradle.plugin/1.12.6/org.beryx.runtime.gradle.plugin-1.12.6.pom' started
2021-09-30T06:50:24.283+0000 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Metadata of https://nexus.company.com:8443/repository/maven-public/org/beryx/runtime/org.beryx.runtime.gradle.plugin/1.12.6/org.beryx.runtime.gradle.plugin-1.12.6.pom'
2021-09-30T06:50:24.284+0000 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Download https://nexus.company.com:8443/repository/maven-public/org/beryx/runtime/org.beryx.runtime.gradle.plugin/1.12.6/org.beryx.runtime.gradle.plugin-1.12.6.pom.sha1' started
2021-09-30T06:50:24.298+0000 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Download https://nexus.company.com:8443/repository/maven-public/org/beryx/runtime/org.beryx.runtime.gradle.plugin/1.12.6/org.beryx.runtime.gradle.plugin-1.12.6.pom.sha1'

2021-09-30T06:50:24.306+0000 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Resolve org.beryx.runtime:org.beryx.runtime.gradle.plugin:1.12.6'
2021-09-30T06:50:24.306+0000 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Resolve org.beryx.runtime:org.beryx.runtime.gradle.plugin:1.12.6' completed

2021-09-30T06:50:24.444+0000 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Download https://nexus.company.com:8443/repository/maven-public/org/beryx/badass-runtime-plugin/1.12.6/badass-runtime-plugin-1.12.6.pom' started
2021-09-30T06:50:24.452+0000 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Download https://nexus.company.com:8443/repository/maven-public/org/beryx/badass-runtime-plugin/1.12.6/badass-runtime-plugin-1.12.6.pom'
2021-09-30T06:50:24.460+0000 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Download https://nexus.company.com:8443/repository/maven-public/org/beryx/badass-runtime-plugin/1.12.6/badass-runtime-plugin-1.12.6.module' started
2021-09-30T06:50:24.937+0000 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Download https://nexus.company.com:8443/repository/maven-public/org/beryx/badass-runtime-plugin/1.12.6/badass-runtime-plugin-1.12.6.module'

Correct me If I am wrong but your nexus stores the dependency because it was downloaded from the Gradle Plugin Portal/jcenter in the past. Try to download a new dependency (that is not in Gradle Plugin Portal and normally would redirect to jcenter AND was not downloaded in the past) from your nexus. Most probably it will download it from jcenter and store it so further calls will not require jcenter.