jfrog / jfrog-cli

JFrog CLI is a client that provides a simple interface that automates access to the JFrog products.
https://www.jfrog.com/confluence/display/CLI/JFrog+CLI
Apache License 2.0
519 stars 223 forks source link

Jf mvn deploy Unable to locate server on WIndows #2586

Open pipelineRat opened 2 days ago

pipelineRat commented 2 days ago

Describe the bug

Jfrog Client, when performing jf mvn deploy, fails to locate private artifactory server when attempting to deploy artifacts. This is occurring on Windows Platforms and Docker Containers.

I have a separate Linux Container that deploys to the same Artifactory instance with jfrog cli, but has no issue with deploying artifacts at all.

Current behavior


ace\test\test\target\test-2.0.3-14.jar.
 Skipping deployment of remaining artifacts (if any) and build info.
    at org.jfrog.build.extractor.ModuleParallelDeployHelper.lambda$deploy$4 (ModuleParallelDeployHelper.java:57)
    at java.lang.Iterable.forEach (Iterable.java:75)
    at org.jfrog.build.extractor.ModuleParallelDeployHelper.deploy (ModuleParallelDeployHelper.java:44)
    at org.jfrog.build.extractor.ModuleParallelDeployHelper.lambda$null$1 (ModuleParallelDeployHelper.java:34)
    at java.util.concurrent.CompletableFuture$AsyncRun.run (CompletableFuture.java:1736)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:834)
Caused by: java.io.IOException: JFrog service failed. Received 504: <HEAD><TITLE>Unknown Host</TITLE></HEAD>
<BODY BGCOLOR="white" FGCOLOR="black"><H1>Unknown Host</H1><HR>
<FONT FACE="Helvetica,Arial"><B>
Description: Unable to locate the server named "<em>REDACTED</em>" --- the server doe
s not have a DNS entry.  Perhaps there is a misspelling in the server name, or the server no longer exists.  Double-c
heck the name and try again.</B></FONT>
<HR>
<!-- default "Unknown Host" response (504) -->
</BODY>

    at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.throwException (JFrogService.java:49)
    at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.Upload.handleUnsuccessfulResponse (U
pload.java:59)
    at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.execute (JFrogService.java:121)
    at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.Upload.execute (Upload.java:77)
    at org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.upload (ArtifactoryManager
.java:284)
    at org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.upload (ArtifactoryManager
.java:279)
    at org.jfrog.build.extractor.ModuleParallelDeployHelper.lambda$deploy$4 (ModuleParallelDeployHelper.java:46)
    at java.lang.Iterable.forEach (Iterable.java:75)
    at org.jfrog.build.extractor.ModuleParallelDeployHelper.deploy (ModuleParallelDeployHelper.java:44)
    at org.jfrog.build.extractor.ModuleParallelDeployHelper.lambda$null$1 (ModuleParallelDeployHelper.java:34)
    at java.util.concurrent.CompletableFuture$AsyncRun.run (CompletableFuture.java:1736)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:834)```

### Reproduction steps

Running jfrog client and maven builds on a custom windows docker image
- base image is dotnet/framework/runtime3.5-windowsservercore-ltsc2019

Attempted running on multiple jfrog verisons
- 2.53.2
- 2.58.0
- 2.59.0

Maven version 3.8.5
JAVA Version
- openjdk 11.0.10 2021-01-19 LTS
- OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS)
- OpenJDK 64-Bit Server VM Zulu11.45+27-CA (build 11.0.10+9-LTS, mixed mode)

Using Chocolatey to install:
- jfrog-cli-v2-jf --version=2.59.0
- maven --version=3.8.5

Utilizing a private artifactory server
- has a remote proxy of frog-releases

Environment Variable:
$env:JFROG_CLI_RELASES_REPO="artifactory/remote-jfrog-releases"

jf c add artifactory --url https://REDACTED --user user --password "blah" -interactive=false

jf mvn-config --server-id-deploy artifactory --repo-deploy-releases feature-repo --repo-deploy-snapshots snapshot-repo

jf mvn deploy --build-name test --build-number 777

### Expected behavior

Jfrog client deploys maven build artifacts to privary artifactory instance

### JFrog CLI version

2.59.0

### Operating system type and version

Windows Docker Image: dotnet/framework/runtime3.5-windowsservercore-ltsc2019

### JFrog Artifactory version

7.84.14

### JFrog Xray version

_No response_
pipelineRat commented 2 days ago

Additionally, for more details.

The maven build alone completes just fine when using jf mvn install and sources maven dependencies for the build just fine.

The issue only occurs when using jf mvn deploy and the jfrog client tool attempts to deploy artifacts