当前位置: 首页 > article >正文

Windows版Nexus因磁盘空间占满导致orientdb数据损坏修复

由于年底公司项目多,大量程序打包,导致windows虚拟机用于存放库文件的nexus所在磁盘空间减少,jenkins打包和本地发布jar包出现无响应情况,开始怀疑为磁盘空间不足导致,关闭系统扩展了虚拟机磁盘空间,但是依旧无法启动服务,查看“E:\Nexus\sonatype-work\nexus3\log”下的日志报如下:

2024-12-07 09:55:29,080+0800 ERROR [ForkJoinPool.commonPool-worker-4]  *SYSTEM ROOT - $ANSI{green {db=component}} Error during storage close
java.lang.NullPointerException: null
	at com.orientechnologies.orient.core.storage.impl.local.paginated.wal.ODiskWriteAheadLog.cutTill(ODiskWriteAheadLog.java:919)
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.makeFullCheckpoint(OAbstractPaginatedStorage.java:3705)
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doClose(OAbstractPaginatedStorage.java:4412)
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.close(OAbstractPaginatedStorage.java:581)
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:316)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:259)
	at org.sonatype.nexus.orient.DatabaseManagerSupport.connect(DatabaseManagerSupport.java:143)
	at org.sonatype.nexus.orient.DatabaseInstanceImpl.doStart(DatabaseInstanceImpl.java:56)
	at org.sonatype.goodies.lifecycle.LifecycleSupport.start(LifecycleSupport.java:104)
	at org.sonatype.goodies.lifecycle.Lifecycles.start(Lifecycles.java:44)
	at org.sonatype.nexus.orient.DatabaseManagerSupport.createInstance(DatabaseManagerSupport.java:252)
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Unknown Source)
	at org.sonatype.nexus.orient.DatabaseManagerSupport.instance(DatabaseManagerSupport.java:231)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source)
	at java.util.concurrent.CountedCompleter.exec(Unknown Source)
	at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source)
	at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
2024-12-07 09:55:29,080+0800 ERROR [ForkJoinPool.commonPool-worker-4]  *SYSTEM ROOT - Exception `4170C1CB` in storage `plocal:Y:/Nexus/sonatype-work/nexus3/db/component`: 2.2.34 (build f340442755a31eabc91b87cb3ef99eda5cee6ebd, branch 2.2.x)
com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage 'Y:/Nexus/sonatype-work/nexus3/db/component' with mode=rw
	DB name="component"
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:323)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:259)
	at org.sonatype.nexus.orient.DatabaseManagerSupport.connect(DatabaseManagerSupport.java:143)
	at org.sonatype.nexus.orient.DatabaseInstanceImpl.doStart(DatabaseInstanceImpl.java:56)
	at org.sonatype.goodies.lifecycle.LifecycleSupport.start(LifecycleSupport.java:104)
	at org.sonatype.goodies.lifecycle.Lifecycles.start(Lifecycles.java:44)
	at org.sonatype.nexus.orient.DatabaseManagerSupport.createInstance(DatabaseManagerSupport.java:252)
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Unknown Source)
	at org.sonatype.nexus.orient.DatabaseManagerSupport.instance(DatabaseManagerSupport.java:231)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source)
	at java.util.concurrent.CountedCompleter.exec(Unknown Source)
	at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source)
	at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.NullPointerException: null
	at com.orientechnologies.orient.core.storage.impl.local.paginated.wal.ODiskWriteAheadLog.cutTill(ODiskWriteAheadLog.java:919)
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.makeFullCheckpoint(OAbstractPaginatedStorage.java:3705)
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.recoverIfNeeded(OAbstractPaginatedStorage.java:3936)
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:288)
	... 17 common frames omitted

经网上查询为磁盘空间不足导致数据库文件损坏!但是查看修复方式几乎全是linux上的,按照其步骤尝试发现修改一些方式后可修复,为防止原作者删除文档,故修改为windows版发布。

执行指令:

E:\Nexus\nexus-3.11.0-01\jre\bin\java -jar E:\Nexus\nexus-3.11.0-01\lib\support\nexus-orient-console.jar

此指令是进入orientdb数据库工具包,nexus自带,且可用自带的jre运行。

在工具包运行下的命令行执行指令:

CONNECT PLOCAL:E:/Nexus/sonatype-work/nexus3/db/component admin admin

 注意:windows复制出来的“\”要全改成“/”否则将会报错,路径不识别。

通常数据库损坏时,该方式现无法访问数据库。

输入“exit”指令,退出工具包程序,到“E:\Nexus\sonatype-work\nexus3\db\component”目录下,删除所有wal后缀的文件。

然后执行上方指令重新进入工具包(忘记要不要登录到component 下了,因无损坏环境,故可先尝试是否可admin登陆,再执行指令),逐条执行如下指令:

REBUILD INDEX *

REPAIR DATABASE --fix-graph

REPAIR DATABASE --fix-links

REPAIR DATABASE --fix-ridbags

REPAIR DATABASE --fix-bonsai

DISCONNECT

 执行完成后,尝试重启系统,查看nexus服务是否正常启动


http://www.kler.cn/a/429093.html

相关文章:

  • Typora + PowerShell 在终端打开文件
  • 《AI赋能光追:开启图形渲染新时代》
  • 【视觉惯性SLAM:十七、ORB-SLAM3 中的跟踪流程】
  • SQL刷题快速入门(二)
  • Spring Web MVC综合案例
  • mysql8.0 重要指标参数介绍
  • defer那些事儿
  • python 清华pip镜像源报HTTP error 403
  • JavaSE——泛型编程
  • 运输层6——TCP流量控制
  • LDR6500:音频双C支持,数字与模拟的完美结合
  • Mac通过Windows App远程访问windows电脑报错0x104的解决办法
  • iPhone怎么一键删除照片:快速清理存储空间
  • 关于我、重生到500年前凭借C语言改变世界科技vlog.18——内存函数
  • Python的3D可视化库vedo 1-3 (visual模块)网格对象的线和面、图片的属性
  • 【Python】批量下载抖音视频
  • 通过ThinkPad小红点键盘左右滑动页面
  • OpenCV 图像变换与处理实战
  • 2.Flink的项目初始化和Hello-world
  • 「Mac玩转仓颉内测版47」小学奥数篇10 - 数列求和
  • 电脑无法识别usb设备怎么办?电脑无法识别usb解决方法
  • 基于STM32的DS18B20温度报警器_可调上下限Proteus仿真设计(仿真+程序+设计报告+讲解视频)
  • 鸿蒙ZRouter动态路由框架—服务路由
  • java+springboot+mysql游乐园管理系统
  • 重生之我在学Vue-- Vue3 学习路径总览
  • 生成SSH秘钥文件