下面是我的设置:
JNLP的情况如下:
<jnlp codebase="http://jenkins.master.proxy/computer/TestSlave/" spec="1.0+">
<information>
<title>Agent for TestSlave</title>
<vendor>Jenkins project</vendor>
<homepage href="https://jenkins-ci.org/"/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.7+"/>
<jar href="http://jenkins.master.proxy/jnlpJars/remoting.jar"/>
<property name="hudson.showWindowsServiceInstallLink" value="true"/>
</resources>
<application-desc main-class="hudson.remoting.jnlp.Main">
<argument>*******************************************</argument>
<argument>TestSlave</argument>
<argument>-url</argument>
<argument>http://jenkins.master.proxy/</argument>
</application-desc>
</jnlp>Apache配置如下:
<VirtualHost *:80>
ServerName jenkins.master.proxy
ProxyPass / http://jenkins.master.host:8080/ nocanon Keepalive=On
ProxyPassReverse / http://jenkins.master.host:8080/
AllowEncodedSlashes On
ErrorLog logs/jenkins/error.log
</VirtualHost>是否需要将某些配置放入Jenkins主服务器或apache以使从服务器进行连接?小型Jenkins从代理窗口仍然停留在“连接到jenkins.master.proxy:9020 (重试:11)”上。也许我需要在apache中添加另一个VirtualHost来监听端口9020?我试过这样做,但没有成功。
我们会非常感激你的想法。
非常感谢
发布于 2017-11-08 10:02:20
看一看这个帖子:Jenkins: How to configure Jenkins behind Nginx reverse proxy for JNLP slaves to connect
我通过在我的jetty配置中将系统属性hudson.TcpSlaveAgentListener.hostName设置为jenkins.master.host来解决这个问题。
https://stackoverflow.com/questions/42535359
复制相似问题