Recovering normal behaviour of Maven Central Repository (nexus v.2)

Hi, this is my first post, then, hello to everyone! I think next months I’m probably going to write more as we already have installed a nexus v.3 and we will start a migration from nexus v.2 as soon as possible.
I looked around, through the posts if a similar situation was discussed before but I couldn’t find any (I hope I didn’t look with little attention).

Well, we have a Nexus v. 2.8.1-01 on a VM Linux RH 6.6 box and after a “DISK FULL” problem of the box, which, therefore, I solved increasing the space, we have now the following situation.

By the way, I suppose, the error was detected while running the Scheduled Task: “Download indexes” of Repository: central (=> Maven Central) and now it works: (Last Result: OK[13m59s])

In the Repository Section and on the Maven Central Repository, under the “Routing” tab, in the “Discovery” section I find this “Unsuccessful” message:

Remote strategy prefix-file on M2Repository(id=central) detected invalid input, results discarded: Prefix file size exceeds maximum allowed size (100000), refusing to load it.

And I discovered that, in the server directory /sonatype-work/nexus/storage/central are missing few directories: .index .nexus .meta

Then I assumed that the error is referred to this corrupted file system situation.

How can I recover the correct functionality of the Central Repository? Is this procedure correct?

(suggested by chatGPT):

  1. Stop the Nexus 2 server: Ensure that the Nexus 2 server is not running before making any changes to the repository.
  2. Delete the existing repository: Backup your existing repository if needed, and then delete it. This step will remove all artifacts and configurations associated with the repository. Be cautious as this action cannot be undone.
  3. Create a new repository: In the Nexus 2 administrative interface, create a new repository with the desired configuration. Make sure to choose the appropriate repository type (e.g., hosted, proxy, or group).
  4. Restart the Nexus 2 server: Start the Nexus 2 server again to apply the changes and create the necessary directories.

After that, to restore the backup artifacts, I could follow these instructions?

  1. Same as 1.
  2. Copy the artifacts from the backup location to the appropriate storage directory and check appropriate permissions
  3. Same as 4.

May be 6. can be done before 4. ?

To conclude, I wonder in which state is the “proxyed” maven central repository; Are the artifact available? The problem is about the artifact still on the remote repository that wouldn’t be proxyed?

Thank you in advance for your help,

Leonardo