Unable to download artifact from Central to Nexus

Hi,

We have installed the Nexus Repository Manager operator in Openshift platform. The nexus instance is running. We are able to upload the jar files and use it.

But the jar files from the central repo is not getting stored. In the nexus container terminal, i tried to curl Central Repository:, but it is saying host not resolved. We are behind the firewall.

Please let me know what can i do to resolve this issue. We want to store the jar files on nexus instead of going to maven repo all the time.

Thanks
Smaranika

This sounds like a question for your ops team.

Hi Matthew,

Thank you for getting back. And sorry for responding late.
I went back to the team and worked on fixing the issue. Now I am able to resolve the repo url from inside the pod after adding the proxy. Pls find the below log.

sh-4.4$ curl -vvv Central Repository:

  • Trying 10.11.12.9…
  • TCP_NODELAY set
  • Connected to 10.11.12.9 (10.11.12.9) port 8080 (#0)
  • allocate connect buffer!
  • Establish HTTP proxy tunnel to repo1.maven.org:443

CONNECT repo1.maven.org:443 HTTP/1.1
Host: repo1.maven.org:443
User-Agent: curl/7.61.1
Proxy-Connection: Keep-Alive

< HTTP/1.1 200 Connection established
<

  • Proxy replied 200 to CONNECT request
  • CONNECT phase completed!

But when I am trying to do the build from my local machine, which is connecting to the repo I am getting error for the build. Pls find the below log.

Downloading: http://nexus-nexus.apps.pcrdev.gov.in/repository/maven-central/org/springframework/boot/spring-boot-starter-parent/2.5.0/spring-boot-starter-parent-2.5.0.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.file.upload.summary:sftpfileuploadsummary:0.0.1: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.5.0 from/to nexus (http://nexus-nexus.apps.pcrdev.gov.in/repository/maven-central/): Failed to transfer http://nexus-nexus.apps.pcrdev.gov.in/repository/maven-central/org/springframework/boot/spring-boot-starter-parent/2.5.0/spring-boot-starter-parent-2.5.0.pom. Error code 502, Bad Gateway and ‘parent.relativePath’ points at no local POM @ line 5, column 10
@

Also I can see the below error in the pod log as well.

2022-08-10 06:11:08,409+0000 INFO [qtp2094591115-441] *UNKNOWN org.sonatype.nexus.repository.httpclient.internal.HttpClientFacetImpl - Repository status for maven-central changed from READY to UNAVAILABLE - reason java.net.UnknownHostException: repo1.maven.org: Name or service not known for https://repo1.maven.org
2022-08-10 06:11:08,415+0000 WARN [qtp2094591115-441] *UNKNOWN org.sonatype.nexus.repository.maven.internal.orient.MavenProxyFacet - Exception java.net.UnknownHostException: repo1.maven.org: Name or service not known checking remote for update, proxy repo maven-central failed to fetch org/springframework/boot/spring-boot-starter-parent/2.5.0/spring-boot-starter-parent-2.5.0.pom, content not in cache.

I am not able to upload files, as a new user. So tried to provide logs as much possible.
Currently we are using Nexus Repository Operator(3.38.1-1 provided by Sonatype).

I really appreciate taking time to look at the issue.

Thank you so much.

Regards
Smaranika

The error message you’ve posted says that the remote host for the central proxy cannot be resolved.

This would be due to however you’ve configured your network(s).

Hi Matthew,

Thank you for your response.
After setting the proxy on the nexus server through the UI, i was able to pull the jars.

Thank you so much for taking all the time to help with the issue.

Thanks
Smaranika

1 Like