为什么在从Nexus Professional降级到Nexus OSS之后,它说“无法查找安全性实施”?

时间:2016-04-05 08:50:49

标签: nexus

从Nexus Professional降级到OSS后,Nexus启动但在[nexus-runtime-oss] /logs/wrapper.log

中有例外
INFO  [jetty-main-1   ] - org.sonatype.security.configuration.source.FileSecurityConfigurationSource - Loading Security configuration from /var/opt/jet/nexus-data/sonatype-work/nexus/conf/security-configuration.xml
ERROR [jetty-main-1   ] - org.sonatype.security.DefaultSecuritySystem - Unable to lookup security realms
java.lang.ClassNotFoundException: User-Token-Realm
|      at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_66]
|      at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_66]

1 个答案:

答案 0 :(得分:0)

原因是Nexus OSS不支持“User-Token-Realm”安全领域。

编辑sonatype-work / nexus / conf / security-configuration.xml并删除领域中的相应行

<?xml version="1.0" encoding="UTF-8"?>
<security-configuration>
  <version>2.0.7</version>
  <anonymousAccessEnabled>true</anonymousAccessEnabled>
  <anonymousUsername>anonymous</anonymousUsername>
  <anonymousPassword>...</anonymousPassword>
  <realms>
    <realm>User-Token-Realm</realm>  //remove this line
    <realm>XmlAuthenticatingRealm</realm>
    <realm>XmlAuthorizingRealm</realm>
  </realms>
  <hashIterations>1024</hashIterations>
</security-configuration>