所以,我的google-fu很弱...... 我无法找到另一个错误实例。
自从一天以来,我一直在使用我的teamcity nuget存储库。 来自repo的NuGet下载失败,出现意外的EOF或损坏的软件包警告。
据我所知,这不是硬件故障,vm和vm-host不会报告磁盘错误。
为了增加侮辱伤害,teamcity日志文件'teamcity-javaLogging-2013-07-17.log'增长无限(在键入此内容时为+ 3GB,每天10 MB是正常的),堆栈跟踪类似于下方。
我的Teamcity版本是7.1.5(build 24400)
任何人都知道如何从这次失败中恢复过来?
我还没有鼓起勇气去清除我在teamcity管理页面上找到的所有缓存(管理>诊断>缓存),因为在该页面上有一个可怕的黄色警告不要这样做
以下是我正在获得的堆栈跟踪示例。
17-jul-2013 3:00:02 net.sf.ehcache.store.DiskStore get
SEVERE: provider-nugetCache: Could not read disk store element for key 2731. Error was unexpected EOF in middle of data block
java.io.StreamCorruptedException: unexpected EOF in middle of data block
at java.io.ObjectInputStream$BlockDataInputStream.refill(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.read(Unknown Source)
at java.io.DataInputStream.readInt(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readInt(Unknown Source)
at java.io.ObjectInputStream.readInt(Unknown Source)
at jetbrains.buildServer.serverSide.metadata.impl.metadata.SerializableEntry.readSplitted(SerializableEntry.java:5)
at jetbrains.buildServer.serverSide.metadata.impl.metadata.EntryImpl.readObjectInternal(EntryImpl.java:34)
at jetbrains.buildServer.serverSide.metadata.impl.metadata.SerializableEntry.readExternal(SerializableEntry.java:16)
at java.io.ObjectInputStream.readExternalData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at net.sf.ehcache.store.DiskStore.loadElementFromDiskElement(DiskStore.java:313)
at net.sf.ehcache.store.DiskStore.get(DiskStore.java:268)
at net.sf.ehcache.Cache.searchInDiskStore(Cache.java:1290)
at net.sf.ehcache.Cache.get(Cache.java:904)
at net.sf.ehcache.Cache.get(Cache.java:879)
at jetbrains.buildServer.serverSide.metadata.impl.cache.TypedCacheImpl.getValue(TypedCacheImpl.java:3)
at jetbrains.buildServer.serverSide.metadata.impl.metadata.MetadataStorageImpl.getReportedKeys(MetadataStorageImpl.java:7)
at jetbrains.buildServer.serverSide.metadata.impl.metadata.MetadataStorageImpl.removeBuild(MetadataStorageImpl.java:45)
at jetbrains.buildServer.serverSide.metadata.impl.indexer.BuildIndexCleaner.performCleanup(BuildIndexCleaner.java:16)
at jetbrains.buildServer.serverSide.impl.cleanup.HistoryEntryCleaner.cleanupExtensionsData(HistoryEntryCleaner.java:38)
at jetbrains.buildServer.serverSide.impl.cleanup.HistoryEntryCleaner.performCleanup(HistoryEntryCleaner.java:138)
at jetbrains.buildServer.serverSide.impl.cleanup.HistoryEntryCleaner.performCleanup(HistoryEntryCleaner.java:132)
at jetbrains.buildServer.serverSide.impl.cleanup.ServerCleanupManagerImpl$3.performCleanup(ServerCleanupManagerImpl.java)
at jetbrains.buildServer.serverSide.db.DBFacade$1$1.doInConnection(DBFacade.java:178)
at jetbrains.buildServer.serverSide.db.DBFacade$6.doInConnection(DBFacade.java:415)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:341)
at jetbrains.buildServer.serverSide.db.DBFacade._runSql(DBFacade.java:411)
at jetbrains.buildServer.serverSide.db.DBFacade.access$000(DBFacade.java:33)
at jetbrains.buildServer.serverSide.db.DBFacade$1.doInTransaction(DBFacade.java:174)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at jetbrains.buildServer.serverSide.db.DBFacade.compact(DBFacade.java:171)
at jetbrains.buildServer.serverSide.impl.cleanup.ServerCleanupManagerImpl.startCleanup(ServerCleanupManagerImpl.java:74)
at jetbrains.buildServer.serverSide.impl.cleanup.ServerCleanupManagerImpl$2.run(ServerCleanupManagerImpl.java:0)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
17-jul-2013 3:00:02 net.sf.ehcache.store.DiskStore remove
SEVERE: provider-nugetCache: Could not remove disk store entry for key 2731. Error was unexpected EOF in middle of data block
java.io.StreamCorruptedException: unexpected EOF in middle of data block
at java.io.ObjectInputStream$BlockDataInputStream.refill(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.read(Unknown Source)
at java.io.DataInputStream.readInt(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readInt(Unknown Source)
at java.io.ObjectInputStream.readInt(Unknown Source)
at jetbrains.buildServer.serverSide.metadata.impl.metadata.SerializableEntry.readSplitted(SerializableEntry.java:5)
at jetbrains.buildServer.serverSide.metadata.impl.metadata.EntryImpl.readObjectInternal(EntryImpl.java:34)
at jetbrains.buildServer.serverSide.metadata.impl.metadata.SerializableEntry.readExternal(SerializableEntry.java:16)
at java.io.ObjectInputStream.readExternalData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at net.sf.ehcache.store.DiskStore.loadElementFromDiskElement(DiskStore.java:313)
at net.sf.ehcache.store.DiskStore.remove(DiskStore.java:483)
at net.sf.ehcache.Cache.remove(Cache.java:1465)
at net.sf.ehcache.Cache.remove(Cache.java:1392)
at net.sf.ehcache.Cache.remove(Cache.java:1350)
at net.sf.ehcache.Cache.remove(Cache.java:1328)
at jetbrains.buildServer.serverSide.metadata.impl.cache.TypedCacheImpl.remove(TypedCacheImpl.java:16)
at jetbrains.buildServer.serverSide.metadata.impl.metadata.MetadataStorageImpl.removeBuild(MetadataStorageImpl.java:30)
at jetbrains.buildServer.serverSide.metadata.impl.indexer.BuildIndexCleaner.performCleanup(BuildIndexCleaner.java:16)
at jetbrains.buildServer.serverSide.impl.cleanup.HistoryEntryCleaner.cleanupExtensionsData(HistoryEntryCleaner.java:38)
at jetbrains.buildServer.serverSide.impl.cleanup.HistoryEntryCleaner.performCleanup(HistoryEntryCleaner.java:138)
at jetbrains.buildServer.serverSide.impl.cleanup.HistoryEntryCleaner.performCleanup(HistoryEntryCleaner.java:132)
at jetbrains.buildServer.serverSide.impl.cleanup.ServerCleanupManagerImpl$3.performCleanup(ServerCleanupManagerImpl.java)
at jetbrains.buildServer.serverSide.db.DBFacade$1$1.doInConnection(DBFacade.java:178)
at jetbrains.buildServer.serverSide.db.DBFacade$6.doInConnection(DBFacade.java:415)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:341)
at jetbrains.buildServer.serverSide.db.DBFacade._runSql(DBFacade.java:411)
at jetbrains.buildServer.serverSide.db.DBFacade.access$000(DBFacade.java:33)
at jetbrains.buildServer.serverSide.db.DBFacade$1.doInTransaction(DBFacade.java:174)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at jetbrains.buildServer.serverSide.db.DBFacade.compact(DBFacade.java:171)
at jetbrains.buildServer.serverSide.impl.cleanup.ServerCleanupManagerImpl.startCleanup(ServerCleanupManagerImpl.java:74)
at jetbrains.buildServer.serverSide.impl.cleanup.ServerCleanupManagerImpl$2.run(ServerCleanupManagerImpl.java:0)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
答案 0 :(得分:4)
据我所知,TeamCity NuGet Server受“管理|项目相关设置|构建历史记录清理”中定义的工件清理策略的约束,因此请确保您的程序包仍在那里!!
我的个人建议是始终设置专用的nuget服务器。 您可以免费设置一个只需克隆官方NugetGallery project on GitHub:这与nuget.org使用的代码库相同,因此您将拥有熟悉的用户界面和更高的性能(NugetGallery利用Lucene.NET索引功能)。
答案 1 :(得分:3)
正如Remco所说,您可以通过转到http:// {teamcity} /admin/admin.html?item=diagnostics&tab=cache并点击“buildsMetadata”旁边的“重置”来清除包缓存。这将从您的Feed中删除所有NuGet包,直到您重新编制索引。
您可以通过调用TeamCity的REST API重新索引由单个构建生成的NuGet包。要重新编制所有构建索引,您必须编写一个脚本来遍历所有构建并重新索引每个构建。
错误报告:
http://youtrack.jetbrains.com/issue/TW-25384
http://youtrack.jetbrains.com/issue/TW-23576
示例reindex脚本:
http://youtrack.jetbrains.com/issue/TW-19411#comment=27-408230
答案 2 :(得分:1)
似乎TeamCity NuGet Server的索引以某种方式损坏了,包很好,所以清除缓存是解决方案。
但是,我没有弄清楚如何重新填充索引。
请注意,清除nuget包缓存会从TeamCity NuGet Server中删除所有包,因此您可以从一个干净的平板开始......