nexus3.1 迁移之后,启动报错“Lock file access denied”解决办法

错误日志

Java HotSpot(TM) 64-Bit Server VM warning: Cannot open file /nexus-data/log/jvm.log due to Permission denied

Warning:  Cannot open log file: /nexus-data/log/jvm.log
Warning:  Forcing option -XX:LogFile=/tmp/jvm.log
Unable to delete file: /nexus-data/cache/cache.lock
Unable to update instance pid: /nexus-data/instances/instance.properties (Permission denied)
Exception in thread "Thread-2" java.lang.SecurityException: Could not lock User prefs. Lock file access denied.
        at java.util.prefs.FileSystemPreferences.checkLockFile0ErrorCode(FileSystemPreferences.java:937)
        at java.util.prefs.FileSystemPreferences.lockFile(FileSystemPreferences.java:925)
        at java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:729)
        at java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:824)
        at java.util.prefs.FileSystemPreferences.syncWorld(FileSystemPreferences.java:464)
        at java.util.prefs.FileSystemPreferences.access$1200(FileSystemPreferences.java:50)
        at java.util.prefs.FileSystemPreferences$4$1.run(FileSystemPreferences.java:442)
Unable to delete directory /nexus-data/cache.

解决办法

找到nexus3的目录nexus-data,执行如下命令:

chown -hR 200 ./nexus-data

重启nexus3即可


by 刘迎光@狐刺科技
OpenBI交流群:495266201
MicroService 微服务交流群:217722918
mail: liuyg#liuyingguang.cn
博主首页(防止爬虫):http://blog.liuyingguang.cn
OpenBI问答社区:http://www.openbi.tk/

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页