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

Fails to close/release #69

Closed
pavolloffay opened this issue Apr 11, 2018 · 13 comments
Closed

Fails to close/release #69

pavolloffay opened this issue Apr 11, 2018 · 13 comments

Comments

@pavolloffay
Copy link

Hi,

we are using this plugin and it seems that closing/releasing does not work.

Here is our configuration https://github.com/jaegertracing/jaeger-client-java/blob/master/build.gradle#L81

> Task :releaseRepository FAILED
POST request failed. 500: Server Error, body: [errors:[[id:*, msg:Unhandled: Repository: iojaegertracing-1018 has invalid state: open]]]


FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':closeRepository'.
> Wrong 'iojaegertracing-1018' repository state 'open' after transition (expected [closed]). Possible staging rules violation. Check repository status using Nexus UI.

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':releaseRepository'.
> 500: Server Error, body: [errors:[[id:*, msg:Unhandled: Repository: iojaegertracing-1018 has invalid state: open]]]

* 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
@szpak
Copy link
Member

szpak commented Apr 11, 2018

It seems you have some open staging repositories in Nexus. As suggested in the error message, please login to Nexus, remove all staging repositories and try again. If occurred again, disable running tasks in parallel and try once more (of course purging staging repositories via UI again before that).

Somehow strange is that both tasks closeRepository and releaseRepository failed. They should not be executed in parallel. Can you provided a link to a Travis build (if available)?

@szpak
Copy link
Member

szpak commented Apr 11, 2018

I have found a Travis build in a referenced issue.

Attempt 51/51 failed. WrongNumberOfRepositories was thrown with message 'Wrong number of received repositories in state 'open'. Expected 1, received 8'. Giving up. Configure longer timeout if necessary.

Definitely remove open repositories from Nexus.

@pavolloffay
Copy link
Author

@szpak thanks for looking into it.

I run into two problems:

  • when releasing on travis the upload created multiple staging repositories because it changed IP. the same issue is here Multiple deployments to sonatype for the same repository researchgate/gradle-release#244 (comment)
  • After travis failed 3 times with that issue I released it locally. The log is posted in the first comnet. It created only one staging repository but it didn't close and release manually even though it's configured to do so. Before doing the release I have always removed all staging repos from previous run.

@szpak
Copy link
Member

szpak commented Apr 13, 2018

Changing the IP address during one Travis build sounds suspicious for me. Can you:

  • disable parallel build on Travis and try to release the project?

or

  • split your build into two Gradle calls.?

In the second scenario:

  1. Build your artifacts (in parallel) - build task + whotever you need.
  2. Call upload and closeAndReleaseRepository in not parallel mode?

Of course remove old staging repositories from Nexus before.

@yaolingling
Copy link

@szpak
I get one error when execute the command "gradle releaseRepository". The error message is as followings.
"Execution failed for task ':releaseRepository'.Wrong 'comdellisgsmi-1073' repository state 'closed' after transition (expected [released, not_found]). Possible staging rules violation. Check repository status using Nexus UI."
Besides, the repository has been closed successfully. The lastest version: 0.11.0 of "gradle-nexus-staging-plugin" is used.

@szpak
Copy link
Member

szpak commented Jul 15, 2018

@yaolingling Closed (no more files can be added to that repo, prepared for release) is not the same as released (here, push to Maven Central public repo). Has the package visible in the Maven Central?

You can paste a link to public CI logs (if available).

@yaolingling
Copy link

@szpak, thanks for your reply. My issue has been resolved. The root cause of this issue is that the same version of jar can't be released to the nexus manager. Change the version of released jar.

@szpak
Copy link
Member

szpak commented Sep 24, 2018

@pavolloffay do you still have that problem?

@pavolloffay
Copy link
Author

I think it was still present

@szpak
Copy link
Member

szpak commented Sep 29, 2018

@pavolloffay Could you try to disable parallel tasks execution (which may potentially cause more than one staging repository) with -Dorg.gradle.parallel=false for the ./gradlew upload task on Travis?

@pavolloffay
Copy link
Author

We do not use parallel execution. I do not think this would make a difference.

@pavolloffay
Copy link
Author

closing in favor of #76

@szpak
Copy link
Member

szpak commented Oct 15, 2018

Yes, now I know that the issue affects also a single treat execution even for a single module.

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

No branches or pull requests

3 participants