gpt4 book ai didi

java - Jenkins Windows Slave JNLP 连接错误

转载 作者:行者123 更新时间:2023-12-05 07:55:11 25 4
gpt4 key购买 nike

我正在尝试在 Windows 虚拟机上配置一个 jenkins slave 并使其作为服务运行。我做了以下步骤

  1. 从我的 slave 转到 jenkins master,下载 jnlp slave agent 并安装它。在 master 的 jenkins 日志上建立连接。显示我已连接的小窗口也出现了。

    从/10.xx8 连接的 JNLP 代理<===[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>

任何人都可以就如何解决这个问题提供一些建议。

谢谢

最佳答案

在windows中,我修改了C:\Program Files\Jenkins\jenkins.xml文件。添加代理设置如下:

<arguments>**-Dhttp.proxyHost="your proxy address" -Dhttp.proxyPort=yourport -Dhttps.proxyHost="your proxy address" -Dhttps.proxyPort=yourport**  -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "C:\Program Files\Jenkins\jenkins.war" --httpPort=8080 --webroot="%LocalAppData%\Jenkins\war"</arguments>

然后 Jenkins 工作。

关于java - Jenkins Windows Slave JNLP 连接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30258665/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com