Search returns unavailable component - Sonatype Nexus Repository - Sonatype Community

Search returns unavailable component

post by mario on Mar 12, 2020

hey guys

I have a situation in my maven-inhouse repository that there is an maven asset that is returned by a search with its id. But when I attempt to delete this asset nexus responds with a 404 not found.

I can confirm, that the assets for the component are not available in nexus any more. Also in UI I get an error when browsing for this asset.

We have 10.000s of assets in our repository. This error is a unique one - I don't really know how to reproduce it with a “new” artifact.

My steps to produce the current error:

Search API:

https://nexus-domain/service/rest/v1/search/assets?repository=maven-inhouse&version=*SNAPSHOT*

returns two items

e.g.

{

“downloadUrl”: “https://nexus-domain/repository/maven-inhouse/maven-group/artifact/4.0.0-SNAPSHOT.FOO.4/artifact-4.0.0-SNAPSHOT.FOO.4.pom.md5”,

“path”: “maven-group/artifact/4.0.0-SNAPSHOT.FOO.4/artifact-4.0.0-SNAPSHOT.FOO.4.pom.md5”,

“id”: “artifact-id-hash”,

“repository”: “maven-inhouse”,

“format”: “maven2”,

“checksum”: {

“sha1”: “sha1-hash”,

“md5”: “md5-hash”

}

}

when calling API for the asset:

https://nexus-domain/service/rest/v1/assets/artifact-id-hash

I receive a “404” not found

how can I “really” delete this asset?

i hope there is someone who can help.

thank you in advance,

-Mario


post by rseddon on Mar 12, 2020

It sounds like the search indexes for that repository need to be rebuilt. Try going to “system --> tasks” and scheduling and running a “repair - rebuild repository search” task against that repository.

Rich