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

Intermittent failed to post build status due hostname not verified

    XMLWordPrintable

Details

    Description

      Usually this is not a problem but it happens randomly and enough that it causes problems in our workflow. Our Bitbucket Server has a valid certificate accepted by browsers.

      Below is the full stack trace from the log when this happens.

      Nov 06, 2020 1:57:25 PM INFO com.atlassian.bitbucket.jenkins.internal.status.BuildStatusPoster postBuildStatus
      Failed to post build status, additional information: Hostname <URL> not verified (no certificates)
      Nov 06, 2020 1:57:25 PM FINE com.atlassian.bitbucket.jenkins.internal.status.BuildStatusPoster
      Stacktrace from build status failure
      javax.net.ssl.SSLPeerUnverifiedException: Hostname <URL> not verified (no certificates)
      	at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:353)
      	at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:300)
      	at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:185)
      	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
      	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:107)
      	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:87)
      	at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
      	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
      	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
      	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
      	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
      	at com.atlassian.bitbucket.jenkins.internal.http.HttpRequestExecutorImpl$UserAgentInterceptor.intercept(HttpRequestExecutorImpl.java:160)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
      	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:221)
      	at okhttp3.RealCall.execute(RealCall.java:81)
      	at com.atlassian.bitbucket.jenkins.internal.http.HttpRequestExecutorImpl.executeRequest(HttpRequestExecutorImpl.java:73)
      Caused: com.atlassian.bitbucket.jenkins.internal.client.exception.BitbucketClientException: - response: -1
      	at com.atlassian.bitbucket.jenkins.internal.http.HttpRequestExecutorImpl.executeRequest(HttpRequestExecutorImpl.java:88)
      	at com.atlassian.bitbucket.jenkins.internal.http.HttpRequestExecutorImpl.executeGet(HttpRequestExecutorImpl.java:50)
      	at com.atlassian.bitbucket.jenkins.internal.client.BitbucketRequestExecutor.makeGetRequest(BitbucketRequestExecutor.java:161)
      	at com.atlassian.bitbucket.jenkins.internal.client.BitbucketRequestExecutor.makeGetRequest(BitbucketRequestExecutor.java:105)
      	at com.atlassian.bitbucket.jenkins.internal.client.supply.BitbucketCapabilitiesSupplier.get(BitbucketCapabilitiesSupplier.java:23)
      	at com.atlassian.bitbucket.jenkins.internal.client.supply.BitbucketCapabilitiesSupplier.get(BitbucketCapabilitiesSupplier.java:8)
      	at com.google.common.base.Suppliers$ExpiringMemoizingSupplier.get(Suppliers.java:173)
      	at com.atlassian.bitbucket.jenkins.internal.client.BitbucketCapabilitiesClientImpl.getServerCapabilities(BitbucketCapabilitiesClientImpl.java:47)
      	at com.atlassian.bitbucket.jenkins.internal.client.BitbucketCapabilitiesClientImpl.getCapabilitiesForKey(BitbucketCapabilitiesClientImpl.java:63)
      	at com.atlassian.bitbucket.jenkins.internal.client.BitbucketCapabilitiesClientImpl.getCICapabilities(BitbucketCapabilitiesClientImpl.java:38)
      	at com.atlassian.bitbucket.jenkins.internal.status.BuildStatusPoster.postBuildStatus(BuildStatusPoster.java:81)
      	at com.atlassian.bitbucket.jenkins.internal.status.BuildStatusPoster.postBuildStatus(BuildStatusPoster.java:70)
      	at com.atlassian.bitbucket.jenkins.internal.status.BuildStatusPoster.onCompleted(BuildStatusPoster.java:62)
      	at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:209)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:599)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$800(WorkflowRun.java:137)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1026)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1463)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:489)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:38)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:136)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      

      Attachments

        Activity

          rompic Roman Pickl added a comment -

          marroqb I have found your issue because i have a similar one with the github checks plugin

           

          It could be a java issue:
          see discussion in

          https://stackoverflow.com/questions/56514997/okhttp-java-11-exceptions
          OKHttp is also used by the plugin you are using: https://github.com/jenkinsci/atlassian-bitbucket-server-integration-plugin/blob/70ad0b8488fb43b3b1acadb5e030c32f55276a55/pom.xml#L138

           

          could you check if an update to a newer Java 11 release fixes the issue?

          rompic Roman Pickl added a comment - marroqb I have found your issue because i have a similar one with the github checks plugin   It could be a java issue: see discussion in https://stackoverflow.com/questions/56514997/okhttp-java-11-exceptions OKHttp is also used by the plugin you are using: https://github.com/jenkinsci/atlassian-bitbucket-server-integration-plugin/blob/70ad0b8488fb43b3b1acadb5e030c32f55276a55/pom.xml#L138   could you check if an update to a newer Java 11 release fixes the issue?
          rompic Roman Pickl added a comment -

          I'll also try with the github checks plugin if I find some time.

           

          If this is the case this ticket should be added to https://wiki.jenkins.io/display/JENKINS/Known+Java+11+Compatibility+issues

          rompic Roman Pickl added a comment - I'll also try with the github checks plugin if I find some time.   If this is the case this ticket should be added to https://wiki.jenkins.io/display/JENKINS/Known+Java+11+Compatibility+issues

          rompic Thanks for the response. I updated to 11.0.9. Hopefully this resolves the issue. I'll post back if it does.

          marroqb Brian Marroquin added a comment - rompic Thanks for the response. I updated to 11.0.9. Hopefully this resolves the issue. I'll post back if it does.
          rompic Roman Pickl added a comment -

          It looks ok on my side after updating java to 11.0.9 with the github checks plugin

          rompic Roman Pickl added a comment - It looks ok on my side after updating java to 11.0.9 with the github checks plugin

          Thanks for resolving! I'll close this for now, feel free to reopen if it reoccurs

          mhenschke_atlassian Martin Henschke added a comment - Thanks for resolving! I'll close this for now, feel free to reopen if it reoccurs

          People

            Unassigned Unassigned
            marroqb Brian Marroquin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: