Pergunta

I built my first Rails app and am running production off a home server. Capistrano 3 worked for about a month and now it just stopped deploying. When I run cap production deploy, my app does not change on the server. It uploads my git-ssh.sh file to the root temp directory, then exits "successfully". I haven't changed anything except modifying some html since it was originally working.

My remote repo is on bitbucket and has the latest commits. I can go as far as commenting out the :repo_url in deploy.rb and not have an error.

Since there isn't an error and since I am a newb, I have a feeling that this is a very general behavior and I have overlooked something small. Any ideas?

Normal Output:

INFO [38ef66f0] Running /usr/bin/env mkdir -p /tmp/PATH/ on MYSERVER.com
INFO [38ef66f0] Finished in 1.571 seconds with exit status 0 (successful).
INFO Uploading /tmp/PATH/git-ssh.sh 100.0%
INFO [aae6143c] Running /usr/bin/env chmod +x /tmp/PATH/git-ssh.sh on MYSERVER.com
INFO [aae6143c] Finished in 0.109 seconds with exit status 0 (successful).

Verbose Output:

INFO [b15bb422] Running /usr/bin/env mkdir -p /tmp/PATH/ on MYSERVER.com
D, [TIME:14.310370] DEBUG -- net.ssh.transport.session[SESSION]: establishing connection to MYSERVER.com:PORT
D, [TIME:14.814878] DEBUG -- net.ssh.transport.session[SESSION]: connection established
I, [TIME:14.815000]  INFO -- net.ssh.transport.server_version[VERSION]: negotiating protocol version
D, [TIME:14.882919] DEBUG -- net.ssh.transport.server_version[VERSION]: remote is `SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.1'
D, [TIME:14.883020] DEBUG -- net.ssh.transport.server_version[VERSION]: local is `SSH-2.0-Ruby/Net::SSH_2.7.0 x86_64-darwin12.3.0'
D, [TIME:14.934561] DEBUG -- tcpsocket[SOCKET]: read 984 bytes
D, [TIME:14.934662] DEBUG -- tcpsocket[SOCKET]: received packet nr 0 type 20 len 980
I, [TIME:14.934719]  INFO -- net.ssh.transport.algorithms[ALGORITHMS]: got KEXINIT from server
I, [TIME:14.934810]  INFO -- net.ssh.transport.algorithms[ALGORITHMS]: sending KEXINIT
D, [TIME:14.934914] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 0 type 20 len 1620
D, [TIME:14.934974] DEBUG -- tcpsocket[SOCKET]: sent 1624 bytes
I, [TIME:14.934999]  INFO -- net.ssh.transport.algorithms[ALGORITHMS]: negotiating algorithms
D, [TIME:14.935071] DEBUG -- net.ssh.transport.algorithms[ALGORITHMS]: negotiated:
* kex: diffie-hellman-group-exchange-sha1
* host_key: ssh-rsa
* encryption_server: aes128-cbc
* encryption_client: aes128-cbc
* hmac_client: hmac-sha1
* hmac_server: hmac-sha1
* compression_client: none
* compression_server: none
* language_client:
* language_server:
D, [TIME:14.935093] DEBUG -- net.ssh.transport.algorithms[ALGORITHMS]: exchanging keys
D, [TIME:14.935202] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 1 type 34 len 20
D, [TIME:14.935238] DEBUG -- tcpsocket[SOCKET]: sent 24 bytes
D, [TIME:15.035995] DEBUG -- tcpsocket[SOCKET]: read 152 bytes
D, [TIME:15.036218] DEBUG -- tcpsocket[SOCKET]: received packet nr 1 type 31 len 148
D, [TIME:15.038033] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 2 type 32 len 140
D, [TIME:15.038149] DEBUG -- tcpsocket[SOCKET]: sent 144 bytes
D, [TIME:15.113155] DEBUG -- tcpsocket[SOCKET]: read 720 bytes
D, [TIME:15.113304] DEBUG -- tcpsocket[SOCKET]: received packet nr 2 type 33 len 700
D, [TIME:15.114762] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 3 type 21 len 20
D, [TIME:15.114857] DEBUG -- tcpsocket[SOCKET]: sent 24 bytes
D, [TIME:15.114923] DEBUG -- tcpsocket[SOCKET]: received packet nr 3 type 21 len 12
D, [TIME:15.115172] DEBUG -- net.ssh.authentication.session[SESSION]: beginning authentication of `USER'
D, [TIME:15.115267] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 4 type 5 len 28
D, [TIME:15.115315] DEBUG -- tcpsocket[SOCKET]: sent 52 bytes
D, [TIME:15.245792] DEBUG -- tcpsocket[SOCKET]: read 52 bytes
D, [TIME:15.246035] DEBUG -- tcpsocket[SOCKET]: received packet nr 4 type 6 len 28
D, [TIME:15.246215] DEBUG -- net.ssh.authentication.session[SESSION]: trying publickey
D, [TIME:15.246510] DEBUG -- net.ssh.authentication.agent[AGENT]: connecting to ssh-agent
D, [TIME:15.246633] DEBUG -- net.ssh.authentication.agent[AGENT]: sending agent request 1 len 51
D, [TIME:15.246750] DEBUG -- net.ssh.authentication.agent[AGENT]: received agent packet 2 len 5
D, [TIME:15.246801] DEBUG -- net.ssh.authentication.agent[AGENT]: sending agent request 11 len 0
D, [TIME:15.246921] DEBUG -- net.ssh.authentication.agent[AGENT]: received agent packet 12 len 5
D, [TIME:15.247091] DEBUG -- net.ssh.authentication.methods.publickey[PUBKEY]: trying publickey
D, [TIME:15.247242] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 5 type 50 len 348
D, [TIME:15.247341] DEBUG -- tcpsocket[SOCKET]: sent 372 bytes
D, [TIME:15.298246] DEBUG -- tcpsocket[SOCKET]: read 324 bytes
D, [TIME:15.298404] DEBUG -- tcpsocket[SOCKET]: received packet nr 5 type 60 len 300
D, [TIME:15.300524] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 6 type 50 len 620
D, [TIME:15.300583] DEBUG -- tcpsocket[SOCKET]: sent 644 bytes
D, [TIME:15.347646] DEBUG -- tcpsocket[SOCKET]: read 36 bytes
D, [TIME:15.347769] DEBUG -- tcpsocket[SOCKET]: received packet nr 6 type 52 len 12
D, [TIME:15.347829] DEBUG -- net.ssh.authentication.methods.publickey[PUBKEY]: publickey succeeded
D, [TIME:15.348064] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 7 type 90 len 44
D, [TIME:15.348175] DEBUG -- tcpsocket[SOCKET]: sent 68 bytes
D, [TIME:15.928356] DEBUG -- tcpsocket[SOCKET]: read 52 bytes
D, [TIME:15.928650] DEBUG -- tcpsocket[SOCKET]: received packet nr 7 type 91 len 28
I, [TIME:15.928842]  INFO -- net.ssh.connection.session[SESSION]: channel_open_confirmation: 0 0 0 32768
I, [TIME:15.928956]  INFO -- net.ssh.connection.channel[CHANNEL]: sending channel request "auth-agent-req@openssh.com"
D, [TIME:15.929074] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 8 type 98 len 44
I, [TIME:15.929227]  INFO -- net.ssh.connection.channel[CHANNEL]: sending channel request "env"
D, [TIME:15.929324] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 9 type 98 len 44
I, [TIME:15.929511]  INFO -- net.ssh.connection.channel[CHANNEL]: sending channel request "exec"
D, [TIME:15.929607] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 10 type 98 len 76
D, [TIME:15.929751] DEBUG -- tcpsocket[SOCKET]: sent 236 bytes
D, [TIME:15.974678] DEBUG -- tcpsocket[SOCKET]: read 124 bytes
D, [TIME:15.974830] DEBUG -- tcpsocket[SOCKET]: received packet nr 8 type 99 len 12
I, [TIME:15.974895]  INFO -- net.ssh.connection.session[SESSION]: channel_success: 0
D, [TIME:15.974950] DEBUG -- net.ssh.service.forward[FORWARD]: authentication agent forwarding is active
D, [TIME:15.975012] DEBUG -- tcpsocket[SOCKET]: received packet nr 9 type 93 len 28
I, [TIME:15.975052]  INFO -- net.ssh.connection.session[SESSION]: channel_window_adjust: 0 +2097152
D, [TIME:15.975111] DEBUG -- tcpsocket[SOCKET]: received packet nr 10 type 99 len 12
I, [TIME:15.975145]  INFO -- net.ssh.connection.session[SESSION]: channel_success: 0
D, [TIME:15.980283] DEBUG -- tcpsocket[SOCKET]: read 36 bytes
D, [TIME:15.980403] DEBUG -- tcpsocket[SOCKET]: received packet nr 11 type 96 len 12
I, [TIME:15.980455]  INFO -- net.ssh.connection.session[SESSION]: channel_eof: 0
D, [TIME:15.985198] DEBUG -- tcpsocket[SOCKET]: read 104 bytes
D, [TIME:15.985276] DEBUG -- tcpsocket[SOCKET]: received packet nr 12 type 98 len 44
I, [TIME:15.985337]  INFO -- net.ssh.connection.session[SESSION]: channel_request: 0 exit-status false
 INFO [b15bb422] Finished in 1.677 seconds with exit status 0 (successful).
D, [TIME:15.985583] DEBUG -- tcpsocket[SOCKET]: received packet nr 13 type 97 len 12
I, [TIME:15.985633]  INFO -- net.ssh.connection.session[SESSION]: channel_close: 0
D, [TIME:15.985706] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 11 type 97 len 28
D, [TIME:15.985916] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 12 type 90 len 44
D, [TIME:15.986043] DEBUG -- tcpsocket[SOCKET]: sent 120 bytes
D, [TIME:16.029662] DEBUG -- tcpsocket[SOCKET]: read 52 bytes
D, [TIME:16.029837] DEBUG -- tcpsocket[SOCKET]: received packet nr 14 type 91 len 28
I, [TIME:16.029900]  INFO -- net.ssh.connection.session[SESSION]: channel_open_confirmation: 1 2 0 32768
I, [TIME:16.030024]  INFO -- net.ssh.connection.channel[3fdef9deb620]: sending channel request "env"
D, [TIME:16.030116] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 13 type 98 len 44
I, [TIME:16.030238]  INFO -- net.ssh.connection.channel[3fdef9deb620]: sending channel request "exec"
D, [TIME:16.030309] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 14 type 98 len 76
D, [TIME:16.030389] DEBUG -- tcpsocket[SOCKET]: sent 168 bytes
D, [TIME:16.075046] DEBUG -- tcpsocket[SOCKET]: read 88 bytes
D, [TIME:16.075278] DEBUG -- tcpsocket[SOCKET]: received packet nr 15 type 93 len 28
I, [TIME:16.075359]  INFO -- net.ssh.connection.session[SESSION]: channel_window_adjust: 1 +2097152
D, [TIME:16.075448] DEBUG -- tcpsocket[SOCKET]: received packet nr 16 type 99 len 12
I, [TIME:16.075501]  INFO -- net.ssh.connection.session[SESSION]: channel_success: 1
D, [TIME:16.081736] DEBUG -- tcpsocket[SOCKET]: read 52 bytes
D, [TIME:16.081907] DEBUG -- tcpsocket[SOCKET]: received packet nr 17 type 94 len 28
I, [TIME:16.081982]  INFO -- net.ssh.connection.session[SESSION]: channel_data: 1 1b
D, [TIME:16.082185] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 15 type 94 len 44
D, [TIME:16.082273] DEBUG -- tcpsocket[SOCKET]: sent 68 bytes
D, [TIME:16.136866] DEBUG -- tcpsocket[SOCKET]: read 52 bytes
D, [TIME:16.137045] DEBUG -- tcpsocket[SOCKET]: received packet nr 18 type 94 len 28
I, [TIME:16.137113]  INFO -- net.ssh.connection.session[SESSION]: channel_data: 1 1b
 INFO Uploading /tmp/PATH/git-ssh.sh 100.0%
D, [TIME:16.137318] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 16 type 94 len 108
D, [TIME:16.137408] DEBUG -- tcpsocket[SOCKET]: sent 132 bytes
D, [TIME:16.137514] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 17 type 94 len 28
D, [TIME:16.137574] DEBUG -- tcpsocket[SOCKET]: sent 52 bytes
D, [TIME:16.258376] DEBUG -- tcpsocket[SOCKET]: read 52 bytes
D, [TIME:16.258656] DEBUG -- tcpsocket[SOCKET]: received packet nr 19 type 94 len 28
I, [TIME:16.258789]  INFO -- net.ssh.connection.session[SESSION]: channel_data: 1 1b
D, [TIME:16.258974] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 18 type 96 len 28
D, [TIME:16.259094] DEBUG -- tcpsocket[SOCKET]: sent 52 bytes
D, [TIME:16.303592] DEBUG -- tcpsocket[SOCKET]: read 140 bytes
D, [TIME:16.303733] DEBUG -- tcpsocket[SOCKET]: received packet nr 20 type 96 len 12
I, [TIME:16.303788]  INFO -- net.ssh.connection.session[SESSION]: channel_eof: 1
D, [TIME:16.303861] DEBUG -- tcpsocket[SOCKET]: received packet nr 21 type 98 len 44
I, [TIME:16.303907]  INFO -- net.ssh.connection.session[SESSION]: channel_request: 1 exit-status false
D, [TIME:16.303966] DEBUG -- tcpsocket[SOCKET]: received packet nr 22 type 97 len 12
I, [TIME:16.304003]  INFO -- net.ssh.connection.session[SESSION]: channel_close: 1
D, [TIME:16.304068] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 19 type 97 len 28
 INFO [265118f7] Running /usr/bin/env chmod +x /tmp/PATH/git-ssh.sh on MYSERVER.com
D, [TIME:16.304365] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 20 type 90 len 44
D, [TIME:16.312579] DEBUG -- tcpsocket[SOCKET]: sent 120 bytes
D, [TIME:16.354938] DEBUG -- tcpsocket[SOCKET]: read 52 bytes
D, [TIME:16.355150] DEBUG -- tcpsocket[SOCKET]: received packet nr 23 type 91 len 28
I, [TIME:16.355235]  INFO -- net.ssh.connection.session[SESSION]: channel_open_confirmation: 2 0 0 32768
I, [TIME:16.355389]  INFO -- net.ssh.connection.channel[CHANNEL]: sending channel request "env"
D, [TIME:16.355501] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 21 type 98 len 44
I, [TIME:16.355650]  INFO -- net.ssh.connection.channel[CHANNEL]: sending channel request "exec"
D, [TIME:16.355734] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 22 type 98 len 76
D, [TIME:16.355856] DEBUG -- tcpsocket[SOCKET]: sent 168 bytes
D, [TIME:16.401684] DEBUG -- tcpsocket[SOCKET]: read 88 bytes
D, [TIME:16.401888] DEBUG -- tcpsocket[SOCKET]: received packet nr 24 type 93 len 28
I, [TIME:16.401970]  INFO -- net.ssh.connection.session[SESSION]: channel_window_adjust: 2 +2097152
D, [TIME:16.402037] DEBUG -- tcpsocket[SOCKET]: received packet nr 25 type 99 len 12
I, [TIME:16.402070]  INFO -- net.ssh.connection.session[SESSION]: channel_success: 2
D, [TIME:16.409522] DEBUG -- tcpsocket[SOCKET]: read 36 bytes
D, [TIME:16.409723] DEBUG -- tcpsocket[SOCKET]: received packet nr 26 type 96 len 12
I, [TIME:16.409811]  INFO -- net.ssh.connection.session[SESSION]: channel_eof: 2
D, [TIME:16.409866] DEBUG -- tcpsocket[SOCKET]: read 104 bytes
D, [TIME:16.409916] DEBUG -- tcpsocket[SOCKET]: received packet nr 27 type 98 len 44
I, [TIME:16.409960]  INFO -- net.ssh.connection.session[SESSION]: channel_request: 2 exit-status false
 INFO [265118f7] Finished in 0.106 seconds with exit status 0 (successful).
D, [TIME:16.410112] DEBUG -- tcpsocket[SOCKET]: received packet nr 28 type 97 len 12
I, [TIME:16.410144]  INFO -- net.ssh.connection.session[SESSION]: channel_close: 2
D, [TIME:16.410203] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 23 type 97 len 28
D, [TIME:16.424746] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 24 type 90 len 44
D, [TIME:16.435241] DEBUG -- tcpsocket[SOCKET]: sent 120 bytes
D, [TIME:16.476281] DEBUG -- tcpsocket[SOCKET]: read 52 bytes
D, [TIME:16.476476] DEBUG -- tcpsocket[SOCKET]: received packet nr 29 type 91 len 28
I, [TIME:16.476569]  INFO -- net.ssh.connection.session[SESSION]: channel_open_confirmation: 3 2 0 32768
I, [TIME:16.476736]  INFO -- net.ssh.connection.channel[3fdefac6f7f0]: sending channel request "env"
D, [TIME:16.476833] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 25 type 98 len 44
I, [TIME:16.477009]  INFO -- net.ssh.connection.channel[3fdefac6f7f0]: sending channel request "exec"
D, [TIME:16.477088] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 26 type 98 len 172
D, [TIME:16.477186] DEBUG -- tcpsocket[SOCKET]: sent 264 bytes
D, [TIME:16.521258] DEBUG -- tcpsocket[SOCKET]: read 88 bytes
D, [TIME:16.521526] DEBUG -- tcpsocket[SOCKET]: received packet nr 30 type 93 len 28
I, [TIME:16.521663]  INFO -- net.ssh.connection.session[SESSION]: channel_window_adjust: 3 +2097152
D, [TIME:16.521816] DEBUG -- tcpsocket[SOCKET]: received packet nr 31 type 99 len 12
I, [TIME:16.521879]  INFO -- net.ssh.connection.session[SESSION]: channel_success: 3
D, [TIME:16.945782] DEBUG -- tcpsocket[SOCKET]: read 68 bytes
D, [TIME:16.946049] DEBUG -- tcpsocket[SOCKET]: received packet nr 32 type 90 len 44
I, [TIME:16.946157]  INFO -- net.ssh.connection.session[SESSION]: channel open auth-agent@openssh.com
I, [TIME:16.946343]  INFO -- net.ssh.connection.channel[CHANNEL]: sending channel request "env"
D, [TIME:16.946458] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 27 type 98 len 44
I, [TIME:16.946576]  INFO -- net.ssh.service.forward[FORWARD]: opening auth-agent channel
D, [TIME:16.946641] DEBUG -- net.ssh.authentication.agent[AGENT]: connecting to ssh-agent
D, [TIME:16.946758] DEBUG -- net.ssh.authentication.agent[AGENT]: sending agent request 1 len 51
D, [TIME:16.946886] DEBUG -- net.ssh.authentication.agent[AGENT]: received agent packet 2 len 5
D, [TIME:16.947073] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 28 type 91 len 28
D, [TIME:16.947252] DEBUG -- tcpsocket[SOCKET]: sent 120 bytes
D, [TIME:16.990720] DEBUG -- tcpsocket[SOCKET]: read 52 bytes
D, [TIME:16.990882] DEBUG -- tcpsocket[SOCKET]: received packet nr 33 type 94 len 28
I, [TIME:16.990963]  INFO -- net.ssh.connection.session[SESSION]: channel_data: 4 5b
D, [TIME:16.991002] DEBUG -- net.ssh.service.forward[FORWARD]: data:5 on agent forwarded channel
D, [TIME:16.991282] DEBUG -- unixsocket[SOCKET]: sent 5 bytes
D, [TIME:16.991351] DEBUG -- unixsocket[SOCKET]: read 9 bytes
D, [TIME:16.991412] DEBUG -- net.ssh.connection.channel[CHANNEL]: read 9 bytes from client, sending over agent forwarded connection
D, [TIME:16.991489] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 29 type 94 len 28
D, [TIME:16.991555] DEBUG -- tcpsocket[SOCKET]: sent 52 bytes
D, [TIME:17.066021] DEBUG -- tcpsocket[SOCKET]: read 84 bytes
D, [TIME:17.066253] DEBUG -- tcpsocket[SOCKET]: received packet nr 34 type 95 len 60
I, [TIME:17.066392]  INFO -- net.ssh.connection.session[SESSION]: channel_extended_data: 3 1 32b
D, [TIME:17.068527] DEBUG -- tcpsocket[SOCKET]: read 36 bytes
D, [TIME:17.068733] DEBUG -- tcpsocket[SOCKET]: received packet nr 35 type 96 len 12
I, [TIME:17.068798]  INFO -- net.ssh.connection.session[SESSION]: channel_eof: 4
D, [TIME:17.068855] DEBUG -- net.ssh.service.forward[FORWARD]: eof agent on agent forwarded channel
D, [TIME:17.068945] DEBUG -- tcpsocket[SOCKET]: read 240 bytes
D, [TIME:17.069009] DEBUG -- tcpsocket[SOCKET]: received packet nr 36 type 95 len 76
I, [TIME:17.069067]  INFO -- net.ssh.connection.session[SESSION]: channel_extended_data: 3 1 43b
D, [TIME:17.069151] DEBUG -- tcpsocket[SOCKET]: received packet nr 37 type 98 len 44
I, [TIME:17.069207]  INFO -- net.ssh.connection.session[SESSION]: channel_request: 3 exit-status false
D, [TIME:17.069293] DEBUG -- tcpsocket[SOCKET]: received packet nr 38 type 96 len 12
I, [TIME:17.069335]  INFO -- net.ssh.connection.session[SESSION]: channel_eof: 3
D, [TIME:17.069397] DEBUG -- tcpsocket[SOCKET]: received packet nr 39 type 97 len 12
I, [TIME:17.069455]  INFO -- net.ssh.connection.session[SESSION]: channel_close: 3
D, [TIME:17.069539] DEBUG -- tcpsocket[SOCKET]: queueing packet nr 30 type 97 len 28
Foi útil?

Solução

Not that anyone was following, but for the record:

My issue was that I had just set up a github key for other reasons since my last deployment. In doing so, a github_rsa.pub file was created in my .ssh directory. Apparently that made my id_rsa.pub no longer locally known, so Capistrano wasn't sending any of my keys to the server and not getting any errors back.

To fix it, I simply had to run ssh-add to add my key back to my ssh-agent.

Credits go to How to add a ssh key to remote server?, though not completely.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top