我正在尝试在Windows vm上配置jenkins slave并使其作为服务运行。我做了以下步骤
从我的奴隶那里去了jenkins主人并下载了jnlp slave代理并安装了它。已连接到主服务器上的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>
任何人都可以就如何解决这个问题提供一些建议。
由于
答案 0 :(得分:0)
在 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>
然后詹金斯工作。