nexus3.30.0-01在centos部署报错java.io.FileNotFoundException: Karaf etc folder not found

报错信息

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
本博客文章绝大多数为原创,少量为转载,代码经过测试验证,如果有疑问直接留言或者私信我。
创作文章不容易,转载文章必须注明文章出处;如果这篇文章对您有帮助,点击右侧打赏,支持一下吧。
原文地址:https://www.cnblogs.com/passedbylove/p/14509884.html