2017-06-26 66 views
0

我在AWS EC2實例中有Box MasterBox Slave。我在Box Slave中創建了jenkins用戶,我將master's公鑰複製到slave。現在我在Jenkins Master中創建了一個新的node。但是,當我連接使用Launch agent via execution of command on master使用命令ssh -tt [email protected]到從,它給了我下面的錯誤:無法從主站連接到從站。 「遇到無效的編碼序列:」

just before slave Services-Slave gets launched ... 
executing pre-launch scripts ... 
[06/26/17 16:25:28] Launching agent 
$ ssh -tt [email protected] 
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-1020-aws x86_64) 

* Documentation: https://help.ubuntu.com 
* Management:  https://landscape.canonical.com 
* Support:  https://ubuntu.com/advantage 

    Get cloud support with Ubuntu Advantage Cloud Guest: 
    http://www.ubuntu.com/business/services/cloud 

5 packages can be updated. 
0 updates are security updates. 


Last login: Mon Jun 26 20:19:51 2017 from 10.15.0.5 

<===[JENKINS REMOTING CAPACITY]===>To run a command as administrator (user "root"), use "sudo <command>". 
See "man sudo_root" for details. 

[email protected]:~$ <===[JENKINS REMOTING CAPACITY]===ERROR: Unable to launch the agent for Services-Slave 
java.io.IOException: Invalid encoded sequence encountered: 08 08 08 08 
    at hudson.remoting.BinarySafeStream$1._read(BinarySafeStream.java:194) 
    at hudson.remoting.BinarySafeStream$1.read(BinarySafeStream.java:80) 
    at hudson.remoting.BinarySafeStream$1.read(BinarySafeStream.java:97) 
    at java.io.FilterInputStream.read(FilterInputStream.java:107) 
    at hudson.remoting.BinarySafeStream$1._read(BinarySafeStream.java:189) 
    at hudson.remoting.BinarySafeStream$1.read(BinarySafeStream.java:125) 
    at java.io.FilterInputStream.read(FilterInputStream.java:107) 
    at hudson.remoting.BinarySafeStream$1._read(BinarySafeStream.java:189) 
    at hudson.remoting.BinarySafeStream$1.read(BinarySafeStream.java:125) 
    at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2338) 
    at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2351) 
    at java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(ObjectInputStream.java:3092) 
    at java.io.ObjectInputStream$BlockDataInputStream.readUTF(ObjectInputStream.java:2892) 
    at java.io.ObjectInputStream.readUTF(ObjectInputStream.java:1075) 
    at java.io.ObjectStreamClass.readNonProxy(ObjectStreamClass.java:684) 
    at java.io.ObjectInputStream.readClassDescriptor(ObjectInputStream.java:833) 
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1609) 
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521) 
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353) 
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373) 
    at hudson.remoting.Capability.read(Capability.java:140) 
    at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:391) 
    at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310) 
    at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:389) 
    at hudson.slaves.CommandLauncher.launch(CommandLauncher.java:132) 
    at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:262) 
    at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 

如果我從username運行相同的命令從master它能夠ssh成功。任何想法爲什麼發生這種情況?

  1. 我試圖給.pem文件
  2. 我也沒有sudo -u jenkins。什麼都沒有

回答