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 一直未成功!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM