简体   繁体   English

Jenkins Windows Slave JNLP 连接错误

[英]Jenkins Windows Slave JNLP connect error

I am trying to configure a jenkins slave on a windows vm and keep it running as a service.我正在尝试在 windows vm 上配置 jenkins slave 并使其作为服务运行。 I did the following steps我做了以下步骤

  1. went to the jenkins master from my slave and downloaded the jnlp slave agent and installed it.从我的slave去jenkins master下载jnlp slave agent并安装。 Got connected on the jenkins logs in the master.在 master 中的 jenkins 日志上建立了连接。 and the small window to show i am connected came up too.显示我已连接的小窗口也出现了。

    JNLP agent connected from /10.xx8 <===[JENKINS REMOTING CAPACITY]===>Slave.jar version: 2.51 This is a Windows slave Slave successfully connected and online JNLP agent 从/10.xx8 连接<===[JENKINS REMOTING CAPACITY]===>Slave.jar version: 2.51 这是一个Windows slave Slave 成功连接并在线

After this i installed it as a service with the jenkins user that i use.在此之后,我将它安装为我使用的 jenkins 用户的服务。 On closing the small connected window on my slave I get the following error在关闭我的奴隶上的小连接窗口时,我收到以下错误

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

I then added the proxy settings to my jenkins-slave .xml but still get the same error.然后我将代理设置添加到我的 jenkins-slave .xml 但仍然得到相同的错误。 My jenkins-slave.xml arguments are as follows我的 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>

Can anyone provide some advice as to how to resolve this.任何人都可以就如何解决这个问题提供一些建议。

Thanks谢谢

in windows, I modify C:\\Program Files\\Jenkins\\jenkins.xml file.在 Windows 中,我修改 C:\\Program Files\\Jenkins\\jenkins.xml 文件。 add proxy setting as below:添加代理设置如下:

<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>

then jenkins works.然后詹金斯工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM