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

Implement retry mechanism with timeout #20

Open
EvgeniGordeev opened this issue Jun 30, 2016 · 1 comment · May be fixed by #21
Open

Implement retry mechanism with timeout #20

EvgeniGordeev opened this issue Jun 30, 2016 · 1 comment · May be fixed by #21

Comments

@EvgeniGordeev
Copy link

EvgeniGordeev commented Jun 30, 2016

Hello,

We face a sporadic error while releasing to GitHub:

[INFO] Creating release 0.0.112
build   30-Jun-2016 09:18:10    [INFO] Processing asset /home/bamboo/bamboo-agent-home/xml-data/build-dir/RCDMS-REL-JOB1/build/target/build-0.0.112-web.zip
build   30-Jun-2016 09:18:10    [ERROR] 
build   30-Jun-2016 09:18:10    java.io.FileNotFoundException: https://api.github.com/repos/ServeMinnesota/rcdms/releases/3560395/assets
build   30-Jun-2016 09:18:10        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1836)
build   30-Jun-2016 09:18:10        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
build   30-Jun-2016 09:18:10        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
build   30-Jun-2016 09:18:10        at org.kohsuke.github.Requester.parse(Requester.java:323)
build   30-Jun-2016 09:18:10        at org.kohsuke.github.Requester._to(Requester.java:200)
build   30-Jun-2016 09:18:10        at org.kohsuke.github.Requester.to(Requester.java:154)
build   30-Jun-2016 09:18:10        at org.kohsuke.github.GHRelease.getAssets(GHRelease.java:190)
build   30-Jun-2016 09:18:10        at de.jutzig.github.release.plugin.UploadMojo.uploadAsset(UploadMojo.java:202)
build   30-Jun-2016 09:18:10        at de.jutzig.github.release.plugin.UploadMojo.uploadAssets(UploadMojo.java:229)
build   30-Jun-2016 09:18:10        at de.jutzig.github.release.plugin.UploadMojo.execute(UploadMojo.java:188)
build   30-Jun-2016 09:18:10        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
build   30-Jun-2016 09:18:10        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
build   30-Jun-2016 09:18:10        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
build   30-Jun-2016 09:18:10        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
build   30-Jun-2016 09:18:10        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
build   30-Jun-2016 09:18:10        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
build   30-Jun-2016 09:18:10        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
build   30-Jun-2016 09:18:10        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
build   30-Jun-2016 09:18:10        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
build   30-Jun-2016 09:18:10        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
build   30-Jun-2016 09:18:10        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
build   30-Jun-2016 09:18:10        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
build   30-Jun-2016 09:18:10        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
build   30-Jun-2016 09:18:10        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
build   30-Jun-2016 09:18:10        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
build   30-Jun-2016 09:18:10        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
build   30-Jun-2016 09:18:10        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
build   30-Jun-2016 09:18:10        at java.lang.reflect.Method.invoke(Method.java:498)
build   30-Jun-2016 09:18:10        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
build   30-Jun-2016 09:18:10        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
build   30-Jun-2016 09:18:10        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
build   30-Jun-2016 09:18:10        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
build   30-Jun-2016 09:18:10    [INFO] ------------------------------------------------------------------------
build   30-Jun-2016 09:18:10    [INFO] BUILD FAILURE
build   30-Jun-2016 09:18:10    [INFO] ------------------------------------------------------------------------
build   30-Jun-2016 09:18:10    [INFO] Total time: 4.511 s
build   30-Jun-2016 09:18:10    [INFO] Finished at: 2016-06-30T14:18:10+00:00
build   30-Jun-2016 09:18:10    [INFO] Final Memory: 20M/192M
build   30-Jun-2016 09:18:10    [INFO] ------------------------------------------------------------------------
build   30-Jun-2016 09:18:10    [ERROR] Failed to execute goal de.jutzig:github-release-plugin:1.1.1:release (github-upload) on project build: Failed to upload assets: https://api.github.com/repos/ServeMinnesota/rcdms/releases/3560395/assets -> [Help 1]

Then running again for the same release we might get success:

build   30-Jun-2016 10:13:26    [INFO] Release 0.0.112 already exists. Not creating
build   30-Jun-2016 10:13:26    [INFO] Processing asset /home/bamboo/bamboo-agent-home/xml-data/build-dir/RCDMS-REL-JOB1/build/target/build-0.0.112-app.zip
build   30-Jun-2016 10:13:26    [INFO]   Upload asset
build   30-Jun-2016 10:13:31    [INFO] Processing asset /home/bamboo/bamboo-agent-home/xml-data/build-dir/RCDMS-REL-JOB1/build/target/build-0.0.112-db.zip
build   30-Jun-2016 10:13:31    [INFO]   Upload asset
build   30-Jun-2016 10:13:31    [INFO] Processing asset /home/bamboo/bamboo-agent-home/xml-data/build-dir/RCDMS-REL-JOB1/build/target/build-0.0.112-web.zip
build   30-Jun-2016 10:13:32    [INFO]   Upload asset
build   30-Jun-2016 10:13:32    [INFO] ------------------------------------------------------------------------
build   30-Jun-2016 10:13:32    [INFO] BUILD SUCCESS
build   30-Jun-2016 10:13:32    [INFO] ------------------------------------------------------------------------
build   30-Jun-2016 10:13:32    [INFO] Total time: 9.955 s
build   30-Jun-2016 10:13:32    [INFO] Finished at: 2016-06-30T15:13:32+00:00
build   30-Jun-2016 10:13:32    [INFO] Final Memory: 16M/315M

Since the nature of this error is intermittent can a retry mechanism be implemented?

@EvgeniGordeev EvgeniGordeev changed the title Implement retry mechanism or timeout Implement retry mechanism with timeout Jun 30, 2016
@EvgeniGordeev
Copy link
Author

One more possible scenario:

build   28-Jun-2016 08:52:38    Downloaded: http://10.220.20.177/content/groups/public/commons-codec/commons-codec/1.7/commons-codec-1.7.jar (254 KB at 3168.9 KB/sec)
build   28-Jun-2016 08:52:39    [INFO] Creating release 0.0.111
build   28-Jun-2016 08:52:39    [INFO] Processing asset /home/bamboo/bamboo-agent-home/xml-data/build-dir/RCDMS-REL-JOB1/build/target/build-0.0.111-web.zip
build   28-Jun-2016 08:52:39    [INFO]   Upload asset
build   28-Jun-2016 08:52:42    [INFO] Processing asset /home/bamboo/bamboo-agent-home/xml-data/build-dir/RCDMS-REL-JOB1/build/target/build-0.0.111-db.zip
build   28-Jun-2016 08:52:42    [INFO]   Upload asset
build   28-Jun-2016 08:52:42    [INFO] Processing asset /home/bamboo/bamboo-agent-home/xml-data/build-dir/RCDMS-REL-JOB1/build/target/build-0.0.111-app.zip
build   28-Jun-2016 08:52:42    [INFO]   Upload asset
build   28-Jun-2016 08:52:49    [ERROR] 
build   28-Jun-2016 08:52:49    java.io.IOException: {"message":"Error uploading to https://github-cloud.s3.amazonaws.com: 500","request_id":"36E11060:39FF:19DAAFB:5772812B"}
build   28-Jun-2016 08:52:49        at org.kohsuke.github.Requester.handleApiError(Requester.java:367)
build   28-Jun-2016 08:52:49        at org.kohsuke.github.Requester._to(Requester.java:202)
build   28-Jun-2016 08:52:49        at org.kohsuke.github.Requester.to(Requester.java:154)
build   28-Jun-2016 08:52:49        at org.kohsuke.github.GHRelease.uploadAsset(GHRelease.java:182)
build   28-Jun-2016 08:52:49        at de.jutzig.github.release.plugin.UploadMojo.uploadAsset(UploadMojo.java:219)
build   28-Jun-2016 08:52:49        at de.jutzig.github.release.plugin.UploadMojo.uploadAssets(UploadMojo.java:229)
build   28-Jun-2016 08:52:49        at de.jutzig.github.release.plugin.UploadMojo.execute(UploadMojo.java:188)
build   28-Jun-2016 08:52:49        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
build   28-Jun-2016 08:52:49        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
build   28-Jun-2016 08:52:49        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
build   28-Jun-2016 08:52:49        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
build   28-Jun-2016 08:52:49        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
build   28-Jun-2016 08:52:49        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
build   28-Jun-2016 08:52:49        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
build   28-Jun-2016 08:52:49        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
build   28-Jun-2016 08:52:49        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
build   28-Jun-2016 08:52:49        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
build   28-Jun-2016 08:52:49        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
build   28-Jun-2016 08:52:49        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
build   28-Jun-2016 08:52:49        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
build   28-Jun-2016 08:52:49        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
build   28-Jun-2016 08:52:49        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
build   28-Jun-2016 08:52:49        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
build   28-Jun-2016 08:52:49        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
build   28-Jun-2016 08:52:49        at java.lang.reflect.Method.invoke(Method.java:498)
build   28-Jun-2016 08:52:49        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
build   28-Jun-2016 08:52:49        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
build   28-Jun-2016 08:52:49        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
build   28-Jun-2016 08:52:49        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
build   28-Jun-2016 08:52:49    Caused by: java.io.IOException: Server returned HTTP response code: 502 for URL: https://uploads.github.com/repos/ServeMinnesota/rcdms/releases/3539681/assets?name=build-0.0.111-app.zip
build   28-Jun-2016 08:52:49        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
build   28-Jun-2016 08:52:49        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
build   28-Jun-2016 08:52:49        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
build   28-Jun-2016 08:52:49        at org.kohsuke.github.Requester.parse(Requester.java:323)
build   28-Jun-2016 08:52:49        at org.kohsuke.github.Requester._to(Requester.java:200)
build   28-Jun-2016 08:52:49        ... 27 more
build   28-Jun-2016 08:52:49    [INFO] ------------------------------------------------------------------------
build   28-Jun-2016 08:52:49    [INFO] BUILD FAILURE
build   28-Jun-2016 08:52:49    [INFO] ------------------------------------------------------------------------
build   28-Jun-2016 08:52:49    [INFO] Total time: 13.474 s
build   28-Jun-2016 08:52:49    [INFO] Finished at: 2016-06-28T13:52:49+00:00
build   28-Jun-2016 08:52:49    [INFO] Final Memory: 80M/415M
build   28-Jun-2016 08:52:49    [INFO] ------------------------------------------------------------------------
build   28-Jun-2016 08:52:49    [ERROR] Failed to execute goal de.jutzig:github-release-plugin:1.1.1:release (github-upload) on project build: Failed to upload assets: {"message":"Error uploading to https://github-cloud.s3.amazonaws.com: 500","request_id":"36E11060:39FF:19DAAFB:5772812B"}: Server returned HTTP response code: 502 for URL: https://uploads.github.com/repos/ServeMinnesota/rcdms/releases/3539681/assets?name=build-0.0.111-app.zip -> [Help 1]

EvgeniGordeev added a commit to EvgeniGordeev/github-release-plugin that referenced this issue Aug 4, 2016
@EvgeniGordeev EvgeniGordeev linked a pull request Aug 4, 2016 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant