具有Java Web Start的远程Windows机器上的Jenkins从站无法连接

时间:2018-06-26 16:02:03

标签: windows jenkins jnlp jenkins-slave

尝试将Windows的Jenkins从站与Java Web Start连接起来,会给我以下信息:

    >java -jar agent.jar -jnlpUrl https://jenkins.example.com/computer/slave-office/slave-agent.jnlp -secret 74aebde5a38c4f19b0b6c64ee9d3d75571d6cd666e67ebae7d39d8b259d39a0f -workDir C:\Jenkins\
    org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
    INFO: Using C:\Jenkins\remoting as a remoting work directory
    Both error and output logs will be printed to C:\Jenkins\remoting
  hudson.remoting.jnlp.Main createEngine
    INFO: Setting up agent: slave-office
  hudson.remoting.jnlp.Main$CuiListener <init>
    INFO: Jenkins agent is running in headless mode.
  hudson.remoting.Engine startEngine
    INFO: Using Remoting version: 3.22
  org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
    INFO: Using C:\Jenkins\remoting as a remoting work directory
  hudson.remoting.jnlp.Main$CuiListener status
    INFO: Locating server among [https://jenkins.example.com/]
  org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
    INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
  hudson.remoting.jnlp.Main$CuiListener status
    INFO: Agent discovery successful
      Agent address: jenkins.example.com
      Agent port:    50000
      Identity:      62:e9:82:de:8b:ae:cf:6d:ea:9e:0b:cf:5c:ad:bb:10
  hudson.remoting.jnlp.Main$CuiListener status
    INFO: Handshaking
  hudson.remoting.jnlp.Main$CuiListener status
    INFO: Connecting to jenkins.example.com:50000
  hudson.remoting.jnlp.Main$CuiListener status
    INFO: Trying protocol: JNLP4-connect
  org.jenkinsci.remoting.protocol.impl.AckFilterLayer abort
    WARNING: [JNLP4-connect connection to jenkins.example.com/11.22.33.44:50000] Incorrect acknowledgement sequence, expected 0x000341434b got 0x485454502f
  hudson.remoting.jnlp.Main$CuiListener status
    INFO: Protocol JNLP4-connect encountered an unexpected exception
    java.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Connection closed before acknowledgement sent
            at org.jenkinsci.remoting.util.SettableFuture.get(SettableFuture.java:223)
            at hudson.remoting.Engine.innerRun(Engine.java:609)
            at hudson.remoting.Engine.run(Engine.java:469)
    Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Connection closed before acknowledgement sent
            at org.jenkinsci.remoting.protocol.impl.AckFilterLayer.onRecvClosed(AckFilterLayer.java:280)
            at org.jenkinsci.remoting.protocol.FilterLayer.abort(FilterLayer.java:164)
            at org.jenkinsci.remoting.protocol.impl.AckFilterLayer.abort(AckFilterLayer.java:130)
            at org.jenkinsci.remoting.protocol.impl.AckFilterLayer.onRecv(AckFilterLayer.java:258)
            at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecv(ProtocolStack.java:669)
            at org.jenkinsci.remoting.protocol.NetworkLayer.onRead(NetworkLayer.java:136)
            at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer.access$2200(BIONetworkLayer.java:48)
            at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader.run(BIONetworkLayer.java:283)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
            at java.lang.Thread.run(Unknown Source)

  hudson.remoting.jnlp.Main$CuiListener status
    INFO: Connecting to jenkins.example.com:50000
  hudson.remoting.jnlp.Main$CuiListener status
    INFO: Server reports protocol JNLP4-plaintext not supported, skipping
  hudson.remoting.jnlp.Main$CuiListener status
    INFO: Server reports protocol JNLP3-connect not supported, skipping
  hudson.remoting.jnlp.Main$CuiListener status
    INFO: Server reports protocol JNLP2-connect not supported, skipping
  hudson.remoting.jnlp.Main$CuiListener status
    INFO: Server reports protocol JNLP-connect not supported, skipping
  hudson.remoting.jnlp.Main$CuiListener error
    SEVERE: The server rejected the connection: None of the protocols were accepted
    java.lang.Exception: The server rejected the connection: None of the protocols were accepted
            at hudson.remoting.Engine.onConnectionRejected(Engine.java:670)
            at hudson.remoting.Engine.innerRun(Engine.java:634)
            at hudson.remoting.Engine.run(Engine.java:469)

JNLP代理的TCP端口似乎已正确配置为50000

启用了Java Web Start代理协议/ 4(TLS加密)

Https证书正确且curl确认服务器可用

curl https://jenkins.example.com:50000
Jenkins-Agent-Protocols: JNLP4-connect, Ping
Jenkins-Version: 2.129
Jenkins-Session: 9ab0885c
Client: 10.42.24.96
Server: 10.42.7.42
Remoting-Minimum-Version: 3.4

Java在主服务器和从属服务器上均为8。 师父是Debian,但我认为这并不重要。

0 个答案:

没有答案