Nexus deploy via maven giving connection timeout

Viewed 786

I have my local setup being built through mvn deploy which sends it to nexus which is on our internal (over vpn) network, behind an nginx reverse proxy.

Maven version:

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Program Files\Maven\bin\..
Java version: 14.0.2, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-14.0.2
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

I am getting a connection timeout whenever i try to deploy one specific module. I was getting an error originaly that as the repo on nexus did not allow redeploys it failed (even though there was actually nothing for that module in the repo)

My current pom.xml config:

<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>11</java.version>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.wagon.http.ssl.insecure>true</maven.wagon.http.ssl.insecure>
        <maven.wagon.http.ssl.allowall>true</maven.wagon.http.ssl.allowall>
        <maven.wagon.rto>5200000</maven.wagon.rto>
        <maven.wagon.http.retryHandler.count>3</maven.wagon.http.retryHandler.count>
        <maven.wagon.http.pool>false</maven.wagon.http.pool>
        <http.keepAlive>false</http.keepAlive>
</properties>

Error in mvn side:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project parent-games-myproject: Failed to deploy artifacts: Could not transfer artifact com.my-proj.cw:parent-games-myproject:jar:1.0.0 from/to nexus-releases (https://nexus.url/repository/maven-private-release/): Transfer failed for https://nexus.url/repository/maven-private-release/com/my-proj/cw/parent-games-myproject/1.0.0/parent-games-myproject-1.0.0.jar: Connection reset -> [Help 1]

log content of nexus side:

2020-09-02 10:40:39,460+0000 DEBUG [qtp29708-47233]  my.user@email.com org.sonatype.nexus.blobstore.file.FileBlobStore - Deleted /nexus-data/blobs/maven-private-release-store/content/tmp/tmp$80bb45da-8a68-4a34-a660-8a0526d221c7.properties
2020-09-02 10:40:39,460+0000 DEBUG [qtp29708-47233]  my.user@email.com org.sonatype.nexus.repository.view.Router - Response: Response{status=Status{successful=true, code=201, message='null'}, payload=null}
2020-09-02 10:40:39,460+0000 DEBUG [qtp29708-47233]  my.user@email.com org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Request: Request{action='PUT', path='/com/my-proj/cw/parent-games-myproject/1.0.0/parent-games-myproject-1.0.0.pom.md5', parameters={}, payload=HttpRequestPayloadAdapter{contentType='null', size=32}, multipart=false}
2020-09-02 10:40:39,460+0000 DEBUG [qtp29708-47233]  my.user@email.com org.sonatype.nexus.repository.httpbridge.internal.DefaultHttpResponseSender - Sending response: Response{status=Status{successful=true, code=201, message='null'}, payload=null}
2020-09-02 10:40:39,460+0000 DEBUG [qtp29708-47233]  my.user@email.com org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Service completed

Nginx global config:

worker_processes auto;
worker_rlimit_nofile 32768;

events {
  worker_connections 16384;
  multi_accept off;
}

http {

  include /etc/nginx/mime.types;
  default_type application/octet-stream;
  server_names_hash_bucket_size 64;
  client_max_body_size 64m;
  access_log /var/log/nginx/access.log;
  error_log /var/log/nginx/error.log warn;
  sendfile on;
  tcp_nopush on;
  tcp_nodelay on;
  keepalive_timeout 65;
  keepalive_requests 100;
  server_tokens on;
  types_hash_max_size 2048;

  gzip on;

  include /etc/nginx/conf.d/*.conf;
  include /etc/nginx/sites-enabled/*;

}

Nginx site config:

server {
  listen 80;
  server_name nexus.url ;
  # Redirect non-https traffic to https
  return 301 https://$host$request_uri;
}

server {
  listen 443 ssl http2;
  server_name nexus.url;
  ssl_certificate /etc/nginx/ssl/nexus.url.crt;
  ssl_certificate_key /etc/nginx/ssl/nexus.url.key;
  server_tokens off;
  ssl_dhparam /etc/nginx/ssl/dhparams.pem;
  ssl_session_cache shared:SSL:10m;
  ssl_protocols TLSv1.2;
  ssl_prefer_server_ciphers on;
  ssl_ciphers 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-CAMELLIA256-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:CAMELLIA256-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:CAMELLIA128-SHA';

  gzip_proxied any;
  gzip on;
  gzip_min_length 1023;
  gzip_types text/plain text/css text/js text/javascript text/xml application/json application/javascript application/x-javascript application/xml application/xml+rss;
  proxy_send_timeout        1210s;
  proxy_read_timeout        1210s;
  proxy_max_temp_file_size  32384m;
  proxy_redirect            off;
  proxy_buffers             32 4k;
  send_timeout              1210s;
  client_max_body_size      0;
  client_body_buffer_size   128k;

}

The log on nexus reports absolutely nothing went wrong which is stunningly weird, and other modules build and deploy successfully... Any idea what can be left. at this point i just need the artefacts to be deployed so we can continue working

---- Extra Info ---

The module's main jar is 4KB, the tests jar is 2KB

The pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>parent-games</artifactId>
        <groupId>com.my-proj.cw</groupId>
        <version>1.0.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>parent-games-myproject</artifactId>

    <dependencies>
        <dependency>
            <groupId>com.my-proj.cw</groupId>
            <artifactId>cw-games-myproject</artifactId>
        </dependency>
        <dependency>
            <groupId>com.my-proj.cw</groupId>
            <artifactId>parent-core</artifactId>
        </dependency>
    </dependencies>

</project>
1 Answers

In no way is this a good solution but it's what ended up working for me

at one point i gave up on my test run which was deploying version 1.0.0 and then started an actual release using the proper version i needed (4.51.0). That fixed it, without any changes whatsoever.

Related