1. 背景
以Docker启动的nexus仓库服务器在突发断电后重启时提示文件异常如下:
com.orientechnologies.orient.core.exception.OPageIsBrokenException: Following files and pages are detected to be broken ['asset.pcl' :34;], storage is switched to 'read only' mode. Any modification operations are prohibited. To restore database and make it fully operational you may export and import database to and from JSON.
此问题的解决方案就在错误提醒给出的信息中:
To restore database and make it fully operational you may export and import database to and from JSON
问题的原因是nexus所用的orientdb文件损坏,如何修复则需要根据部署情况处理,一般以官方镜像启动的nexus的数据库路径为/nexus-data/db/component(非docker安装可能在不同的位置)
2. 修复
假设数据库路径为
/nexus-data/db/component,并且确定/nexus-data的目录权限在用户nexus上;
找到orient-console的jar文件,一般在/opt/sonatype/nexus/l

当Docker中的Nexus仓库服务器遭遇断电重启,出现文件异常提示时,问题源于orientdb文件损坏。修复方法包括确认数据库路径,确保正确权限,使用orient-console.jar执行导出和导入操作,随后重启服务。

1030

被折叠的 条评论
为什么被折叠?



