修复因为存储空间问题引起的nexus 服务启动异常

故障描述

因为nexus所在服务器存储空间满了, 做了部分清理操作,结果nexus 启动异常,提示错误信息基本类似如下:

build 285537d2767275f460df32c6a3be01bfff6a517c, branch 2.2.x) com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage '/mnt/sonatype-work/nexus3/db/config' with mode=rw DB name="config" at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:323)

解决方法

基本都是修复数据库,重建索引,但是有一个问题

  • 一般处理方法
    使用console 工具
java -jar ${nexus-path}/lib/support/nexus-orient-console.jar

连接数据库

connect plocal:${nexus-db-path}/db/component admin admin

修复数据库以及索引

repair database --fix-links
rebuild index *
repair database --fix-graph
repair database --fix-ridbags
repair database --fix-bonsai
  • 特殊情况
    如果以上方法还是有问题,一般的提示信息如下,参考如下操作:
基本还是包含了rw 的问题
with mode=rw DB name="config" at 

删除wal 文件(对应数据库的)

比如处理component 数据库的,一般在
cd ${nexus-db-path}/db/component 
rm -rf *.wal

连接数据库,以及修复可以参考上边的方法

connect plocal:${nexus-db-path}/db/component admin admin
repair database --fix-links
repair database --fix-links
rebuild index *
repair database --fix-graph
repair database --fix-ridbags
repair database --fix-bonsai

参考资料

https://blog.csdn.net/shenyue_sam/article/details/77164285
https://stackoverflow.com/questions/53021763/cannot-open-local-storage-nexus3-db-config-with-mode-rw-db-name-config
https://groups.google.com/a/glists.sonatype.com/forum/?utm_medium=email&utm_source=footer#!msg/nexus-users/64W_y9fDGzQ/o0FKRgiDAwAJ

posted on 2019-04-18 11:34  荣锋亮  阅读(2102)  评论(2编辑  收藏  举报

导航