我正试图在Windows虚拟机上配置Jenkins从机并将其作为服务运行。我按照以下步骤进行操作:
从我的从机访问Jenkins主机并下载JNLP从代理并安装它。在主节点的Jenkins日志中与其连接,小窗口也弹出显示我已连接。
JNLP代理从/10.xx8连接 <===[JENKINS REMOTING CAPACITY]===>Slave.jar版本:2.51 这是一个Windows从机 从机成功连接并上线
然后,我使用我所用的Jenkins用户将其安装为服务。在关闭我的从机上的连接窗口时,会出现以下错误:
Failing to obtain https://my netowrk.com/computer/Windows%20Slave/slave-agent.jnlp?encrypt=true
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at sun.security.ssl.BaseSSLSocketImpl.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:269)
at hudson.remoting.Launcher.run(Launcher.java:219)
at hudson.remoting.Launcher.main(Launcher.java:192)
Waiting 10 seconds before retry
我随后将代理设置添加到了我的jenkins-slave.xml文件中,但仍然遇到相同的错误。我的jenkins-slave.xml参数如下:
<executable>C:\Program Files\Java\jre7\bin\java.exe</executable>
<arguments>-Xrs -Dhttp.proxyHost=xx.xx.xx -
Dhttp.proxyPort=3128 -jar "%BASE%\slave.jar" -jnlpUrl https://example.org/computer/Windows%20Slave/slave-
agent.jnlp -secret dxxxxxxxxxxxxa2d -noCertificateCheck</arguments>
有人能提供如何解决这个问题的建议吗?
谢谢
https://my netowrk.com/
(请注意my和network之间的空格) - Ben