jenkinsci / jenkinsci/jfrog-plugin
Timeout fetching the jfrog-cli binary
- Dominant language
- Java
- Stars
- 16
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
On a rare occasion, happens often enough for me to file a bug, but maybe 1 in 10 builds or 1 in 20. The first step in trying to publish the build causes a build failure. The failure produces a stack-trace see "current behavior" box.
This is
- Jenkins 2.414.1
- JFrog Plugin 1.5.0
- Running the build on a remote Mac Mini running an ARM processor (same network as Jenkins instance)
- Jenkins is configured to fetch the latest version of JFrog from jfrog.com (or whatever the default is).
NOTE: Tool is already installed / cached, I think this maybe the initial request to verify the latest version??
We have Artifactory installed in AWS with a load-balancer in front of it (split between two IPs).
### Current behavior
Stack Trace when reproduced.
```
Timeout has been exceeded
java.lang.InterruptedException
at java.base/java.lang.Object.wait(Native Method)
at hudson.remoting.Request.call(Request.java:177)
at hudson.remoting.Channel.call(Channel.java:999)
at hudson.FilePath.act(FilePath.java:1192)
at hudson.FilePath.act(FilePath.java:1181)
at io.jenkins.plugins.jfrog.BinaryInstaller.performJfrogCliInstallation(BinaryInstaller.java:53)
at io.jenkins.plugins.jfrog.ArtifactoryInstaller.performInstallation(ArtifactoryInstaller.java:67)
at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:70)
at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:221)
at io.jenkins.plugins.jfrog.JfrogInstallation.forNode(JfrogInstallation.java:50)
at io.jenkins.plugins.jfrog.JfrogInstallation.forNode(JfrogInstallation.java:32)
at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:157)
at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:138)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
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:829)
org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 94080efa-6c44-4d55-9085-928a2a7658f3
/var/lib/jenkins/jobs/Secure Access/workspace/Zappa2@tmp/jfrog/461/.jfrog deleted
Finished: ABORTED
```
### Reproduction steps
Configure latest Jenkins 2.414.1 and JFrog Plugin 1.5.0. Add a Jenkins node running on a Mac Mini (ARM64 based). Create a pipeline script that will attempt e.g. dump 1Gb of data into a temporary file, then upload that file in a "publish" step that require jfrog-cli.
The initial installation (or verification of the version of this tool), causes the build to "hang" then eventually timeout. The timeout will cause an Interrupted exception showing the backtrace.
### Expected behavior
There shouldn't be any hang when reaching out to jfrog checking version or fetching the new version of the jfrog-cli. If a response doesn't come in "reasonable" time, it should retry (just like the jfrog-cli) and then hopefully work??
### JFrog plugin version
1.5.0
### JFrog CLI version
2.44.1
### Operating system type and version
OSX - 12.6.5 - Mac Mini running an Arm64 processor
### JFrog Artifactory version
7.41.14
### JFrog Xray version
n/a
Contributor guide
Research direction
Start with io.jenkins.plugins.jfrog.BinaryInstaller.performJfrogCliInstallation and ArtifactoryInstaller.performInstallation, using the provided stack trace to trace the remote Mac ARM64 installation path. Reproduce the timeout while fetching or verifying jfrog-cli, then define completion as avoiding an indefinite hang and retrying when a response does not arrive within a reasonable time.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devops, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100