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

Release upload returns 502 Bad Gateway #5

Closed
rowanseymour opened this issue Nov 4, 2014 · 8 comments
Closed

Release upload returns 502 Bad Gateway #5

rowanseymour opened this issue Nov 4, 2014 · 8 comments

Comments

@rowanseymour
Copy link
Contributor

Today I started getting this error anytime I try to make a release

<html><head>
[INFO] [ERROR] <title>502 Bad Gateway</title>
[INFO] [ERROR] </head><body>
[INFO] [ERROR] <h1>Bad Gateway</h1>
[INFO] [ERROR] <p>The proxy server received an invalid
[INFO] [ERROR] response from an upstream server.<br />
[INFO] [ERROR] </p>
[INFO] [ERROR] </body></html>: Server returned HTTP response code: 502 for URL: https://uploads.github.com/repos/.........

I'm assuming for now this is a problem in the github-api library so I've created an issue there: hub4j/github-api#135

@jutzig
Copy link
Owner

jutzig commented Nov 4, 2014

There were no changes to the plugin or to the github api.
When I made the first implementation, the asset upload always ran into a connection timeout. I then tried a http post with java which also ran into a timeout. The exact same POST worked just fine with curl though.
A few days later, both the java POST and the call with the github API worked without problems.
Maybe this is something similar and starts working again in a few days.
You could also try to do a post with curl. If that doesn't work either it's probably on the github side or an issue with your proxy server.

@rowanseymour
Copy link
Contributor Author

Yeah it's definitely something changing on github's severs as it was working fine for me this morning. But this http://stackoverflow.com/questions/21698009/github-api-502-error suggests that not setting the Content-Length can confuse servers and "they respond in weird ways" - so I was wondering if that was happening in github-api

@jutzig
Copy link
Owner

jutzig commented Nov 4, 2014

That's possible. At least I cannot see that setFixedLengthStreamingMode is used anywhere in the code...

@jutzig
Copy link
Owner

jutzig commented Nov 4, 2014

I'm getting a FileNotFoundException. Not really better...

java.io.FileNotFoundException: https://uploads.github.com/repos/jutzig/github-release-plugin/releases/678628/assets?name=github-release-plugin-1.1.1-SNAPSHOT.jar
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1624)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    at org.kohsuke.github.Requester.parse(Requester.java:323)
    at org.kohsuke.github.Requester._to(Requester.java:200)
    at org.kohsuke.github.Requester.to(Requester.java:154)
    at org.kohsuke.github.GHRelease.uploadAsset(GHRelease.java:182)
    at de.jutzig.github.release.plugin.UploadMojo.execute(UploadMojo.java:173)

@jutzig
Copy link
Owner

jutzig commented Nov 4, 2014

I cannot get an asset up with curl either... I think this is a github issue

@jutzig
Copy link
Owner

jutzig commented Nov 18, 2014

Looks like the issue is fixed on github side. Asset uploading works again

@jutzig jutzig closed this as completed Nov 18, 2014
@monaka
Copy link

monaka commented Dec 22, 2014

Unfortunately, I got a similar 502 error today.
The version of github-release-plugin is 1.1.0, got from Maven Central.

[ERROR] 
java.io.IOException: {"message":"Error uploading asset","request_id":"fc61f25c-897c-11e4-8402-3eac011433b3"}
        at org.kohsuke.github.Requester.handleApiError(Requester.java:367)
        at org.kohsuke.github.Requester._to(Requester.java:202)
        at org.kohsuke.github.Requester.to(Requester.java:154)
        at org.kohsuke.github.GHRelease.uploadAsset(GHRelease.java:182)
        at de.jutzig.github.release.plugin.UploadMojo.execute(UploadMojo.java:173)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.io.IOException: Server returned HTTP response code: 502 for URL: https://uploads.github.com/repos/PizzaFactory/express/releases/801904/assets?name=pizzafactory.product-linux.gtk.x86_64.zip
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
        at org.kohsuke.github.Requester.parse(Requester.java:323)
        at org.kohsuke.github.Requester._to(Requester.java:200)
        ... 24 more

@jutzig
Copy link
Owner

jutzig commented Dec 22, 2014

I am sorry about that, but I released something last week and it worked just fine. It really seems to be an issue on the github side that happens occasionally. Like mentioned above, when I hit the issue on my maschine, I tried uploading with curl bypassing java completely and that wouldn't work either, so I don't think this can be fixed on the client side.

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