Nexus3数据异常修复
//
# Nexus3数据异常修复
# SYSTEM java.util.prefs - Could not lock User prefs. Unix error code 2
报错日志
2022-10-17 08:39:35,047+0000 WARN [Timer-0] *SYSTEM java.util.prefs - Could not lock User prefs. Unix error code 2. 2022-10-17 08:39:35,048+0000 WARN [Timer-0] *SYSTEM java.util.prefs - Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock. 2022-10-17 08:40:00,007+0000 INFO [quartz-3-thread-7] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Storage facet cleanup' [repository.storage-facet-cleanup] state change WAITING -> RUNNING 2022-10-17 08:40:00,014+0000 INFO [quartz-3-thread-7] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Storage facet cleanup' [repository.storage-facet-cleanup] state change RUNNING -> WAITING (OK) 2022-10-17 08:40:05,048+0000 WARN [Timer-0] *SYSTEM java.util.prefs - Could not lock User prefs. Unix error code 2. 2022-10-17 08:40:05,048+0000 WARN [Timer-0] *SYSTEM java.util.prefs - Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.容器数据挂载目录,先备份
cp -a /opt/nexus3/nexus-data/db/component /opt/nexus3/nexus-data/db/component
ls -l component/*.wal
rm -f component/*.wal
1
2
3
2
3
- 进入容器内,修复
docker exec -it -u root nexus bash
find / -name support
cd /opt/sonatype/nexus/lib/support/
java -jar nexus-orient-console.jar
connect plocal:/nexus-data/db/component admin admin
REPAIR DATABASE --fix-graph
REPAIR DATABASE --fix-links
REPAIR DATABASE --fix-ridbags
REPAIR DATABASE --fix-bonsai
REBUILD INDEX *
disconnect
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- 修复完重新授权
chown -R 200.200 component/
exit
docker restart nexus
1
2
3
4
2
3
4
//
如果此文章对您有帮助,点击 -->> 请博主喝咖啡 (opens new window)
上次更新: 2025/11/13, 16:14:56