Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoProxy configuration doesn't work with wildcards #40

Open
michael-doubez opened this issue Sep 18, 2024 · 1 comment
Open

NoProxy configuration doesn't work with wildcards #40

michael-doubez opened this issue Sep 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@michael-doubez
Copy link

Describe the bug

My jenkins is behind a proxy but my JFrog artifactory is on the local network.

When configuring NoProxy with a wildcard*.mynetwork, jfrog plugin still apply the proxy and the step fails.
When I remove the proxy configuration completely, the step succeeds anew.

Digging into #19 , I notice the implementation is using a java.util.regex.Pattern but noproxy expects a wildcard pattern.

As an additonnal note, in the doc, you expect comma separated values but Jenkins expect one host per line. (implementation is correct)

Specify host name patterns that shouldn't go through the proxy, one host per line. "" is the wild card host name (such as ".jenkins.io" or "www*.jenkins-ci.org")

Current behavior

Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to tra-rtg-paris-linasx
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1787)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
		at hudson.remoting.Channel.call(Channel.java:1003)
		at hudson.FilePath.act(FilePath.java:1229)
		at hudson.FilePath.act(FilePath.java:1218)
		at PluginClassLoader for jfrog//io.jenkins.plugins.jfrog.BinaryInstaller.performJfrogCliInstallation(BinaryInstaller.java:53)
		at PluginClassLoader for jfrog//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 PluginClassLoader for jfrog//io.jenkins.plugins.jfrog.JfrogInstallation.forNode(JfrogInstallation.java:50)
		at PluginClassLoader for jfrog//io.jenkins.plugins.jfrog.JfrogInstallation.forNode(JfrogInstallation.java:32)
		at PluginClassLoader for workflow-basic-steps//org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:157)
		at PluginClassLoader for workflow-basic-steps//org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:138)
		at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		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 java.base/java.lang.Thread.run(Thread.java:833)
Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 39dc0f00-bdfe-4d6a-9bdf-dfab18f92c7e
java.io.IOException: JFrog service failed. ...
	at PluginClassLoader for jfrog//org.jfrog.build.extractor.clientConfiguration.client.JFrogService.throwException(JFrogService.java:49)
	at PluginClassLoader for jfrog//org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadBase.handleUnsuccessfulResponse(DownloadBase.java:49)
	at PluginClassLoader for jfrog//org.jfrog.build.extractor.clientConfiguration.client.JFrogService.execute(JFrogService.java:121)
	at PluginClassLoader for jfrog//org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.downloadHeaders(ArtifactoryManager.java:102)
	at PluginClassLoader for jfrog//org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.downloadHeaders(ArtifactoryManager.java:97)
	at PluginClassLoader for jfrog//io.jenkins.plugins.jfrog.callables.JFrogCliDownloader.getArtifactSha256(JFrogCliDownloader.java:118)
	at PluginClassLoader for jfrog//io.jenkins.plugins.jfrog.callables.JFrogCliDownloader.invoke(JFrogCliDownloader.java:65)
	at PluginClassLoader for jfrog//io.jenkins.plugins.jfrog.callables.JFrogCliDownloader.invoke(JFrogCliDownloader.java:28)
	at Jenkins v2.460//hudson.FilePath$FileCallableWrapper.call(FilePath.java:3615)
	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:377)
	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
	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 java.base/java.lang.Thread.run(Thread.java:833)

Reproduction steps

  • define http proxy with wirldcard config
  • try to use jfrog step without using proxy

Expected behavior

Proxy not used because url matches the noproxy config.

JFrog plugin version

1.5.0

JFrog CLI version

latest

Operating system type and version

Linux

JFrog Artifactory version

Enterprise Plus 7.77.11

JFrog Xray version

No response

@michael-doubez michael-doubez added the bug Something isn't working label Sep 18, 2024
@yahavi
Copy link
Collaborator

yahavi commented Oct 11, 2024

@michael-doubez
Thank you for using the Jenkins JFrog plugin!
We tested the latest version (1.5.5) but were unable to reproduce the issue you mentioned - this pattern worked: *.jfrog.io.
Since version 1.5.0, we've made several enhancements to the proxy pattern:

One of these updates may resolve your issue.

Could you please try with the latest version and let us know if it works?
You might also want to try adding releases.jfrog.io to the No Proxy Host list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants