Nexus Unable to connect with repos on the Internet - maven

I set up a nexus server locally and updated my local settings.xml to point it. Now whenever I run maven clean or package commands, it does not download the dependencies and throws the following error.
Return code is: 502 , ReasonPhrase:Proxy Error ( Connection refused )
But when I update my local settings.xml to not to point to nexus server, it downloads all jars locally and works fine. I think, this has to do with nexus not being able to connect with outside world. Where I can set our company's proxy settings in Nexus. I have tried setting proxy under
Application Server Settings
but had no luck. Any ideas?

Confirm that Nexus can connect to e.g. the Central Repository by trying to browse the remote repository of Central. If that doesnt work your proxy server, firewall or something else is blocking Nexus from getting out.
If thats the case you have to fix your proxy settings in Nexus in Administration - Server.

Related

Receiving 404 for maven-metadata.xml from Artifactory remote repo of repo.grails.org

I am trying to setup the https://repo.grails.org/core repository as a remote repository on my artifactory instance. If I use that URL directly in the configuration, I can pull everything except the maven-metadata.xml. Maven will throw an error saying it got a 404 for it, and I can verify that by trying to manually pull it through my remote repo.
I have also tried setting up the remote as a smart remote, entering just https://repo.grails.org/artifactory. It will recognize it as an artifactory server, but if I hit Test I get a 500 error. Saving the settings the repo shows no artifacts.
I have also tried https://repo.grails.org/artifactory/core, /artifactory/api/core, /artifactory/api/maven/core, /grails/core as well as a few others and those that work for retrieving jar or pom files still give a 404 for the maven-metadata.xml.
What is the correct way to configure the repo.grails.org repo as a remote repository?
I have tried this is both the 7.29 and 7.3 versions of artifactory with the same result.
From our previous experience, it was understood that grails repository core that you are pointing to is a virtual repository. grails admins might have added all the remote and local repositories under this. But artifactory does not support virtual repositories for smart remote repositories. You may need to point to the correct path.
You may try to point to https://repo.grails.org/core and then can you share the full path of the file that you are trying to download and facing the issues right now.

Nexus repo not accessible through proxy in maven settings

I have a maven project.
when I build using cmd prompt- It downloads the maven repos, only when the proxy is configured in settings.xml file.
But this proxy is blocking the nexus repos. I do have two nexus repos required for this project. and I get build error -- return code:503 reason phrase: service unavailable for nexus repo contents
If I follow the stack overflow answer Nexus Repo gives 503 with Maven but not with browser
and added proxy to nexus instance and mirrored the nexus in my settings file. Still maven repo works and nexus repos or not accessible.
my settings.xml
Any help would be appreciated.
Thanks in advance

Replicate nexus repository in my local server

I work in an organisation and we use nexus repositories. I want a simple approach of how can I replicate few groups from nexus repository in to local server so that maven downloads the dependencies from local server and not from nexus.
If you use local server in the sense of base machine then you use clean install as a maven goal. The build code will be available under .m2/repository folder.
Install Nexus locally, create Proxy Repository for each of the repo or group that you want to have locally. In Proxy Repository you'd need to set up URLs to the remote repos.
Now point Maven to this local Nexus (e.g. with <mirrors> in settings.xml). First time Maven downloads a dependency it will go to Local Nexus which would grab the dependency from the remote one. This file is going to be cached in Local Nexus and further downloads won't hit the Remote Nexus.
PS: don't know why you would do this.

Nexus (proxy)Repository Connection pending on remote storage And 404 on repository acces

I have set up a sonatype Nexus 3.0.0-03. And trying to configure proxy repositories.
Problems:
the created repositories are not accessible. 404 If I just open repository URL.
The status in the repositories overview is on Online - Remote Connection Pending...
Type and Format of repository I have setup:
proxy, npm
proxy, nuget
proxy, maven
The goal is proxy the remote Nexus npm repository and use it as a npm registry.
Additional information:
I have no access to the settings of the remote Nexus, but as far as I understood this is not even necessary.
Accessing the remote repository with npm is possible.
I have already tried using npm install on created repository and it does not work. My Nexus is not fetching from remote Nexus' repository.
Solved by correcting the proxy settings.
Host was not reachable, because the companies Nexus is not reachable from outside of companies network, but inside of companies network.
I had to change no_proxy and NO_PROXY environment variables from *.company.com to .company.com
*.company.com won't work for nexus.company.com

Apache Archiva internal repo suddenly just hangs

The internal repo suddenly gave up. All the artifacts are there and can be browsed through the browser but if you actually click on an artifact or a pom to download it it hangs.
Jenkins uses Archiva as well and suddenly can no longer fetch new artifacts from the internal repo. All we get is this 500 error: 500 , ReasonPhrase:Unable to fetch artifact resource
The internal repo mirrors maven central.
Any ideas?
Perhaps you're out of hard drive space or your server's internet connection to the outside isn't operational?
A restart of Archiva may do the trick if not.

Resources