nexus註冊成Window服務無法啟動有關問題解決
阿新 • • 發佈:2019-01-06
一、註冊成Window服務
>cd %NEXUS_HOME%\bin >nexus.bat install
二、啟動服務
>net start nexus The nexus service is starting. The nexus service could not be started. A system error has occurred. System error 1067 has occurred. The process terminated unexpectedly.
三、logs\wrapper.log 日誌
wrapper | --> Wrapper Started as Service wrapper | Launching a JVM... wrapper | Unable to execute Java command. The system cannot find the file specified. (0x2) wrapper | "java" -Djava.library.path="bin/jsw/lib" -classpath "bin/jsw/lib/wrapper-3.2.3.jar;./lib/appcontext-3.2.jar;./lib/javax.servlet-api-3.0.1.jar;./lib/jetty-continuation-8.1.3.v20120416.jar;./lib/jetty-deploy-8.1.3.v20120416.jar;./lib/jetty-http-8.1.3.v20120416.jar;./lib/jetty-io-8.1.3.v20120416.jar;./lib/jetty-jmx-8.1.3.v20120416.jar;./lib/jetty-rewrite-8.1.3.v20120416.jar;./lib/jetty-security-8.1.3.v20120416.jar;./lib/jetty-server-8.1.3.v20120416.jar;./lib/jetty-servlet-8.1.3.v20120416.jar;./lib/jetty-util-8.1.3.v20120416.jar;./lib/jetty-webapp-8.1.3.v20120416.jar;./lib/jetty-xml-8.1.3.v20120416.jar;./lib/logback-classic-1.0.0.jar;./lib/logback-core-1.0.0.jar;./lib/nexus-bootstrap-2.2-01.jar;./lib/nexus-logging-extras-appender-2.2-01.jar;./lib/plexus-interpolation-1.14.jar;./lib/sisu-jetty8-1.3.jar;./lib/slf4j-api-1.6.4.jar;./conf/" -Dwrapper.key="MbUTaZZd_Yf2mUp2" -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=176 -Dwrapper.version="3.2.3" -Dwrapper.native_library="wrapper" -Dwrapper.service="TRUE" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.sonatype.nexus.bootstrap.jsw.JswLauncher ./conf/jetty.xml wrapper | Critical error: wait for JVM process failed
四、問題解決:修改環境變數設定
1. 設定環境變數:JAVA_HOME=D:\Java\jdk1.7.0_25_x64
2. 設定環境變數:PATH=%JAVA_HOME%\bin;
注意:JAVA_HOME和PATH兩個環境變數必須設定成系統變數,而非使用者變數
五、啟動服務
>net start nexus The nexus service is starting........... The nexus service was started successfully.
六、瀏覽器開啟地址
http://localhost:8081/nexus/index.html