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

HTTP client fails with randomly with NoHttpResponseException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Bitbucket DC (standalone): 9.4.3 LTS
      Jenkins: 2.492.1 LTS
      Bitbucket Branch Source Plugin (cloudbees-bitbucket-branch-source): 935.1.3
    • 936.0.0

      After updating Bitbucket, Jenkins and plugins we have started to get random connection errors when Bitbucket branch Source plugins tries to connect to Bitbucket.
      We updated:
      Bitbucket 8.19.13 LTS → 9.4.3 LTS
      Jenkins: 2.479.2 LTS → 2.492.1 LTS
      Bitbucket Branch Source Plugin (cloudbees-bitbucket-branch-source): 933.0.2 → 935.0.0 → 935.1.3 (we updated yesterday to the latest version, and still have issues)
      ...and tens of Jenkins plugins as usual.

      This happens randomly. Usually re-run build works OK.
      Before the updates, we didn't have the issue.

      The error in Jenkins build log:

       [Bitbucket] Notifying commit build result
       ERROR: Could not send notifications
       java.io.IOException: Communication error for url: POST https://<bitbucket_dc_address>/rest/api/1.0/projects/<project>/repos/<repository>/commits/<commit_id>/builds HTTP/1.1
       	at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.impl.client.AbstractBitbucketApi.doRequest(AbstractBitbucketApi.java:243)
       	at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.impl.client.AbstractBitbucketApi.doRequest(AbstractBitbucketApi.java:250)
       	at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.impl.client.AbstractBitbucketApi.postRequest(AbstractBitbucketApi.java:304)
       	at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.postBuildStatus(BitbucketServerAPIClient.java:511)
       	at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.impl.notifier.BitbucketDefaulNotifier.notifyBuildStatus(BitbucketDefaulNotifier.java:51)
       	at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.impl.notifier.BitbucketBuildStatusNotifications.createStatus(BitbucketBuildStatusNotifications.java:190)
       	at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.impl.notifier.BitbucketBuildStatusNotifications.sendNotifications(BitbucketBuildStatusNotifications.java:271)
       	at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.impl.notifier.BitbucketBuildStatusNotifications$JobCompletedListener.onCompleted(BitbucketBuildStatusNotifications.java:354)
       	at hudson.model.listeners.RunListener.lambda$fireCompleted$0(RunListener.java:223)
       	at jenkins.util.Listeners.lambda$notify$0(Listeners.java:59)
       	at jenkins.util.Listeners.notify(Listeners.java:67)
       	at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:221)
       	at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:666)
       	at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1082)
       	at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1545)
       	at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:521)
       	at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$2(CpsVmExecutorService.java:85)
       	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
       	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
       	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
       	at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
       	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
       	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
       	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
       	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
       	at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:53)
       	at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:50)
       	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
       	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
       	at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$categoryThreadFactory$0(CpsVmExecutorService.java:50)
       	at java.base/java.lang.Thread.run(Thread.java:840)
       Caused by: org.apache.http.NoHttpResponseException: <bitbucket_dc_address>:443 failed to respond
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:141)
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157)
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.impl.execchain.ServiceUnavailableRetryExec.execute(ServiceUnavailableRetryExec.java:85)
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
       	at PluginClassLoader for apache-httpcomponents-client-4-api//org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
       	at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.impl.client.AbstractBitbucketApi.executeMethod(AbstractBitbucketApi.java:216)
       	at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.impl.client.AbstractBitbucketApi.doRequest(AbstractBitbucketApi.java:224)
       	... 30 more
      

      The load on Bitbucket & Jenkins seems to be normal. The network connection between the services is stabile.
      Any idea what could cause this?
      Any ideas and instructions to debug the issue deeper?

            nfalco Nikolas Falco
            ipi_kiiskinen Ipi Kiiskinen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: