问题
I'm trying to run RunDeck server as a windows service using java wrapper, guided by this article: http://www.phwitservices.com/2014/06/rundeck-windows-service
Service is successfully installed, but unfortunately failed to start. Extented log says:
INFO | jvm 1 | 2015/12/21 17:24:02 | WrapperManager Error: Failed to connect to the Wrapper at port 32 000. Cause: java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machine
Command line:
DEBUG | wrapper | 2015/12/21 17:24:14 | Command: "C:\Program Files (x86)\Java\jre1.8.0_66\bin\java" -Djava.library.path="C:\rundeck\service/lib" -classpath "C:\rundeck/rundeck-launcher-2.6.2.jar;C:\rundeck\service/lib/wrapper.jar" -Dwrapper.key="_rOOf7LGjqJdeZU5" -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31999 -Dwrapper.jvm.port.max=32001 -Dwrapper.debug="TRUE" -Dwrapper.pid=6360 -Dwrapper.version="3.5.27" -Dwrapper.native_library="wrapper" -Dwrapper.arch="x86" -Dwrapper.service="TRUE" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=3 org.tanukisoftware.wrapper.WrapperSimpleApp com.dtolabs.rundeck.ExpandRunServer --skipinstall
Tried to change port, all antivirus software/ windows firewall are disabled. Using 32-bit wrapper with jre 1.8.0_66(x86) on 64-bit Windows Server 2008 R2.
What could cause the problem?
回答1:
Turns out, wasn't a wrapper problem, duplicates Address is invalid on local machine [on windows 8 only]
Fixed adding to wrapper.conf:
wrapper.java.additional.1=-Djava.net.preferIPv4Stack=true
来源:https://stackoverflow.com/questions/34398899/failed-to-connect-to-the-java-service-wrapper-java-net-connectexception