zoukankan      html  css  js  c++  java
  • jenkins连接Linux服务器设置节点失败

    日志分析报错:

    [05/27/21 22:47:49] [SSH] 正在拷贝最新版本的 remoting.jar... Source agent ha

    [04/11/19 00:49:34] [SSH] Copied 529,326 bytes.

    Expanded the channel window size to 4MB

    [04/11/19 00:49:34] [SSH] Starting agent process: cd "/root/.jenkins" && /home/hc/java/jdk1.8.0_181/bin/java  -jar remoting.jar -workDir /root/.jenkins

    "-workDir" is not a valid option

    java -jar slave.jar [options...]

    -auth user:pass                 : If your Jenkins is security-enabled, specify

    a valid user name and password.

    -connectTo HOST:PORT            : make a TCP connection to the given host and

    port, then start communication.

    -cp (-classpath) PATH           : add the given classpath elements to the

    system classloader.

    -jar-cache DIR                  : Cache directory that stores jar files sent

    from the master

    -jnlpCredentials USER:PASSWORD  : HTTP BASIC AUTH header to pass in for making

    HTTP requests.

    -jnlpUrl URL                    : instead of talking to the master via

    stdin/stdout, emulate a JNLP client by

    making a TCP connection to the master.

    Connection parameters are obtained by

    parsing the JNLP file.

    -noReconnect                    : Doesn't try to reconnect when a

    communication fail, and exit instead

    -proxyCredentials USER:PASSWORD : HTTP BASIC AUTH header to pass in for making

    HTTP authenticated proxy requests.

    -secret HEX_SECRET              : Slave connection secret to use instead of

    -jnlpCredentials.

    -slaveLog FILE                  : create local slave error log

    -tcp FILE                       : instead of talking to the master via

    stdin/stdout, listens to a random local

    port, write that port number to the given

    file, then wait for the master to connect to

    that port.

    -text                           : encode communication with the master with

    base64. Useful for running slave over 8-bit

    unsafe protocol like telnet

    Slave JVM has terminated. Exit code=0

    [04/11/19 00:49:35] Launch failed - cleaning up connection

    [04/11/19 00:49:35] [SSH] 连接关闭。

    参考原文链接:https://blog.csdn.net/wise18146705004/article/details/105551301


    分析原因:
    大家可以看哦,上面这个设置页面里面的启动方式只有Launch Agents Via SSH选项,
    而没有Launch slave Agents Via SSH选项,
    最后导致我只选了Launch Agents Via SSH选项和Host Key Verification Strategy的know hosts file version strategy选项。

    这样就会报错了,不知道为什么新版的Jenkins启动方式里面没有Launch slave Agents Via SSH,
    但是问题也很好解决!
    解决方案:
    大家只需要把Host Key Verification Strategy选项改选为Non verifying Vervification Strategy就可以解决这个问题了!

    ps:记得java路径配置到/bin/java 最初的时候我只配置到了bin 一直未成功!

  • 相关阅读:
    Django入门
    Python从入门到放弃
    Python中的元类(metaclass)
    蓝鲸gse启动失败
    VS2019添加微软ReportViewer
    DevExpress WinForms各版本与 .NET、Visual Studio 的版本兼容性
    SQL语句查询每个分组的前N条记录的实现方法
    如何查看Windows安装版本号
    学习webpack
    Python3.x将代码打包成exe程序并添加图标
  • 原文地址:https://www.cnblogs.com/yiyaxuan/p/14820348.html
Copyright © 2011-2022 走看看