报错信息
occurred shutting down framework: java.io.FileNotFoundException: Karaf etc folder not found: /usr/local/nexus-3.30.0-01/bin/etc/karaf java.io.FileNotFoundException: Karaf etc folder not found: /usr/local/nexus-3.30.0-01/bin/etc/karaf at org.apache.karaf.main.ConfigProperties.<init>(ConfigProperties.java:226) at org.apache.karaf.main.Main.updateInstancePidAfterShutdown(Main.java:227) at org.sonatype.nexus.karaf.NexusMain.main(NexusMain.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:85) at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:65)
本地使用最新3.30.0,先后执行以下命令
tar -zxvf nexus-3.30.0-01.tar.gz -C /usr/local cd /usr/local ln -s nexus-3.30.0-01 nexus
export NEXUS_HOME=/usr/local/nexus
source /etc/profile
修改端口
vim /usr/local/nexus/etc/nexus-default.properties application-port=9091
解决方法
出现以上问题的原因:配置文件路径错误
cd /usr/local/nexus/bin #编辑文件 vim nexus.vmoptions 修改 -Djava.util.logging.config.file=etc/karaf/java.util.logging.properties 为 -Djava.util.logging.config.file=../etc/karaf/java.util.logging.properties