JFrog Artifactory Cloud Configurate Remote Repository - maven

I'm struggling with a simple test using JFrog Artifactory Cloud when creating a remote repository to adobe public one.
I configure a remote as maven repository, on URL I've inserted https://repo.adobe.com/nexus/content/repositories/public and test ok on name just give a adobe-public name and click on save and finish.
After that I'm trying to obtain a existing (in repo.adobe.com) pom from https://xxxx/artifactory/adobe-public/com/day/jcr/vault/... but I can't get any pom.
I've tried to change several cache settings or offline settings but issue is always ""message" : "adobe-public: is offline". status 404.
On Logs, https://cccc/ui/admin/artifactory/advanced/system_logs there isn't also anything useful.
Thank you in advanced.

This is caused by global offline mode being active.
I had same issue.
Solved in: "https://.../ui/admin/artifactory/configuration/artifactory_general" - turn off "Global Offline Mode" and save.

Have a similar setup with Maven repository pointing to https://repo.adobe.com/nexus/content/repositories/public and was successfully able to download the pom files, refer the below snippet,
$ wget --user=admin --password=Password https://myartifactory/artifactory/adobe-repo/ant/ant/1.5.1/ant-1.5.1.pom
--2020-11-01 10:27:54-- https://myartifactory/artifactory/adobe-repo/ant/ant/1.5.1/ant-1.5.1.pom
Resolving myartifactory (myartifactory)... 1.2.3.4, 2.1.3.5, 3.7.7.4
Connecting to myartifactory (myartifactory)|1.2.3.6|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authentication selected: Basic realm="Artifactory Realm"
Reusing existing connection to myartifactory:443.
HTTP request sent, awaiting response... 200 OK
Length: 140 [application/x-maven-pom+xml]
Saving to: ‘ant-1.5.1.pom’
ant-1.5.1.pom 100%[====================================>] 140 --.-KB/s in 0s
2020-11-01 10:27:59 (5.14 MB/s) - ‘ant-1.5.1.pom’ saved [140/140]
Use wget and try to download the file as I did. Also, the error "offline" says that the repository is offline and cannot be downloaded, goto to the repository's configuration page under Artifactory UI --> Admin --> Repositories | Adobe-public and under the Basic tab, scroll down and look for "offline", if this "offline" is checked, uncheck it and try again.

Related

Why does wget (windows) behind a proxy needs the PROXY_HTTP/HTTPS environment variables, and Chrome doesn't

I tried to download files from google drive using wget (on windows) using the script shown here:
[JULY 2020 - Windows users batch file solution]wget/curl large file from google drive.
It works well, but when computer is behind proxy, it will work ONLY if I will set environment variables PROXY_HTTP and PROXY_HTTP (It may be that it can also set by flag in the command, but I didn't try it)
The fact that I can download files from google drive using Chrome without these environment variables and without setting chrome for the proxy gives me the understanding that there is a way to download behind proxy without setting an application for the proxy.
How can I make wget works without need to set it manually (by flag or by environment variables) for the proxy?
In all likelyhood your Chrome also has a proxy set up in some way. In any case, the simplest way to define the proxy for wget is to create a .wgetrc file in your local home folder and set the following:
> vi ~/.wgetrc
use_proxy=on
http_proxy=http://[proxy_ip]:[proxy_port]
https_proxy=https://[proxy_ip]:[proxy_port]
ftp_proxy=http://[proxy_ip]:[proxy_port]
That should be all you need to do.
I found the solution after #Wilmar comment which he pointed out here (thanks!).
An application can automatically finds if it is behind a proxy by sending "http://wpad/wpad.dat".
If a proxy server is behind, it will answer with a message that contains PAC file with proxy details. The application then can extract the proxy details for any needed settings. Thats how Chrome can set itself for automatically for proxy.
Example using wget in windows to find proxy details
In Windows, you can use wget as follows to get the proxy server details. The details must be extracted from the text messages and you can use tool like jrepl for such task. Here I only show where the details are.
call wget "http://wpad/wpad.dat" -o "ProcessLog.txt" -O "PAC.txt"
There are three possible scenarios here:
In case there is no proxy behind, then PAC.txt is empty and ProcessLog.txt contains text message similar to this one.
ProcessLog.txt
--2020-09-01 08:38:29-- http://wpad/wpad.dat
Resolving wpad (wpad)... failed: The requested name is valid, but no data of the requested type was found. .
wget: unable to resolve host address 'wpad'
In case there is a proxy server behind, and windows environment variables for proxy are set:
http_proxy=http://proxy.mc.company.com:777
https_proxy=https://proxy.mc.company.com:777
then wget already knows the proxy address so PAC.txt is empty and ProcessLog.txt contains text message similar to the follow one that contains the proxy details. In this example, the proxy details are [proxy_ip]:[proxy_port] = proxy.mc.company.com:777
ProcessLog.txt
--2020-09-01 08:29:59-- http://wpad/wpad.dat
Resolving proxy.mc.company.com (proxy.mc.company.com)... 10.100.200.150
Connecting to proxy.mc.company.com (proxy.mc.company.com)|10.100.200.150|:777... connected.
Proxy request sent, awaiting response... 302 Found
Location: http://www.wpad.com/wpad.dat [following]
--2020-09-01 08:30:00-- http://www.wpad.com/wpad.dat
Connecting to proxy.mc.company.com (proxy.mc.company.com)10.100.200.150|:777... connected.
Proxy request sent, awaiting response... 403 Forbidden
2020-09-01 08:30:00 ERROR 403: Forbidden.
In case there is a proxy server behind, but no windows environment variables for proxy are set, then wget gets the proxy details from proxy server. In this case PAC.txt contains long text message similar to the follow one that contains the proxy details. In this example, the proxy details are [proxy_ip]:[proxy_port] = proxy.mc.company.com:777
PAC.txt
function FindProxyForURL(url,host) {
var me=myIpAddress();
var resolved_ip = dnsResolve(host);
if (host == "127.0.0.1") {return "DIRECT";}
if (host == "localhost") {return "DIRECT";}
if (isPlainHostName(host)) {return "DIRECT";}
if (url.substring(0,37) == "http://lyncdiscoverinternal.company.com") {return "DIRECT";}
if (!resolved_ip) { if (url.substring(0,6) == "https:") {return "PROXY proxy-mc.company.com:778";} else {return "PROXY proxy-mc.company.com:777";}}
if (host == "moran-for-localhost-only.com") {return "DIRECT";}
...
...
Simplifying using wget in windows to find proxy details
When using wget to find proxy details, we can command it to ignore proxy environment variables (if are set) using the flag --no-proxy. This leaves us with only two possible scenarios (1) and (3) described above. So we just need the ProxyInfo file. If it is empty (scenario 1) then no proxy is behind, if it contains text (scenario 3), it is behind a proxy and you can extract the proxy details from it.
call wget --no-proxy "http://wpad/wpad.dat" -O "PAC.txt"

JFrog Artifactory unable to download jars from remote repository

When I run my maven build pointing to the JFrog Artifactory setup I see the following error in the log:
2020-05-14T04:41:01.640Z [jfrt ] [ERROR] [dcb2a29d3c46472e] [o.a.r.RemoteRepoBase:806 ] [http-
nio-8081-exec-1] - IO error while trying to download resource
'jcenter:org/springframework/security/spring-security-web/4.2.2.RELEASE/spring-security-web-
4.2.2.RELEASE.jar': **javax.net.ssl.SSLException: Connection reset**
2020-05-14T04:41:01.641Z [jfrt ] [WARN ] [dcb2a29d3c46472e] [o.a.e.DownloadServiceImpl:266 ] [http-
nio-8081-exec-1] - **Sending HTTP error code 404: Connection reset**
I have checked the connectivity to the jcenter repo from within the Artifactory admin conosole, and its says that its able to connect.
Require your assistance.
Regards
Please check the URL you are using for JCenter and make sure it is using secure HTTP - https://jcenter.bintray.com.
Starting in January 2020, JCenter is only serving requests made with HTTPS. From that point on, all requests made with HTTP are denied and any builds that use a JCenter URL with the non-secure HTTP protocol will fail.
For more info see the following blog post.

Jmeter - Plugins behind the proxy

I placed plugin manager in "lib\ext" folder and tried to open it showed error:
java.io.IOException: Repository responded with wrong status code: 407
Jmeter version - 3.3
Plugin version - 0.16
Jmeter is invoked from command line by using the following parameters:
C:\Users\princen\Performance Testing\Software\apache-jmeter-3.3\bin\jmeter.bat -H Proxyserver -P 1234 -u princen -a ***
Parameters modified as suggested here
JVM_ARGS="-Dhttps.proxyHost=Proxyserver -Dhttps.proxyPort=1234 -Dhttp.proxyUser=princen -Dhttp.proxyPass=***" C:\Users\princen\Performance Testing\Software\apache-jmeter-3.3\bin\jmeter.bat
Above try gives the following error message
Windows cannot find "JVM_ARGS="-Dhttps.proxyHost=Proxyserver -Dhttps.proxyPort=1234 -Dhttp.proxyUser=princen -Dhttp.proxyPass=***
When I tried to changes command to the following:
C:\Users\princen\Performance Testing\Software\apache-jmeter-3.3\bin\jmeter.bat -Dhttps.proxyHost=Proxyserver -Dhttps.proxyPort=1234 -Dhttp.proxyUser=princen -Dhttp.proxyPass=***
I received an error:
java.io.IOException: Repository responded with wrong status code: 407
Can someone please correct parameters required to load the plugin manager?
Ensure you use last version of jmeter-plugins download manager.
Regarding your parameters, you're mixing different configurations, just set (for both http and https):
JVM_ARGS="-Dhttps.proxyHost=myproxy.com -Dhttps.proxyPort=8080 -Dhttps.proxyUser=john -Dhttps.proxyPass=password -Dhttp.proxyHost=myproxy.com -Dhttp.proxyPort=8080 -Dhttp.proxyUser=john -Dhttp.proxyPass=password"
Where password is your real password.
None of above methods working for me. Its really tough to work with Java(due to Loadrunner background). I added Ultimate thread alone and its working fine.
Thank you all for your inputs..
JMeter is using the official proxy configuration from Oracle (like here: https://memorynotfound.com/configure-http-proxy-settings-java/)
The problem is that the jmeter documentation is wrong about the password parameter: it should be http.proxyPassword not http.proxyPass.
Also you must use the https. properties for secured urls you want to access using the proxy. And the http. properties for non secured.

Nexus 3.6 OSS Docker Hub Proxy - Can docker search but not docker pull

I've deployed Nexus OSS 3.6 and it's being served on http://server:8082/nexus
I have configured a docker-hub proxy using the instructions in http://www.sonatype.org/nexus/2017/02/16/using-nexus-3-as-your-repository-part-3-docker-images/ and have configured the docker-group to serve under port 18000
I can perform the following:
docker login server:18000
docker search server:18000/jenkins
but when I run:
docker pull server:18000/jenkins
i get the following error:
Error response from daemon: Get http://10.105.139.17:18000/v2/jenkins/manifests/latest:
error parsing HTTP 400 response body: invalid character '<'
looking for beginning of value:
"<html>\n<head>\n<meta http-equiv=\"Content-Type\"
content=\"text/html;charset=ISO-8859-1\"/>\n<title>
Error 400 </title>\n</head>\n<body>\n<h2>HTTP ERROR: 400</h2>\n
<p>Problem accessing /nexus/v2/token.
Reason:\n<pre> Not a Docker request</pre></p>\n<hr />
Powered by Jetty:// 9.3.20.v20170531<hr/>\n
</body>\n</html>\n"
My jetty nexus.properties config file is:
# Jetty section
application-port=8082
application-host=0.0.0.0
# nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-requestlog.xml
nexus-context-path=/nexus
# Nexus section
# nexus-edition=nexus-pro-edition
# nexus-features=\
# nexus-pro-feature
Could anyone offer any suggestions on how to fix this please?
I have the same problem when I enabled the anonymous read on some docker repository.
Repositories->Docker hosted->Check the checkbox (Disable to allow anonymous pull) from the repository.
seems you need to upgrade Nexus to 3.6.1 according to :
https://issues.sonatype.org/browse/NEXUS-14488
in order to allow anonymous read again

Unable to load package 'Microsoft.Net.Native.SharedLibrary-x64'

I want to update Microsoft.NETCore.UniversalWindowsPlatform but it shows an error
Unable to load package 'Microsoft.Net.Native.SharedLibrary-x64'
If I open the Output tab it shows the following
Restoring packages for D:\Project\Windows 10 Developement\Template\HamburgerMenu\HamburgerMenu\project.json...
GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.universalwindowsplatform/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.netcore.universalwindowsplatform/index.json 938ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.universalwindowsplatform/5.3.3/microsoft.netcore.universalwindowsplatform.5.3.3.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.netcore.universalwindowsplatform/5.3.3/microsoft.netcore.universalwindowsplatform.5.3.3.nupkg 936ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.compiler/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.compiler/index.json 946ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.compiler/1.6.2/microsoft.net.native.compiler.1.6.2.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.compiler/1.6.2/microsoft.net.native.compiler.1.6.2.nupkg 938ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-arm/index.json
GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/index.json
GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x86/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-arm/index.json 481ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-arm/1.6.1/microsoft.net.native.sharedlibrary-arm.1.6.1.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/index.json 967ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x86/index.json 1438ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x86/1.6.1/microsoft.net.native.sharedlibrary-x86.1.6.1.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-arm/1.6.1/microsoft.net.native.sharedlibrary-arm.1.6.1.nupkg 1347ms
OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x86/1.6.1/microsoft.net.native.sharedlibrary-x86.1.6.1.nupkg 1161ms
Failed to download package 'Microsoft.Net.Native.SharedLibrary-x64.1.6.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg'.
The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg' has timed out after 100000ms.
GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg
Failed to download package 'Microsoft.Net.Native.SharedLibrary-x64.1.6.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg'.
The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg' has timed out after 100000ms.
GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg
Failed to download package 'Microsoft.Net.Native.SharedLibrary-x64.1.6.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg'.
The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg' has timed out after 100000ms.
Unable to load package 'Microsoft.Net.Native.SharedLibrary-x64'.
Time Elapsed: 00:27:03.1499426
========== Finished ==========
Solution Tried
Running as Admin
Nuget error install package Microsoft.NETCore.UniversalWindowsPlatform
Using Package Manager Console to update
Update
I have Installed Microsoft.Net.Native.SharedLibrary-x64 manually. Now also it is not working.
Failed to download package 'Microsoft.Net.Native.SharedLibrary-x86.1.6.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x86/1.6.1/microsoft.net.native.sharedlibrary-x86.1.6.1.nupkg'.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Failed to download package 'Microsoft.Net.Native.SharedLibrary-arm.1.6.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-arm/1.6.1/microsoft.net.native.sharedlibrary-arm.1.6.1.nupkg'.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Unable to load package 'Microsoft.Net.Native.SharedLibrary-x64'
It is hard to make sure that whether this issue is related to the internet connection, the project itself or others according to the error log, but I could provide you a workaround for this issue:
Workaround:
Download the package "Microsoft.Net.Native.SharedLibrary-x64" from the nuget.org.
Use nuget add command line add that package to the global package folderC:\Users\username\.nuget\packages:
nuget add packagePath -Source sourcePath
After that, you will notice the package will be added in to that folder:
- Update Microsoft.NETCore.UniversalWindowsPlatform package.
Really strange issue, in my case, I had to change my default network DNS(network card) from 8.8.8.8 to 208.67.222.222.
After that I was able to update Microsoft.NETCore.UniversalWindowsPlatform.
In my case, I was getting this problem when trying to run a UWP (Universal Windows Platform) project, and the solution was to select "Developer mode" in the Windows 10 Settings "For Developers"

Resources