zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    CFileDialog打开多个文件失败 返回错误 FNERR_BUFFERTOOSMALL
    VC 控件集合
    [摘]思科认证三步走及找工作的七大职业走向
    windows无法配置此无线连接解决办法
    VS 2019 项目添加引用,提示:对COM组件的调用返回了错误HRESULT E_FAIL
    c# winform 获取当前程序运行根目录
    DataGridView 转换成 DataTable
    SQL Server日志文件过大 大日志文件清理方法 不分离数据库
    行动吧!让自己骚起来
    抖音很火的3D旋转相册 (源代码分享)
  • 原文地址:https://www.cnblogs.com/fejerry/p/15533859.html
Copyright © 2011-2022 走看看