Failed to connect to the java service wrapper (java.net.ConnectException)

六眼飞鱼酱① 提交于 2021-01-28 01:51:47

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!