問題
線上nexus因為誤操作 blob存儲,造成nexus 出現Invalid state: DELETED; allowed: [STARTED],然后就是現有的nexus 也不能使用了(nexus服務異常)
以下是參考的解決方法
解決方法
手工處理相關的blob存儲,刪除,同時重啟nexus服務,但是有一個問題,我們不能刪除repo了,主要刪除repo就報錯,出現上邊的問題,解決方法:可以進入
orientdb進行刪除相關數據庫的配置,需要操作的數據庫有config 以及component
數據操作環境准備
注意因為需要使用orientdb 的console,所以修改使用了root賬戶
- docker-compose 文件
version: "3"
services:
nexus:
build: ./
ports:
- "8081:8081"
Dockerfile
FROM sonatype/nexus3:3.16.2
USER root
- 連接命令
需要進入容器:docker-compose exec nexus sh
component 數據庫操作
java -jar /opt/sonatype/nexus/lib/support/nexus-orient-console.jar
connect plocal:/opt/sonatype/sonatype-work/nexus3/db/component admin admin
select * from bucket;
delete from bucket where repository_name='<reponame>';
config 數據庫操作
java -jar /opt/sonatype/nexus/lib/support/nexus-orient-console.jar
connect plocal:/opt/sonatype/sonatype-work/nexus3/db/config admin admin
select * from repository
delete from repository where @RID=#38:3 // rid
參考資料
https://orientdb.com/docs/2.2.x/SQL.html
https://orientdb.com/docs/last/console/Console-Modes.html