从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]
答案 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>