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

Maven seemingly broken recently due to varying IP addresses #9555

Closed
ToxicBakery opened this Issue May 1, 2018 · 9 comments

Comments

Projects
None yet
5 participants
@ToxicBakery
Copy link

ToxicBakery commented May 1, 2018

When publishing to maven central it appears that the IP address is rotating per upload causing gradle based builds to fail with multi module projects. Looking at sonatype I can see multiple staging repositories generated from a single build and each repository appears to have been uploaded from a different IP address. Sonatype appears to require a consistent upload IP address for the duration of uploads for a multi part project as mentioned here

OSSRH-37302.

a new repository is created whenever there's a new combination of username + IP address + groupId


I have not run into this problem in the past so intitially I thought that gradle may be to blame as my last release build was under gradle 4.0 while the problem appeared after switching to 4.6. Rolling back to gradle 4.0 produced generally similar results as 4.6 leading me to assume the failure is on sonatypes until I found the issue describing the IP address requirement. I now believe the issue is on the side of Travis CI and presumably some recent infrastructure change.

If my assertion is accurate, does a work around exist to force a specific IP for docker instances?

Example Build - Job 373318000

Examples of what I see in sonatype:

Multiple uploads all from the same build
screenshot from 2018-04-30 22-52-50

Examples of partial project uploads with varying ip addresses:
screenshot from 2018-04-30 22-55-55

screenshot from 2018-04-30 22-56-12

screenshot from 2018-04-30 22-56-50

@ToxicBakery

This comment has been minimized.

Copy link
Author

ToxicBakery commented May 1, 2018

Looking back it seems my original tag used the travis jdk oraclejdk8 image while my 2.0 tag is now using docker. I rebuilt my 1.0 tag twice and it appears to upload to sonatype nominally. I'll give it a go not using docker however it appears that this may be isolated to builds run inside docker which is confusing as a past travis ci issue (from 2013) mentioned all docker instances being run NAT to the same outbound IP however it's understandable if this has changed in 5 years.

Update:
Moved to using the travis jdk image and the issue is resolved so it seems either the use of sudo or docker are to blame for the outgoing IP making it impossible to do a sonatype release for multi module gradle projects.

@ToxicBakery

This comment has been minimized.

Copy link
Author

ToxicBakery commented May 7, 2018

This also appears to occur when using Android as the language so I can no longer deploy android libraries to maven central. The exact same issue, two modules produced four unique staging repositories on maven central due to parts of the upload coming from different IP addresses.

@ToxicBakery

This comment has been minimized.

Copy link
Author

ToxicBakery commented May 9, 2018

References to the issue on Nexus
https://groups.google.com/a/glists.sonatype.com/forum/?hl=en#!topic/nexus-users/zjYUZHrOjP4

Source reference
https://issues.sonatype.org/browse/OSSRH-6262

It seems the blame can be shared but it sucks that this used to work fine on Travis and plenty of blogs suggest using the maven-publish plugin for library uploads and this is now broken.

@meip

This comment has been minimized.

Copy link

meip commented Aug 6, 2018

I can also confirm that using the docker functionality on travis will somehow break the staging stuff. Even adding the stagingProfileId as suggested multiple times doesn't help.

We reverted this commit to make the build working again:
swisscom/open-service-broker@db885dd#diff-354f30a63fb0907d4ad57269548329e3

I'm also not sure where the problem has to be nailed down further and this comment leads a bit into another direction since we use Gradle instead of Maven and it outlines a difference between the two very similar plugin names:
https://issues.sonatype.org/browse/OSSRH-40386?focusedCommentId=493561&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-493561

@ToxicBakery

This comment has been minimized.

Copy link
Author

ToxicBakery commented Aug 6, 2018

With the lack of communication from the Travis team, I gave up and migrated to CircleCI as it does not have the multiple outbound ip issue. I wish Travis would have announced this change as I imagine it causes issues for other services as well considering it's pretty unusual to hop IP addresses multiple times over a few seconds.

@leonard84

This comment has been minimized.

Copy link

leonard84 commented Aug 14, 2018

Hm, I ran into the same problem. I does not seem to be restricted to docker.

@ToxicBakery

This comment has been minimized.

Copy link
Author

ToxicBakery commented Aug 15, 2018

Correct, usage of sudo also triggers the issue.

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Oct 11, 2018

This seems like a variation of our load balancing solution, described here: https://blog.travis-ci.com/2018-07-23-the-tale-of-ftp-at-travis-ci

Something like a VPN might help you. https://docs.travis-ci.com/user/common-build-problems/?utm_source=blog&utm_medium=web&utm_campaign=ftp_blog#ftpsmtpother-protocol-does-not-work

Assuming that it is a manifestation of the load balancing issue, I am closing this issue. If you believe otherwise, do let us know.

@BanzaiMan BanzaiMan closed this Oct 11, 2018

@joeha480

This comment has been minimized.

Copy link

joeha480 commented Oct 11, 2018

@BanzaiMan How would I use the openvpn solution in an open source project? Doesn't this require a server to tunnel to?

davidsteinsland added a commit to navikt/helse-biblioteker that referenced this issue Dec 18, 2018

jmoroski added a commit to jmoroski/vcd-api-tools that referenced this issue Dec 22, 2018

Attempt to fix Travis multi-module staging issue.
The issue travis-ci/travis-ci#9555 turns out to
be a bit of a kick in the teeth to having a reasonable staging area in
Sonatype. One of the recommendations is to replace Maven's deploy plugin
with the Nexus staging plugin and force use of specific staging profiles
and repositories.

This change attempts to do that by using the singular staging profile and
tying a staging repository name to the GitHub repository name and release
version.

If this doesn't work we may have to reconsider CI options.

Signed-off-by: Jeff Moroski <jmoroski@vmware.com>

jmoroski added a commit to vmware/vcd-api-tools that referenced this issue Dec 22, 2018

Attempt to fix Travis multi-module staging issue. (#4)
The issue travis-ci/travis-ci#9555 turns out to
be a bit of a kick in the teeth to having a reasonable staging area in
Sonatype. One of the recommendations is to replace Maven's deploy plugin
with the Nexus staging plugin and force use of specific staging profiles
and repositories.

This change attempts to do that by using the singular staging profile and
tying a staging repository name to the GitHub repository name and release
version.

If this doesn't work we may have to reconsider CI options.

Signed-off-by: Jeff Moroski <jmoroski@vmware.com>

tronghn added a commit to navikt/kafka-embedded-env that referenced this issue Jan 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.