Nexus Docker下宕机后修复方式

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

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值