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

Unable to resolve dependencies -- https://repo.grails.org/grails/core returns 404 #11825

Closed
sdelamo opened this issue Jun 7, 2021 · 63 comments
Closed

Comments

@sdelamo
Copy link
Contributor

sdelamo commented Jun 7, 2021

Go to start.grails.org, download an app.

Unzip it and run ./gradlew help

 ./gradlew help       

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'myapp-2'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find org.grails:grails-gradle-plugin:4.0.10.
     Searched in the following locations:
       - https://repo.grails.org/grails/core/org/grails/grails-gradle-plugin/4.0.10/grails-gradle-plugin-4.0.10.pom
       - https://repo.grails.org/grails/core/org/grails/grails-gradle-plugin/4.0.10/grails-gradle-plugin-4.0.10.jar
     Required by:
         project :
   > Could not find gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.0.
     Searched in the following locations:
       - https://repo.grails.org/grails/core/gradle/plugin/com/github/erdi/webdriver-binaries/webdriver-binaries-gradle-plugin/2.0/webdriver-binaries-gradle-plugin-2.0.pom
       - https://repo.grails.org/grails/core/gradle/plugin/com/github/erdi/webdriver-binaries/webdriver-binaries-gradle-plugin/2.0/webdriver-binaries-gradle-plugin-2.0.jar
     Required by:
         project :
   > Could not find org.grails.plugins:hibernate5:7.0.4.
     Searched in the following locations:
       - https://repo.grails.org/grails/core/org/grails/plugins/hibernate5/7.0.4/hibernate5-7.0.4.pom
       - https://repo.grails.org/grails/core/org/grails/plugins/hibernate5/7.0.4/hibernate5-7.0.4.jar
     Required by:
         project :
   > Could not find com.bertramlabs.plugins:asset-pipeline-gradle:3.2.4.
     Searched in the following locations:
       - https://repo.grails.org/grails/core/com/bertramlabs/plugins/asset-pipeline-gradle/3.2.4/asset-pipeline-gradle-3.2.4.pom
       - https://repo.grails.org/grails/core/com/bertramlabs/plugins/asset-pipeline-gradle/3.2.4/asset-pipeline-gradle-3.2.4.jar
     Required by:
         project :

* 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 1s
@haaah
Copy link

haaah commented Jun 7, 2021

Facing same issue when created a new Grails App with vue profile and try to run up

`
A problem occurred configuring project ':server'.

Could not resolve all artifacts for configuration ':server:classpath'.
Could not find grails-gradle-plugin.jar (org.grails:grails-gradle-plugin:4.0.10).
Searched in the following locations:
https://repo.grails.org/grails/core/org/grails/grails-gradle-plugin/4.0.10/grails-gradle-plugin-4.0.10.jar
Could not find grails-shell.jar (org.grails:grails-shell:4.0.10).
Searched in the following locations:
https://repo.grails.org/grails/core/org/grails/grails-shell/4.0.10/grails-shell-4.0.10.jar
Could not find grails-gradle-model.jar (org.grails:grails-gradle-model:4.0.10).
Searched in the following locations:
https://repo.grails.org/grails/core/org/grails/grails-gradle-model/4.0.10/grails-gradle-model-4.0.10.jar
Could not find groovy-ant.jar (org.codehaus.groovy:groovy-ant:2.5.14).
Searched in the following locations:
https://repo.grails.org/grails/core/org/codehaus/groovy/groovy-ant/2.5.14/groovy-ant-2.5.14.jar
Could not find groovy-json.jar (org.codehaus.groovy:groovy-json:2.5.14).
Searched in the following locations:
https://repo.grails.org/grails/core/org/codehaus/groovy/groovy-json/2.5.14/groovy-json-2.5.14.jar
Could not find groovy-jmx.jar (org.codehaus.groovy:groovy-jmx:2.5.14).
Searched in the following locations:
https://repo.grails.org/grails/core/org/codehaus/groovy/groovy-jmx/2.5.14/groovy-jmx-2.5.14.jar
Could not find grails-bootstrap.jar (org.grails:grails-bootstrap:4.0.10).
Searched in the following locations:
https://repo.grails.org/grails/core/org/grails/grails-bootstrap/4.0.10/grails-bootstrap-4.0.10.jar
Could not find groovy-templates.jar (org.codehaus.groovy:groovy-templates:2.5.14).
Searched in the following locations:
https://repo.grails.org/grails/core/org/codehaus/groovy/groovy-templates/2.5.14/groovy-templates-2.5.14.jar
Could not find groovy-xml.jar (org.codehaus.groovy:groovy-xml:2.5.14).
Searched in the following locations:
https://repo.grails.org/grails/core/org/codehaus/groovy/groovy-xml/2.5.14/groovy-xml-2.5.14.jar
Could not find groovy.jar (org.codehaus.groovy:groovy:2.5.14).
Searched in the following locations:
https://repo.grails.org/grails/core/org/codehaus/groovy/groovy/2.5.14/groovy-2.5.14.jar
Could not find spring-boot-gradle-plugin.jar (org.springframework.boot:spring-boot-gradle-plugin:2.1.18.RELEASE).
Searched in the following locations:
https://repo.grails.org/grails/core/org/springframework/boot/spring-boot-gradle-plugin/2.1.18.RELEASE/spring-boot-gradle-plugin-2.1.18.RELEASE.jar
Could not find gradle-bintray-plugin.jar (com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5).
Searched in the following locations:
https://repo.grails.org/grails/core/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.8.5/gradle-bintray-plugin-1.8.5.jar
Could not find dependency-management-plugin.jar (io.spring.gradle:dependency-management-plugin:1.0.11.RELEASE).
Searched in the following locations:
https://repo.grails.org/grails/core/io/spring/gradle/dependency-management-plugin/1.0.11.RELEASE/dependency-management-plugin-1.0.11.RELEASE.jar
Could not find ant-junit.jar (org.apache.ant:ant-junit:1.9.15).
Searched in the following locations:
https://repo.grails.org/grails/core/org/apache/ant/ant-junit/1.9.15/ant-junit-1.9.15.jar
Could not find ant.jar (org.apache.ant:ant:1.9.15).
Searched in the following locations:
https://repo.grails.org/grails/core/org/apache/ant/ant/1.9.15/ant-1.9.15.jar
Could not find spring-boot-cli.jar (org.springframework.boot:spring-boot-cli:2.1.18.RELEASE).
Searched in the following locations:
https://repo.grails.org/grails/core/org/springframework/boot/spring-boot-cli/2.1.18.RELEASE/spring-boot-cli-2.1.18.RELEASE.jar
Could not find snakeyaml.jar (org.yaml:snakeyaml:1.28).
Searched in the following locations:
https://repo.grails.org/grails/core/org/yaml/snakeyaml/1.28/snakeyaml-1.28.jar
Could not find spring-boot-loader-tools.jar (org.springframework.boot:spring-boot-loader-tools:2.1.18.RELEASE).
Searched in the following locations:
https://repo.grails.org/grails/core/org/springframework/boot/spring-boot-loader-tools/2.1.18.RELEASE/spring-boot-loader-tools-2.1.18.RELEASE.jar
Could not find spring-core.jar (org.springframework:spring-core:5.1.19.RELEASE).
Searched in the following locations:
https://repo.grails.org/grails/core/org/springframework/spring-core/5.1.19.RELEASE/spring-core-5.1.19.RELEASE.jar
Could not find ant-launcher.jar (org.apache.ant:ant-launcher:1.9.15).
Searched in the following locations:
https://repo.grails.org/grails/core/org/apache/ant/ant-launcher/1.9.15/ant-launcher-1.9.15.jar
Could not find groovy-groovydoc.jar (org.codehaus.groovy:groovy-groovydoc:2.5.14).
Searched in the following locations:
https://repo.grails.org/grails/core/org/codehaus/groovy/groovy-groovydoc/2.5.14/groovy-groovydoc-2.5.14.jar
Could not find ant-antlr.jar (org.apache.ant:ant-antlr:1.9.15).
Searched in the following locations:
https://repo.grails.org/grails/core/org/apache/ant/ant-antlr/1.9.15/ant-antlr-1.9.15.jar
Could not find spring-security-crypto.jar (org.springframework.security:spring-security-crypto:5.1.13.RELEASE).
Searched in the following locations:
https://repo.grails.org/grails/core/org/springframework/security/spring-security-crypto/5.1.13.RELEASE/spring-security-crypto-5.1.13.RELEASE.jar
Could not find httpclient.jar (org.apache.httpcomponents:httpclient:4.5.13).
Searched in the following locations:
https://repo.grails.org/grails/core/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar
Could not find spring-jcl.jar (org.springframework:spring-jcl:5.1.19.RELEASE).
Searched in the following locations:
https://repo.grails.org/grails/core/org/springframework/spring-jcl/5.1.19.RELEASE/spring-jcl-5.1.19.RELEASE.jar

Possible solution:

`

@tbird2
Copy link

tbird2 commented Jun 7, 2021

grailsCentral (https://repo.grails.org/grails/core) appears to be down. It simply returns:

{
  "errors" : [ {
    "status" : 404,
    "message" : "Not Found"
  } ]
}

@puneetbehl
Copy link
Contributor

It seems like somehow artifactory URL is changed to https://repo.grails.org/artifactory/core

@aadrian
Copy link

aadrian commented Jun 7, 2021

@puneetbehl unfortunately this prevents even basic operations like "help" or just createing a new app from the CLI:

grails create-app --help
| Error Error occurred running Grails CLI: Could not find artifact org.grails:grails-bom:pom:4.0.10 in grailsCentral (https://repo.grails.org/grails/core) (Use --stacktrace to see the full trace)

@Nobhokleng
Copy link

Nobhokleng commented Jun 7, 2021

It seems like somehow artifactory URL is changed to https://repo.grails.org/artifactory/core

Thanks

@m4rc77
Copy link

m4rc77 commented Jun 7, 2021

Workaround for existing projects:
By setting the following in build.gradle

...
repositories {
    mavenLocal()
    // maven { url "https://repo.grails.org/grails/core" } // --> broken
    maven { url "https://repo.grails.org/artifactory/core" }
}
...

the problem can be solved. Under linux a simple sed -i 's|repo.grails.org/grails/core|repo.grails.org/artifactory/core|g' build.gradle does the job ;-).

Workaround for new projects
If for example grails create ... command fails you have to add in your user home directory the file USER_HOME/.grails/settings.groovy with the following content:

grails {
  profiles {
    repositories {
      grailsCentral {
        url ="https://repo.grails.org/artifactory/core"
        snapshotsEnabled = false
      }
    }
  }
}

After creating the new project, you still have to fix the build.gradle in the newly create project folder.

DISCLAIMER:
I can not guarantee that this is safe/a good idea as i am not a grails contributer!
@puneetbehl could you confirm this or propose a better solution?

@JasonTypesCodes JasonTypesCodes changed the title Create a new app unable to resolve dependencies Unable to resolve dependencies -- https://repo.grails.org/grails/core returns 404 Jun 7, 2021
@cosenmarco
Copy link

Unfortunately the old URL is hardcoded in the grails wrapper. See
https://github.com/grails/grails-wrapper/blob/master/starter/src/main/java/grails/init/Start.java

@JasonTypesCodes
Copy link
Member

@cosenmarco We do not intend for this URL change to be permanent.

We have reached out to JFrog for assistance with this issue. We'll update here when we have more information.

@cnrudd
Copy link

cnrudd commented Jun 7, 2021

@JasonTypesCodes Thank you for looking into this issue.
Do you have a sense of about how long this URL change will last? before it reverts back to "https://repo.grails.org/grails/core" ?
We are trying to determine whether or not we need to re-release our plugins with the new URL, to avoid blocking users.

amacleay-cohere added a commit to CohereHealth/grails-wrapper that referenced this issue Jun 7, 2021
@JasonTypesCodes
Copy link
Member

JasonTypesCodes commented Jun 7, 2021

Do you have a sense of about how long this URL change will last? before it reverts back to "https://repo.grails.org/grails/core" ?

We do not yet have a timeline for resolution. We'll update here once we do.

@cosenmarco
Copy link

@cosenmarco We do not intend for this URL change to be permanent.

We have reached out to JFrog for assistance with this issue. We'll update here when we have more information.

Alright. I was more for giving the ability to override in case this happens again / one wants to use a caching proxy... I'll be waiting for a resolutions with our pipelines in a broken state...

@alemedero
Copy link

Can't even run my projects. This is a blocking issue. Any workaround for existing projects??

Thanks in advance.

@jeffscottbrown
Copy link
Member

Any workaround for existing projects

I believe all of the artifacts should be available at https://repo.grails.org/artifactory/core for now.

@jrAtAustin
Copy link

@jeffbrown still not able to access some artifacts:

    buildscript {
        repositories {
            maven { url "https://repo.grails.org/artifactory/core" }
            maven { url "https://build.shibboleth.net/nexus/content/repositories/releases" }
            maven { url "https://mvnrepository.com/artifact/org.grails.plugins/sentry" }
            maven { url "https://grails.jfrog.io/grails/core" }
            mavenCentral()
            mavenLocal()
            jcenter()
            maven { url "https://repo.grails.org/grails/core" }
        }
        dependencies {
            classpath "org.grails:grails-gradle-plugin:$grailsVersion"
            classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.2.3"
        }
    }
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'okta-oauth2-service'.
> Could not resolve all dependencies for configuration ':runtime'.
   > Could not find org.grails.plugins:spring-security-oauth2:1.2.0.
     Searched in the following locations:
         file:/Users/johnruggentaler/.m2/repository/org/grails/plugins/spring-security-oauth2/1.2.0/spring-security-oauth2-1.2.0.pom
         file:/Users/johnruggentaler/.m2/repository/org/grails/plugins/spring-security-oauth2/1.2.0/spring-security-oauth2-1.2.0.jar
         https://repo.grails.org/grails/core/org/grails/plugins/spring-security-oauth2/1.2.0/spring-security-oauth2-1.2.0.pom
         https://repo.grails.org/grails/core/org/grails/plugins/spring-security-oauth2/1.2.0/spring-security-oauth2-1.2.0.jar
     Required by:
         project :

@jeffscottbrown
Copy link
Member

@jrAtAustin The dependencies you show there look like app dependencies bu the repositories you show there is for your build script dependencies, not the app dependencies. What repos do you have configured for your app dependencies?

@jrAtAustin
Copy link

@jeffbrown I was trying to build the Spring Security Oath 2 Okta plugin located here: https://github.com/moksamedia/okta-oauth2-service

Below is build.gradle

buildscript {
    repositories {
        maven { url "https://repo.grails.org/artifactory/core" }
        maven { url "https://build.shibboleth.net/nexus/content/repositories/releases" }
        maven { url "https://mvnrepository.com/artifact/org.grails.plugins/sentry" }
        maven { url "https://grails.jfrog.io/grails/core" }
        mavenCentral()
        mavenLocal()
        jcenter()
        maven { url "https://repo.grails.org/grails/core" }
    }
    dependencies {
        classpath "org.grails:grails-gradle-plugin:$grailsVersion"
        classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.2.3"
    }
}

version "0.1"
group "spring.security.oauth2.okta"

apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"org.grails.grails-plugin"
apply plugin:"org.grails.grails-plugin-publish"
apply plugin:"asset-pipeline"
apply plugin:"org.grails.grails-gsp"

repositories {
    mavenLocal()
    maven { url "https://repo.grails.org/grails/core" }
}

dependencies {
    compile 'org.grails.plugins:spring-security-core:3.3.1'
    compile 'org.grails.plugins:spring-security-oauth2:1.2.0'
    compile "org.springframework.boot:spring-boot-starter-logging"
    compile "org.springframework.boot:spring-boot-autoconfigure"
    compile "org.grails:grails-core"
    compile "org.springframework.boot:spring-boot-starter-actuator"
    compile "org.springframework.boot:spring-boot-starter-tomcat"
    compile "org.grails:grails-web-boot"
    compile "org.grails:grails-logging"
    compile "org.grails:grails-plugin-rest"
    compile "org.grails:grails-plugin-databinding"
    compile "org.grails:grails-plugin-i18n"
    compile "org.grails:grails-plugin-services"
    compile "org.grails:grails-plugin-url-mappings"
    compile "org.grails:grails-plugin-interceptors"
    compile "org.grails.plugins:cache"
    compile "org.grails.plugins:async"
    compile "org.grails.plugins:scaffolding"
    compile "org.grails.plugins:gsp"
    console "org.grails:grails-console"
    profile "org.grails.profiles:web-plugin"
    provided "org.grails:grails-plugin-services"
    provided "org.grails:grails-plugin-domain-class"
    runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.14.2"
    testCompile "org.grails:grails-gorm-testing-support"
    testCompile "org.grails:grails-plugin-testing"
    testCompile "org.grails:grails-web-testing-support"
}

bootRun {
    jvmArgs('-Dspring.output.ansi.enabled=always')
    addResources = true
    String springProfilesActive = 'spring.profiles.active'
    systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}
// enable if you wish to package this plugin as a standalone application
bootRepackage.enabled = false
grailsPublish {
    // TODO: Provide values here
    user = 'user'
    key = 'key'
    githubSlug = 'foo/bar'
    license {
        name = 'Apache-2.0'
    }
    title = "My Plugin"
    desc = "Full plugin description"
    developers = [johndoe:"John Doe"]
}


assets {
    packagePlugin = true
}

@jrAtAustin
Copy link

Ah, I think I got it. Thanks @jeffbrown and others!

repositories {
    mavenLocal()
    maven { url "https://repo.grails.org/artifactory/core" }
    maven { url "https://repo.grails.org/grails/core" }
}

@kfujita-cohere
Copy link

kfujita-cohere commented Jun 7, 2021

We also had some failures with our CI today and had to make some change outside of the gradle file. We ended up forking grails-wrapper and updating the urls:

We then ran the travis-build.sh and took the jar file from wrapper/build/libs. We copied that over to our root directory and replaced our grails-wrapper.jar temporarily.

Hopefully this is ok to post here for those experiencing issues beyond the local url change workaround.

@martin-walsh
Copy link

Affects legacy apps also. Grails 2 plugins are missing. tomcat, csv, spring-security-core etc.

Is there a workaround for Grails 2 apps?


==== grailsCentral: tried
--
  | http://repo.grails.org/grails/plugins/org/grails/plugins/tomcat/8.0.50/tomcat-8.0.50.pom
  | -- artifact org.grails.plugins#tomcat;8.0.50!tomcat.zip:
  | http://repo.grails.org/grails/plugins/org/grails/plugins/tomcat/8.0.50/tomcat-8.0.50.zip

@jeffscottbrown
Copy link
Member

Is there a workaround for Grails 2 apps?

Using https://repo.grails.org/artifactory/core should work for now.

@mifans
Copy link

mifans commented Jun 8, 2021

It seems like somehow artifactory URL is changed to https://repo.grails.org/artifactory/core

it work, thanks

@martin-walsh
Copy link

martin-walsh commented Jun 8, 2021

Grails 2.3 workaround seems to be to do:

// grailsCentral()
mavenRepo(root: 'https://repo.grails.org/artifactory/plugins', name: 'grailsCentral')

Grails 2.5 workaround seems to be to do:

// grailsCentral()
mavenRepo url: 'https://repo.grails.org/artifactory/plugins', name: 'grailsCentral'

That overrides the defaults supplied by org.codehaus.groovy.grails.resolve.config.RepositoriesConfigurer

@danieljoeblack
Copy link

Grails 3 projects are building properly for me but I am still unable to build Grails 2 projects. I'm getting the following when trying to run:

Error Resolve error obtaining dependencies: Could not transfer artifact xalan:serializer:jar:2.7.1 from/to grailsCentral (http://repo.grails.org/grails/plugins): Permanent Redirect (308)

One thing I noticed is that 'http://repo.grails.org/grails/plugins' redirects to 'https://repo.grails.org/artifactory/plugins/' when the trailing slash is omitted which it seems to be for Grails 2.

@JasonTypesCodes
Copy link
Member

@danieljoeblack I've been unable to recreate this in Grails 2.5.6 with standard configuration, but I suspect explicitly using https://repo.grails.org/grails/plugins/ as your repo will work.

@danieljoeblack
Copy link

danieljoeblack commented Jun 8, 2021

@JasonTypesCodes I'm running 2.3.9 for the record.

When I explicitly set the repo url to https://repo.grails.org/grails/plugins/ I'm getting:

Error Could not transfer artifact org.grails.plugins:tomcat:zip:7.0.53 from/to repo_grails_org_grails_plugins_ (https://repo.grails.org/grails/plugins/): peer not authenticated

Changing it to http://repo.grails.org/grails/plugins/ I get:

Could not transfer artifact org.grails.plugins:webxml:pom:1.4.1 from/to repo_grails_org_grails_plugins_ (http://repo.grails.org/grails/plugins/): Permanent Redirect (308)

Was the repo URL accessible via http before? It seems to force https now...

@kfujita-cohere
Copy link

The issue seems to be partially resolved. With the $HOME/.grails/wrapper cache I can run the ./grailsw locally or in our pipelines and everything works, but when there is no cache and the grailsw are runned for the first time I receive this message:

You must be connected to the internet the first time you use the Grails wrapper
org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 3; The element type "hr" must be terminated by the matching end-tag "</hr>".

@luiszimmermann Which version of Grails are you running?

@luiszimmermann We were running into this yesterday and this is the workaround we used #11825 (comment)

@vsachinv
Copy link

vsachinv commented Jun 8, 2021

@danieljoeblack I have also faced same issue on Grails 2.3.11 as well. It looks more like SSL related in Java7. I have tried things but didn't get it working yet. Did you get any clue?

@JasonTypesCodes I'm running 2.3.9 for the record.

When I explicitly set the repo url to https://repo.grails.org/grails/plugins/ I'm getting:

Error Could not transfer artifact org.grails.plugins:tomcat:zip:7.0.53 from/to repo_grails_org_grails_plugins_ (https://repo.grails.org/grails/plugins/): peer not authenticated

Changing it to http://repo.grails.org/grails/plugins/ I get:

Could not transfer artifact org.grails.plugins:webxml:pom:1.4.1 from/to repo_grails_org_grails_plugins_ (http://repo.grails.org/grails/plugins/): Permanent Redirect (308)

Was the repo URL accessible via http before? It seems to force https now...

@vsachinv
Copy link

vsachinv commented Jun 8, 2021

@danieljoeblack for me adding following repo worked in Grails 2.3.1

mavenRepo 'https://grails.jfrog.io/grails/core/'
mavenRepo 'https://grails.jfrog.io/grails/plugins/'

and with following command worked using Java7

grails -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2 clean --stacktrace

@danieljoeblack I have also faced same issue on Grails 2.3.11 as well. It looks more like SSL related in Java7. I have tried things but didn't get it working yet. Did you get any clue?

@JasonTypesCodes I'm running 2.3.9 for the record.
When I explicitly set the repo url to https://repo.grails.org/grails/plugins/ I'm getting:
Error Could not transfer artifact org.grails.plugins:tomcat:zip:7.0.53 from/to repo_grails_org_grails_plugins_ (https://repo.grails.org/grails/plugins/): peer not authenticated
Changing it to http://repo.grails.org/grails/plugins/ I get:
Could not transfer artifact org.grails.plugins:webxml:pom:1.4.1 from/to repo_grails_org_grails_plugins_ (http://repo.grails.org/grails/plugins/): Permanent Redirect (308)
Was the repo URL accessible via http before? It seems to force https now...

@icollar
Copy link

icollar commented Jun 9, 2021

FYI - we're now getting 503 from non-artifactory URLs now, and have had to completely remove those references in order to build our apps:

15:52:12  #29 467.5 The following artifacts could not be resolved: org.grails.plugins:tomcat:zip:7.0.55.3, org.grails.plugins:codenarc:zip:1.3: Could not transfer artifact org.grails.plugins:tomcat:zip:7.0.55.3 from/to grailsCentral (https://repo.grails.org/grails/plugins): Service Temporarily Unavailable (503)

@JasonTypesCodes
Copy link
Member

The 503s and the 404s that followed were due to an unrelated and unplanned outage and should no longer be occurring. We are working closely with JFrog on these issues.

@ShurikAg
Copy link

ShurikAg commented Jun 9, 2021

I am having the same issue with grails 4.0.1
Tried this:

repositories {
        mavenLocal()
        maven { url "https://repo.grails.org/artifactory/core" }
        maven { url "https://repo.grails.org/grails/core" }
        mavenCentral()
        jcenter()
    }

Does not help.

Works perfectly fine on local, but fails on CI.

@jeffscottbrown
Copy link
Member

Works perfectly fine on local, but fails on CI

Is that the wrapper already downloaded locally but not on CI?

@dwhalloran
Copy link

In Grails 2.4.4

I am using this:
mavenRepo "http://repo.grails.org/grails/core"
mavenRepo "http://repo.grails.org/grails/plugins"

And get this error:
Error Resolve error obtaining dependencies: Failed to read artifact descriptor for org.grails.plugins:rest-client-builder:zip:2.1.1 (Use --stacktrace to see the full trace)

@ShurikAg
Copy link

ShurikAg commented Jun 9, 2021

Works perfectly fine on local, but fails on CI

Is that the wrapper already downloaded locally but not on CI?

Nope, the wrapper is committed with the code.

@martin-walsh
Copy link

Will the old http:// urls be restored (without redirect) or should we make plans to workaround this issue permanently?

@ShurikAg
Copy link

@jeffbrown now both URL's are not available. So, basically, nothing works. even the workaround.

@puneetbehl
Copy link
Contributor

puneetbehl commented Jun 10, 2021

@ShurikAg Thank you, we are aware of current issues with the JFrog artifactory and we are in touch with the JFrog team to help us get the artifactory back online. We will share the further updates as soon as we get them.

Sorry for the inconvenience.

@ShurikAg
Copy link

@ShurikAg Thank you, we are aware of current issues with the JFrog artifactory and we are in touch with the JFrog team to help us get the artifactory back online. We will share the further updates as soon as we get them.

Sorry for the inconvenience.

Thank you! Is there any workaround for now? Or there is nothing to do?

@JasonTypesCodes
Copy link
Member

JasonTypesCodes commented Jun 10, 2021

The repository is currently back online. Thank you everyone for your patience as we work through these issues.

@martin-walsh
Copy link

The repository is currently back online. Thank you everyone for your patience as we work through these issues.

@JasonTypesCodes will the old http urls be restored, or do we need to keep the workarounds for Grails 2.x?

@JasonTypesCodes
Copy link
Member

JasonTypesCodes commented Jun 11, 2021

@JasonTypesCodes will the old http urls be restored, or do we need to keep the workarounds for Grails 2.x?

@martin-walsh That is a detail we are still working through. If the repository does revert back to responding to HTTP requests without a redirect, it will likely be for a limited period to allow a more graceful transition to HTTPS.

What version of Grails 2 are you running, and have you had to take actions beyond changing your repositories to https://repo.grails.org/grails/...?

@martin-walsh
Copy link

martin-walsh commented Jun 11, 2021

@JasonTypesCodes Running both 2.3.11 & 2.5.4.

Taking no action beyond overriding the definition of grailsCentral() in BuildConfig.

The workaround is very simple to apply, but I am wondering if we should plan to apply it permanently as the challenge my organisation faces is 100+ grails projects that need updating.

It is not a deal breaker, just something that needs to be done if http:// urls aren't coming back

@JasonTypesCodes
Copy link
Member

@JasonTypesCodes Running both 2.3.11 & 2.5.4.

Taking no action beyond overriding the definition of grailsCentral() in BuildConfig.

The workaround is very simple to apply, but I am wondering if we should plan to apply it permanently as the challenge my organisation faces is 100+ grails projects that need updating.

It is not a deal breaker, just something that needs to be done if http:// urls aren't coming back

@martin-walsh Thank you, that is good information to have.

If the HTTP URLs do resume working without a redirect that will be for a limited period. I would not suggest reverting any updates you have already made to the HTTPS repository URLs. I would also strongly consider taking the time to update your remaining applications.

@ShurikAg
Copy link

@jeffbrown @puneetbehl
I updated the repository URLs, as suggested in the workaround and I am still getting the same issue. Like nothing changed.
Do I need to regenerate the wrapper JAR's somehow to make it work? Or any additional steps to make it work?

Here is my current build.gradle

buildscript {
    repositories {
        mavenLocal()
        maven { url "https://repo.grails.org/artifactory/core" }
        maven { url "https://repo.grails.org/grails/core" }
    }
    dependencies {
        classpath "org.grails:grails-gradle-plugin:$grailsVersion"
        classpath "org.grails.plugins:views-gradle:2.0.2"
        classpath "org.grails.plugins:hibernate5:7.0.4"
        classpath 'org.grails.plugins:database-migration:3.1.0.RC1'
    }
}

version "0.2"
group "priz"

// apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"org.grails.plugins.views-json"

repositories {
    mavenLocal()
    maven { url "https://repo.grails.org/artifactory/core" }
    maven { url "https://repo.grails.org/grails/core" }
}

configurations {
    developmentOnly
    runtimeClasspath {
        extendsFrom developmentOnly
    }
}

dependencyManagement {
    imports {
        mavenBom 'com.amazonaws:aws-java-sdk-bom:1.12.1'
    }
}

dependencies {
    developmentOnly("org.springframework.boot:spring-boot-devtools")
    compile "org.springframework.boot:spring-boot-starter-logging"
    compile "org.springframework.boot:spring-boot-autoconfigure"
    compile "org.grails:grails-core"
    compile "org.springframework.boot:spring-boot-starter-actuator"
    compile "org.springframework.boot:spring-boot-starter-tomcat"
    compile "org.grails:grails-plugin-url-mappings"
    compile "org.grails:grails-plugin-rest"
    compile "org.grails:grails-plugin-codecs"
    compile "org.grails:grails-plugin-interceptors"
    compile "org.grails:grails-plugin-services"
    compile "org.grails:grails-plugin-datasource"
    compile "org.grails:grails-plugin-databinding"
    compile "org.grails:grails-web-boot"
    compile "org.grails:grails-logging"
    compile "org.grails.plugins:cache"
    compile "org.grails.plugins:async"
    compile "org.grails.plugins:spring-security-rest:3.0.1"
    compile "org.grails.plugins:views-json"
    compile "org.grails.plugins:views-json-templates"
    compile "org.grails.plugins:events"
    compile "org.grails.plugins:hibernate5"
    compile "org.hibernate:hibernate-core:5.4.18.Final"
    compileOnly "io.micronaut:micronaut-inject-groovy"
    console "org.grails:grails-console"
    profile "org.grails.profiles:rest-api"
    runtime "org.glassfish.web:el-impl:2.1.2-b03"
    runtime "com.h2database:h2"
    runtime "org.apache.tomcat:tomcat-jdbc"
    runtime "javax.xml.bind:jaxb-api:2.3.1"
    testCompile "io.micronaut:micronaut-inject-groovy"
    testCompile "org.grails:grails-gorm-testing-support"
    testCompile "org.mockito:mockito-core"
    testCompile "io.micronaut:micronaut-http-client"
    testCompile "org.grails:grails-web-testing-support"
    testCompile "org.grails:views-json-testing-support"
    testCompile "org.hibernate.validator:hibernate-validator:6.0.20.Final"

    compile "com.amazonaws:aws-java-sdk-s3"

    compile "org.grails.plugins:postgresql-extensions:7.0.0"
    compile "org.postgresql:postgresql:42.2.20"
    compile 'org.grails.plugins:database-migration:3.1.0.RC1'
    compile 'org.liquibase:liquibase-core:3.6.1'

    compile "com.auth0:auth0:1.31.0"
    compile "com.auth0:jwks-rsa:0.18.0"

    compile 'com.papertrailapp:logback-syslog4j:1.0.0'
    compile "com.stripe:stripe-java:20.56.0"

    compile "com.sendinblue:sib-api-v3-sdk:5.2.0"

    runtime "org.grails.plugins:async:4.0.0"
    compile "org.grails:grails-datastore-gorm-async"

    implementation "com.squareup.okhttp3:okhttp:4.9.0"
    implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.72'

}

bootRun {
    ignoreExitValue true
    jvmArgs(
            '-Dspring.output.ansi.enabled=always',
            '-noverify',
            '-XX:TieredStopAtLevel=1',
            '-Xmx1024m')
    sourceResources sourceSets.main
    String springProfilesActive = 'spring.profiles.active'
    systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}

tasks.withType(GroovyCompile) {
    configure(groovyOptions) {
        forkOptions.jvmArgs = ['-Xmx1024m']
    }
}

sourceSets {
    main {
        resources {
            srcDir 'grails-app/migrations'
        }
    }
}

And the error is:
image

@kfujita-cohere
Copy link

@jeffbrown @puneetbehl
I updated the repository URLs, as suggested in the workaround and I am still getting the same issue. Like nothing changed.
Do I need to regenerate the wrapper JAR's somehow to make it work? Or any additional steps to make it work?

And the error is:
image

@ShurikAg This looks similar to the error we were running into. It's probably because the grails wrapper inside of your repository has the typos. Here are the steps that we took to resolve #11825 (comment)

@ShurikAg
Copy link

@jeffbrown @puneetbehl
I updated the repository URLs, as suggested in the workaround and I am still getting the same issue. Like nothing changed.
Do I need to regenerate the wrapper JAR's somehow to make it work? Or any additional steps to make it work?
And the error is:
image

@ShurikAg This looks similar to the error we were running into. It's probably because the grails wrapper inside of your repository has the typos. Here are the steps that we took to resolve #11825 (comment)

Oh wow! Though, I am running Grails 4. Does it make a difference?
Also, any change to get access to that fork? :) Or the generated jar? 😃

@JasonTypesCodes
Copy link
Member

Also, any change to get access to that fork? :) Or the generated jar?

@ShurikAg That wrapper error can be resolved by using an updated grails-wrapper.jar.

Please see: https://grails.org/blog/2021-06-10-grails-wrapper-update.html

The issue for this bug is here: grails/grails-wrapper#7

@JasonTypesCodes
Copy link
Member

I think we can close this issue. If additional problems are encountered, please open a new issue. Thank you.

@akshatmathur04
Copy link

Hi All,

I am observing the similar kind of issue with grails version 2.4.0. I am getting the below error during generation of WAR file:

image

The error is observed immediately after the execution of grails -clean command.

I have followed all the suggestions mentioned in various comments and modified the BuildConfig.groovy file, but the result is same and everytime I am getting this issue in downloading the grails dependencies.
Attaching the BuildConfig.groovy.docx for reference.

I even tried adding the maven repos - mavenRepo "https://repo.grails.org/artifactory/core/" and mavenRepo "https://repo.grails.org/artifactory/plugins/" as mentioned in https://github.com/GMOD/Apollo/pull/2624/files; but no luck.

Can you please check and help me out with this issue? I am not able to proceed with the WAR file generation.

Thanks!

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

No branches or pull requests