2017-01-04 72 views
0

我正在學習/創建我的第一個Capistrano部署。Net :: SSH :: Exception:無法解決compression_client算法

但是,在我得到任何工作或測試之前,我遇到了問題。

當我運行任何命令時,我得到提到的錯誤。

我可以手動ssh到終端。

下面是完整的調試輸出:

cap production deploy:check --trace 
** Invoke production (first_time) 
** Execute production 
** Invoke load:defaults (first_time) 
** Execute load:defaults 
** Invoke deploy:check (first_time) 
** Invoke git:check (first_time) 
** Invoke git:wrapper (first_time) 
** Execute git:wrapper 
00:00 git:wrapper 
     01 mkdir -p /tmp 
D, [2017-01-04T11:18:09.551896 #25214] DEBUG -- net.ssh.transport.session[119d510]: establishing connection to gate.paas.datacenter.fi:3022 
D, [2017-01-04T11:18:09.589776 #25214] DEBUG -- net.ssh.transport.session[119d510]: connection established 
I, [2017-01-04T11:18:09.590718 #25214] INFO -- net.ssh.transport.server_version[119cd54]: negotiating protocol version 
D, [2017-01-04T11:18:09.591139 #25214] DEBUG -- net.ssh.transport.server_version[119cd54]: local is `SSH-2.0-Ruby/Net::SSH_4.0.0 x86_64-linux-gnu' 
D, [2017-01-04T11:18:09.604129 #25214] DEBUG -- net.ssh.transport.server_version[119cd54]: remote is `SSH-2.0-JSSHProxy' 
I, [2017-01-04T11:18:09.605222 #25214] INFO -- net.ssh.transport.algorithms[119c520]: sending KEXINIT 
D, [2017-01-04T11:18:09.605828 #25214] DEBUG -- socket[119d1dc]: queueing packet nr 0 type 20 len 1140 
D, [2017-01-04T11:18:09.606537 #25214] DEBUG -- socket[119d1dc]: sent 1144 bytes 
D, [2017-01-04T11:18:09.606977 #25214] DEBUG -- socket[119d1dc]: read 400 bytes 
D, [2017-01-04T11:18:09.607461 #25214] DEBUG -- socket[119d1dc]: received packet nr 0 type 20 len 396 
I, [2017-01-04T11:18:09.607901 #25214] INFO -- net.ssh.transport.algorithms[119c520]: got KEXINIT from server 
I, [2017-01-04T11:18:09.608375 #25214] INFO -- net.ssh.transport.algorithms[119c520]: negotiating algorithms 
cap aborted! 
Net::SSH::Exception: could not settle on compression_client algorithm 
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/algorithms.rb:345:in `negotiate' 
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/algorithms.rb:325:in `negotiate_algorithms' 
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/algorithms.rb:200:in `proceed!' 
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/algorithms.rb:149:in `accept_kexinit' 
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:210:in `block in poll_message' 
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:188:in `loop' 
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:188:in `poll_message' 
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:225:in `block in wait' 
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:223:in `loop' 
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:223:in `wait' 
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:88:in `initialize' 
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh.rb:233:in `new' 
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh.rb:233:in `start' 
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/connection_pool.rb:59:in `call' 
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/connection_pool.rb:59:in `with' 
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/netssh.rb:155:in `with_ssh' 
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/netssh.rb:108:in `execute_command' 
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:141:in `block in create_command_and_execute' 
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:141:in `tap' 
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:141:in `create_command_and_execute' 
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:74:in `execute' 
/var/lib/gems/2.3.0/gems/capistrano-3.7.1/lib/capistrano/scm/tasks/git.rake:8:in `block (3 levels) in eval_rakefile' 
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:29:in `instance_exec' 
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:29:in `run' 
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute' 
Tasks: TOP => deploy:check => git:check => git:wrapper 
+0

實際上,這似乎與Jelastic SSH代理有關。我嘗試了不同的服務器相同的設置,它工作正常。我剛剛從我的Jelastic主機詢問了這個問題,但我仍然對任何有關我自己的配置的想法開放 – JanneS

回答

0

嘗試ssh -vvv your-ip,查看日誌。使用ssh-options中的compression_client是這樣的: set :ssh_options, { forward_agent: true, compression_client: "zlib" }

+0

而這在服務器或開發機器上? – JanneS

+0

我運行'ssh -vvv [email protected] -p 3022',但沒有從輸出中找到compression_client?這是連接到jelastic雲的流浪虛擬框。 – JanneS

+0

這個答案大部分是正確的,所以我接受了這個。我必須在我的deploy.rake中設置'compression:false'來禁用壓縮,所以現在事情正在順利進行。 – JanneS