解决chrome/chromium 蓝屏的问题
Dec 11

 升级了 Sonatype Nexus 之后看了一下日志发现很多WARN

jvm 1    | 2012-12-11 23:44:01 WARN  [Timer-0        ] - java.util.prefs - Could not lock User prefs. Unix error code 2.

jvm 1    | 2012-12-11 23:44:01 WARN  [Timer-0        ] - java.util.prefs - Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

jvm 1    | 2012-12-11 23:44:31 WARN  [Timer-0        ] - java.util.prefs - Could not lock User prefs. Unix error code 2.

jvm 1    | 2012-12-11 23:44:31 WARN  [Timer-0        ] - java.util.prefs - Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

jvm 1    | 2012-12-11 23:45:01 WARN  [Timer-0        ] - java.util.prefs - Could not lock User prefs. Unix error code 2.

jvm 1    | 2012-12-11 23:45:01 WARN  [Timer-0        ] - java.util.prefs - Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

jvm 1    | 2012-12-11 23:45:31 WARN  [Timer-0        ] - java.util.prefs - Could not lock User prefs. Unix error code 2.

jvm 1    | 2012-12-11 23:45:31 WARN  [Timer-0        ] - java.util.prefs - Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

jvm 1    | 2012-12-11 23:46:01 WARN  [Timer-0        ] - java.util.prefs - Could not lock User prefs. Unix error code 2.

jvm 1    | 2012-12-11 23:46:01 WARN  [Timer-0        ] - java.util.prefs - Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

然后就google了一下发现 nexus 的 jira上有人提这个问题。

https://issues.sonatype.org/browse/NEXUS-3671

就是说在Linux下没有在对应 user的home目录下创建 .java/.userPrefs 目录。不过我的 nexus的home是 /opt/nexus 虽然权限都是 nexus还是会报错。就是说 nexus不能自动创建这个目录。手动创建一下就好了。还要记得把 这两级目录的 owner设置好。

chown -R nexus:nexus /opt/nexus/.java


Like others

2 Responses to “Nexus 在 Linux上报Could not lock User prefs的问题”

  1. ice Says:

    i like your job!

  2. ss Says:

    你这个blog还在更新么?能提供源代码么

Leave a Reply

Identifying Code