2017-03-01 125 views
0

下运行的是,我的设置:在服务器上运行詹金斯从连接到主詹金斯被后面的Apache

  1. 詹金斯主,并让说,它的域名是jenkins.master.host,即直接访问Jenkins主机的URL将是http://jenkins.master.host:8080

  2. Apache HTTPD运行在不同的服务器上,可以说它的域名是jenkins.master.proxy。 HTTPD配置为侦听端口80并代理jenkins主机,即通过apache访问Jenkins主机,使用URL http://jenkins.master.proxy

  3. 在 “管理詹金斯” - > “配置系统”,詹金斯URL被配置为apache httpd的URL,即http://jenkins.master.proxy

  4. 在 “管理詹金斯” - > “配置全球安全”,从站配置为在固定的TCP端口9020上运行。

  5. 在“管理Jenkins” - >“管理节点”下,我创建了一个名为“TestSlave”的新节点。

  6. 下载JNLP启动机后,连接到主小从代理窗口仍然停留在“连接到jenkins.master.proxy:9020”

的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 master或Apache HTTPD中才能连接到slave?小詹金斯奴隶代理窗口仍然卡在“连接到jenkins.master.proxy:9020(重试:11)”。也许我需要在apache HTTPD中添加另一个VirtualHost来侦听端口9020?我试图做到这一点,但没有成功。

想法将不胜感激。

非常感谢

回答