---
title: "解决maven-metadata.xml文件下载卡死问题"
author: "powertech"
date: "2019-04-11T14:02:49Z"
tags: []
categories: ["开源软件"]
slug: "maven-metadata-xml"
draft: false
lastmod: "2019-04-11T14:02:49Z"
id: 2439989
url: "https://powertech.iteye.com/blog/2439989"
---

http://192.168.1.110:8081/nexus/content/groups/public/com/XXXXX/maven-metadata.xml
文件下载不下来，一直卡在那里，也不返回404

http://192.168.1.110:8081/nexus/
登录控制台
左侧面板展开Administration标签
logging--log--last 100kb

2019-04-11 11:46:18,437+0800 INFO   admin org.sonatype.nexus.index.NexusScanningListener - Scanning of repositoryID="apache-snapshots" started.
2019-04-11 11:46:19,247+0800 INFO   admin org.sonatype.nexus.index.NexusScanningListener - Scanning of repositoryID="apache-snapshots" finished: scanned=1, added=0, updated=1, removed=0, scanningDuration=0:00:00.810

java.io.IOException: Exception(s) happened during reindexAllRepositories()
	at org.sonatype.nexus.index.DefaultIndexerManager.reindexRepository(DefaultIndexerManager.java:967) ~
	at org.sonatype.nexus.index.DefaultIndexerManager.reindexRepository(DefaultIndexerManager.java:938) ~
	at org.sonatype.nexus.index.tasks.ReindexTaskHandlerLegacy.reindexRepository(ReindexTaskHandlerLegacy.java:61) ~

更新索引失败，有可能是索引文件损坏

展开Administration标签 Support tools
System Information


nexus-configuration
installDirectory	D:\nexus2.11\nexus-2.11.1-01
workingDirectory	D:\nexus2.11\sonatype-work\nexus
temporaryDirectory	D:\nexus2.11\nexus-2.11.1-01\tmp


登录nexus所在服务器，停止nexus服务
进入D:\nexus2.11\sonatype-work\nexus目录
进入D:\nexus2.11\sonatype-work\nexus\indexer目录
删除对应的索引文件apache-snapshots-ctx

重启nexus服务，管理员登录，选中apache-snapshots repositories 右键，update index即可

再次访问http://192.168.1.110:8081/nexus/content/groups/public/com/XXXXX/maven-metadata.xml
404 - Path com/XXXXX/maven-metadata.xml not found in group repository "Public Repositories" .

Path com/XXXXX/maven-metadata.xml not found in group repository "Public Repositories" .
瞬间返回404

再看仓库的对该请求的处理过程
http://192.168.1.110:8081/nexus/content/groups/public/com/XXXXX/maven-metadata.xml?describe

Describe of /groups/public/com/nk/ztjar/1.0-SNAPSHOT/maven-metadata.xml

This page describes the processing of a request made by external client, using information from the request, retrieved item (or exception if not item was retrieved) and some intermittent processing states.
Processing time

1.141 s
Request Context


参考文件章
https://community.sonatype.com/t/numberformatexception-when-fetching-index-for-maven-central/1010/2