Skip to content

Nexus logs indicate that the user "sometimes" it does not authenticate #610

@RobertoSoft

Description

@RobertoSoft

Affected version

3.1.3

Bug description

Error is:

[WARNING] Could not transfer metadata it.REDACTED/maven-metadata.xml from/to snapshots-soft (https://REDACTED:9443/repository/snapshots): status code: 401, reason phrase: Unauthorized (401)
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.1.3:deploy (default-deploy) on project nexrates-console: Failed to retrieve remote metadata it.REDACTED/maven-metadata.xml: Could not transfer metadata it.REDACTED/maven-metadata.xml from/to snapshots-soft (https://REDACTED:9443/repository/snapshots): status code: 401, reason phrase: Unauthorized (401) -> [Help 1]

When running the goal maven-deploy-plugin:3.1.3:deploy (default-deploy) on a GitLab runner, sometimes I get a 401.
The mvn command is std (see below).
mvn -B clean deploy -Dmaven.build.cache.local.enabled=true -Dmaven.build.cache.remote.enabled=true -Dmaven.build.cache.remote.save.enabled=true -Dorg.slf4j.simpleLogger.defaultLogLevel=warn

Nexus logs indicate that the user "sometimes" does not authenticate (see below)

NOK 10.131.67.114 - - [09/Jul/2025:08:48:44 +0200] "GET /v2/REDACTED/manifests/latest HTTP/1.1" 404 - 1539 4 "docker/25.0.3 go/go1.21.6 git-commit/f417435 kernel/4.18.0-513.11.1.el8_9.0.1.x86_64 os/linux arch/amd64" [qtp519495085-6584]
NOK 10.131.67.107 - - [09/Jul/2025:08:48:54 +0200] "GET /repository/snapshots/REDACTED/maven-metadata.xml HTTP/1.1" 401 - 0 1 "Apache-Maven/3.9.9 (Java 17.0.14; Windows Server 2012 R2 6.3)" [qtp519495085-6607]
OK 10.131.67.107 - ci-user [09/Jul/2025:08:48:54 +0200] "GET /repository/snapshots/REDACTED/maven-metadata.xml HTTP/1.1" 404 - 1715 17 "Apache-Maven/3.9.9 (Java 17.0.14; Windows Server 2012 R2 6.3)" [qtp519495085-6610]

Above it tried anonymous then tried using the settings.xml configurations

Sometimes instead just fails.

Since the machine is being used for continuous cicd, a hunch is another process may be locking settings.xml hence the non-usage of the correct user. It fails randomly both on Windows Server 2012 and on Linux (Rocky 8.x).

Any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions