Nexus OrientDB数据库变为只读 storage is switched to 'read only' mode
2021/11/11 2:11:50
本文主要是介绍Nexus OrientDB数据库变为只读 storage is switched to 'read only' mode,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
错误消息 :
2021-01-15 16:23:06,604+0800 ERROR [event-6-thread-1396 <command>sql.select from browse_node where asset_id=:asset_id limit 1</command>] yw com.orientechnologies.orient.core.storage.cache.local.OWOWCache - $ANSI{grean {db=security}}checksum verification failed for page '2' of 'browse_node_3.pcl'. 2021-01-15 16:23:06,627+0800 WARN [qtp1067566931-4517] yw org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: PUT /repository/maven-deploy/org/bouncycastle/bcprov-jdk15on/1.64/bcprov-jdk15on-1.64.jar.md5 com.orientechnologies.orient.core.exception.OPageIsBrokenException: Following files and pages are detected to be broken ['browse_node_3.pc]' :2;], storage is switched to 'read only' mode. Any modifycation operations are prohibited. To restore database and make it fully operational you may export and import database to and from JSON. DB name="security" at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.CheckLowDiskSpaceRequestsAndReadOnlyConditions(OAbstractpaginatedStorage.java:5144) at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commit(OAbstractPaginatedStorage.java:1729) at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:541) at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:99) at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2908) at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2870) at org.sonatype.nexus.repository.storage.StorageTxImpl.commit(StorageTxImpl.java:179) ...
解决步骤:
-
停止nexus进程
./nexus stop
-
备份变成只读模式的数据库 ,我这里是 security 数据库
cp -rv /opt/nexus/sonatype-work/nexus3/db/security /backup/
-
运行OrientDB 数据库客户端
java -jar /opt/nexus-3.12.1-01/lib/support/nexus-orient-console.jar
-
连接出错数据库
orientdb> connect PLOCAL:/opt/sonatype-work/nexus3/db/security admin admin
-
导出数据库
orientdb {db=security}> EXPORT DATABASE /backup/orientdb-security.export
-
断开与数据库security 的连接
orientdb {db=security}> DISCONNECT
-
删除出问题的库
orientdb> DROP DATABASE PLOCAL:/opt/sonatype-work/nexus3/db/security admin admin
-
重新创建出问题的库
orientdb> CREATE DATABASE PLOCAL:/opt/sonatype-work/nexus3/db/security admin admin
-
导入之前的备份
orientdb {db=security}> IMPORT DATABASE /backup/orientdb-security.export.gz
-
关闭数据库连接
orientdb {db=security}> DISCONNECT
-
退出数据库客户端
orientdb> EXIT
这篇关于Nexus OrientDB数据库变为只读 storage is switched to 'read only' mode的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2025-01-09CMS内容管理系统是什么?如何选择适合你的平台?
- 2025-01-08CCPM如何缩短项目周期并降低风险?
- 2025-01-08Omnivore 替代品 Readeck 安装与使用教程
- 2025-01-07Cursor 收费太贵?3分钟教你接入超低价 DeepSeek-V3,代码质量逼近 Claude 3.5
- 2025-01-06PingCAP 连续两年入选 Gartner 云数据库管理系统魔力象限“荣誉提及”
- 2025-01-05Easysearch 可搜索快照功能,看这篇就够了
- 2025-01-04BOT+EPC模式在基础设施项目中的应用与优势
- 2025-01-03用LangChain构建会检索和搜索的智能聊天机器人指南
- 2025-01-03图像文字理解,OCR、大模型还是多模态模型?PalliGema2在QLoRA技术上的微调与应用
- 2025-01-03混合搜索:用LanceDB实现语义和关键词结合的搜索技术(应用于实际项目)