Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56164

Hockeyapp: upload always fails raising ConnectionClosedException

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Not A Defect
    • Component/s: hockeyapp-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.164, Java 1.8.0_202, Mac OS 10.13.6, hockeyapp plugin 1.4.0
    • Similar Issues:

      Description

      Every time the uploading to HockeyApp build step runs, it seems to fully upload the app but then terminate from an exception, possibly an unexpected HTTP request or response.

      Uploading to HockeyApp...
      <removed>.apk
      Proxy Settings: For the URL https://rink.hockeyapp.net/api/2/apps/<removed>/app_versions/99.0.0]
      Found proxy configuration [false]
      HockeyApp Upload Speed: 82.27Mbps
      org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 1229; received: 0
      at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
      at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
      at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
      at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
      at java.io.InputStreamReader.read(InputStreamReader.java:184)
      at java.io.Reader.read(Reader.java:140)
      at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2537)
      at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2516)
      at org.apache.commons.io.IOUtils.copy(IOUtils.java:2493)
      at org.apache.commons.io.IOUtils.copy(IOUtils.java:2441)
      at org.apache.commons.io.IOUtils.toString(IOUtils.java:1084)
      at hockeyapp.HockeyappRecorder.performForApplication(HockeyappRecorder.java:396)
      at hockeyapp.HockeyappRecorder.perform(HockeyappRecorder.java:281)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      at hudson.model.Build$BuildExecution.post2(Build.java:186)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      at hudson.model.Run.execute(Run.java:1841)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Build step 'Upload to HockeyApp' marked build as failure 

      I am uploading using an existing app ID and version provided by build parameter. I have tried this with two different API keys although authentication does not seem to be at issue. No proxy. Fails regardless of other settings in the build step.

        Attachments

          Activity

          Hide
          mezpahlan Mez Pahlan added a comment -

          Roger Braunstein thanks for reporting this. It isn't something we've seen during testing / usage of the plugin at work. Nor do I see this when I'm testing this out at home. I'm in the process of moving the upload logic to an AppCenter plugin as HockeyApp is to be deprecated towards the end of this year. For the time being all I can say is perhaps check where else this connection maybe prematurely closing for your on your system / network.

          Out of interest, how much memory is allocated to the Jenkins node / master that you are running this on?

          Show
          mezpahlan Mez Pahlan added a comment - Roger Braunstein thanks for reporting this. It isn't something we've seen during testing / usage of the plugin at work. Nor do I see this when I'm testing this out at home. I'm in the process of moving the upload logic to an AppCenter plugin as HockeyApp is to be deprecated towards the end of this year. For the time being all I can say is perhaps check where else this connection maybe prematurely closing for your on your system / network. Out of interest, how much memory is allocated to the Jenkins node / master that you are running this on?
          Hide
          esgroger Roger Braunstein added a comment -

          Thank you for looking into this!

          The same machine - same network settings - is able to upload builds to Hockeyapp reliably using the API (a php script generating an HTTP POST using curl) without network resets.

          Is there any way I can get more information that would be helpful? I checked "Enable global debug mode" in the Hockeyapp area of Jenkins settings but I don't see any extra logging in the jenkins log.

          Since you asked about memory I just modified the launcher to start jenkins with a heap size of 4gb, which I thought should be plenty. I then observed the main java process holding onto roughly 1.6gb. I observed the error as before.

          Show
          esgroger Roger Braunstein added a comment - Thank you for looking into this! The same machine - same network settings - is able to upload builds to Hockeyapp reliably using the API (a php script generating an HTTP POST using curl) without network resets. Is there any way I can get more information that would be helpful? I checked "Enable global debug mode" in the Hockeyapp area of Jenkins settings but I don't see any extra logging in the jenkins log. Since you asked about memory I just modified the launcher to start jenkins with a heap size of 4gb, which I thought should be plenty. I then observed the main java process holding onto roughly 1.6gb. I observed the error as before.
          Hide
          esgroger Roger Braunstein added a comment -

          I believe the error was the result of providing an app version in the build action. I used a build parameter: ${project.version} 

          When I left the "App Version" field blank, the upload succeeded, and Hockey was able to determine the correct app version from the app bundle, apparently, so this field was never necessary in the first place.

          You can close this as user error, but I believe documentation would have helped. The Jenkins Wiki, Jenkins plugin site, and Github page have little more than a changelog. However I understand this is unlikely as AppCenter is the way forward.

          Show
          esgroger Roger Braunstein added a comment - I believe the error was the result of providing an app version in the build action. I used a build parameter: ${project.version}  When I left the "App Version" field blank, the upload succeeded, and Hockey was able to determine the correct app version from the app bundle, apparently, so this field was never necessary in the first place. You can close this as user error, but I believe documentation would have helped. The Jenkins Wiki, Jenkins plugin site, and Github page have little more than a changelog. However I understand this is unlikely as AppCenter is the way forward.
          Hide
          mezpahlan Mez Pahlan added a comment -

          Glad you got to the bottom of it.

          The Wiki should be editable I am unaware of any restrictions apart from the fact that you need to be logged in. I'd welcome a pull request to improve documentation if you want to contribute one. If not I'll see about adding something in there myself when I've got some time.

          Show
          mezpahlan Mez Pahlan added a comment - Glad you got to the bottom of it. The Wiki should be editable I am unaware of any restrictions apart from the fact that you need to be logged in. I'd welcome a pull request to improve documentation if you want to contribute one. If not I'll see about adding something in there myself when I've got some time.

            People

            • Assignee:
              mezpahlan Mez Pahlan
              Reporter:
              esgroger Roger Braunstein
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: