Hello to everyone,
I have a problem with read timeout in Nexus.
We encounter read timeouts when accessing files in the Nexus. More specifically we have jenkins pipelines (outside of project Jenkins) that deploy our applications. In one of the pipeline steps we try to HTTP Get the maven-metadata.xml, which always fails due to a timeout, independent of the application being deployed.
You may use the following example to check the described behaviour:
The pipeline tries to access …/maven-metadata.xml(instead of … there is HTTPS site that is run behind a reverse proxy) which fails with a timeout.
However the file is inside our Nexus repository: …/maven-metadata.xml ((instead of … there is HTTPS site that is run behind a reverse proxy and expose different repositories).
Can you have some hints to give me?
This applies only to maven-metadata.xml?
Not for jar artifacts ?
Without reverse proxy you can retrieve maven-metadata.xml?
Tried to run the the task “Repair - Rebuild Maven repository metadata (maven-metadata.xml)” ?
Hi @QuHu
The problem is linked to update a SNAPSHOT file in Nexus. The user wants to upload this artefact in IAP_Repository. Before to doing the upload he tries to GET maven-metadata.xml but when he use his pipeline he goes to an Read Timeout error: if i try to access to this file using browser I manage to do this. If the user try to access usign web browser navigating to the correct page, sometimes he meets a timeout error, sometimes he manage to see the page.
What do you think about? I was thinking to set up higher HTTP timeout or socket connection in our Nexus but I don’t know if this action can be useful. Do you think it can be better to run task Repair that you mentioned before?
Hey,
Retrieving mave-metadata.xml should be quite quick (unless you have a really VERY HUGE list of versions)
Have you tried to retrieve the file locally via curl directly on the host/container running Nexus?
Seems to me as this are network issues due to VPN (homeOffice) or similar.
Are you running nginx or apache as reverse proxy in front of nexus?
Does the user connect to Nexus via HTTP-Proxy?
You can try to run the repair task - usually this takes a lot of time.
We’re using Apache as reverse-proxy in front of Nexus.
The user connect using HTTPS-Proxy
I tried to use API console in Nexus and I tried to download the list of asset in IAP_Snapshots repository and the operation has done well.
I don’t know why this timeout.
if i decide to Repair this repository, Can I decide to repair only a folder inside this repository?
Ola,
Only whole repos are repairable afaik.
Did you check apache access logs for errors? (maybe Apache reports 200 for the request causing a timeout - then the error is almost not in Nexus side but network)
Also check Nexus logs for errors (also Nexus access logs - should correlate to apache HTTP response codes - if not maybe Apache proxy causes the timeout)
I am facing same issue, We are using Nexus Repository Manager version is OSS 3.28.1-0
following are the logs details:
18:07:19 Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact ***************: Read timed out 18:07:19 at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:52) 18:07:19 at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:364) 18:07:19 at org.eclipse.aether.connector.basic.BasicRepositoryConnector.put(BasicRepositoryConnector.java:283) 18:07:19 at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:289) 18:07:19 … 146 more 18:07:19 Caused by: org.apache.maven.wagon.TransferFailedException: Read timed out 18:07:19 at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:650) 18:07:19 at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:553) 18:07:19 at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:535) 18:07:19 at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:529) 18:07:19 at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:509) 18:07:19 at org.eclipse.aether.transport.wagon.WagonTransporter$PutTaskRunner.run(WagonTransporter.java:653) 18:07:19 at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:436) 18:07:19 at org.eclipse.aether.transport.wagon.WagonTransporter.put(WagonTransporter.java:419) 18:07:19 at org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskRunner.runTask(BasicRepositoryConnector.java:519) 18:07:19 at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:359) 18:07:19 … 148 more 18:07:19 Caused by: java.net.SocketTimeoutException: Read timed out
We have a similar issue where reading maven-metadata.xml from Jenkins fails from time to time. I’m wondering what’s causing this and if there’s a way to increase Nexus’s connection pool.
@shridhar.patil01 did you set this in the Nexus nexus.vmoptions file? or in some consumer making the HTTP calls?