Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-1351

Uploads sporadically fail and cause our builds to hang

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: 3 - High
    • Resolution: Unresolved
    • Affects Version/s: 3.2.2
    • Fix Version/s: None
    • Component/s: Common
    • Labels:
      None
    • Environment:

      Jenkins version: 2.107.2

      Jenkins Artifactory plugin version: 3.2.2

      Slave machine OS: Windows 10

      Slave connection type: Java Web Start (JNLP) started by a scheduled task

      Artifactory server version: 7.4.1 rev 70401900 

      Description

      Randomly one of our Windows builds will hang while trying to upload files to the Artifactory server. There are no warnings and the build hangs indefinitely. After some investigation we found that logging into the machine running the hanging build and pressing enter in the command console running the Jenkins slave JNLP connection allows the build to fail and prints the following stack trace. 

       

      [consumer_2] An exception occurred during execution:[consumer_2] An exception occurred during execution:java.lang.NoClassDefFoundError: Could not initialize class org.jfrog.build.client.PreemptiveHttpClient at org.jfrog.build.client.ArtifactoryHttpClient.getHttpClient(ArtifactoryHttpClient.java:144) at org.jfrog.build.client.ArtifactoryHttpClient.getHttpClient(ArtifactoryHttpClient.java:139) at org.jfrog.build.client.ArtifactoryHttpClient.executeGetRequest(ArtifactoryHttpClient.java:183) at org.jfrog.build.client.ArtifactoryHttpClient.getVersion(ArtifactoryHttpClient.java:153) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBaseClient.getArtifactoryVersion(ArtifactoryBaseClient.java:109) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.tryChecksumDeploy(ArtifactoryBuildInfoClient.java:705) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:664) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.doDeployArtifact(ArtifactoryBuildInfoClient.java:367) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:355) at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecDeploymentConsumer.consumerRun(SpecDeploymentConsumer.java:39) at org.jfrog.build.extractor.producerConsumer.ConsumerRunnableBase.run(ConsumerRunnableBase.java:11) at java.lang.Thread.run(Unknown Source)
      [consumer_0] An exception occurred during execution:java.lang.NoClassDefFoundError: Could not initialize class org.jfrog.build.client.PreemptiveHttpClient at org.jfrog.build.client.ArtifactoryHttpClient.getHttpClient(ArtifactoryHttpClient.java:144) at org.jfrog.build.client.ArtifactoryHttpClient.getHttpClient(ArtifactoryHttpClient.java:139) at org.jfrog.build.client.ArtifactoryHttpClient.executeGetRequest(ArtifactoryHttpClient.java:183) at org.jfrog.build.client.ArtifactoryHttpClient.getVersion(ArtifactoryHttpClient.java:153) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBaseClient.getArtifactoryVersion(ArtifactoryBaseClient.java:109) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.tryChecksumDeploy(ArtifactoryBuildInfoClient.java:705) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:664) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.doDeployArtifact(ArtifactoryBuildInfoClient.java:367) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:355) at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecDeploymentConsumer.consumerRun(SpecDeploymentConsumer.java:39) at org.jfrog.build.extractor.producerConsumer.ConsumerRunnableBase.run(ConsumerRunnableBase.java:11) at java.lang.Thread.run(Unknown Source)
      [consumer_1] An exception occurred during execution:java.lang.NoClassDefFoundError: Could not initialize class org.jfrog.build.client.PreemptiveHttpClient at org.jfrog.build.client.ArtifactoryHttpClient.getHttpClient(ArtifactoryHttpClient.java:144) at org.jfrog.build.client.ArtifactoryHttpClient.getHttpClient(ArtifactoryHttpClient.java:139) at org.jfrog.build.client.ArtifactoryHttpClient.executeGetRequest(ArtifactoryHttpClient.java:183) at org.jfrog.build.client.ArtifactoryHttpClient.getVersion(ArtifactoryHttpClient.java:153) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBaseClient.getArtifactoryVersion(ArtifactoryBaseClient.java:109) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.tryChecksumDeploy(ArtifactoryBuildInfoClient.java:705) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:664) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.doDeployArtifact(ArtifactoryBuildInfoClient.java:367) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:355) at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecDeploymentConsumer.consumerRun(SpecDeploymentConsumer.java:39) at org.jfrog.build.extractor.producerConsumer.ConsumerRunnableBase.run(ConsumerRunnableBase.java:11) at java.lang.Thread.run(Unknown Source)
      java.lang.Exception: Error occurred during operation, please refer to logs for more information. at org.jfrog.build.extractor.producerConsumer.ProducerConsumerExecutor.start(ProducerConsumerExecutor.java:85) at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.uploadArtifactsBySpec(SpecsHelper.java:115) at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:178)Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from **** at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1737) at hudson.remoting.UserResponse.retrieve(UserRequest.java:313) at hudson.remoting.Channel.call(Channel.java:952) at hudson.FilePath.act(FilePath.java:998) at hudson.FilePath.act(FilePath.java:987) at org.jfrog.hudson.pipeline.common.executors.GenericUploadExecutor.execute(GenericUploadExecutor.java:51) at org.jfrog.hudson.pipeline.scripted.steps.UploadStep$Execution.run(UploadStep.java:72) at org.jfrog.hudson.pipeline.scripted.steps.UploadStep$Execution.run(UploadStep.java:52) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47) at hudson.security.ACL.impersonate(ACL.java:290) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)Caused: java.lang.RuntimeException: Failed uploading artifacts by spec at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:182) at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:116) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2816) at hudson.remoting.UserRequest.perform(UserRequest.java:210) at hudson.remoting.UserRequest.perform(UserRequest.java:53) at hudson.remoting.Request$2.run(Request.java:364) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:94) at java.lang.Thread.run(Unknown Source)
      

       

      Unfortunately it doesn't really point to what exactly is going wrong as java.lang.NoClassDefFoundError covers a couple of scenarios. Any pointers as to cause or fix would be much appreciated.

        Attachments

          Activity

            People

            Assignee:
            eyalb Eyal Ben Moshe
            Reporter:
            christopher.nicoll Christopher Nicoll
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: