Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Ralph Jackson
RE: copy AMI fails on rsync step [ reply ]  
2012-06-07 19:36
That was it! When I downloaded credentials from amazon console to windows the correct permission were lost when I uploaded again to my linux server. Thanks for your help.

By: Frederic Donnat
RE: copy AMI fails on rsync step [ reply ]  
2012-06-07 16:02
Hi Ralph,

It seems that this only due to a permissions problem on your SSH key file. If you are not able to execute the command, due to too opened permission on your SSH key file, CloudyScripts won't be able to execute the command as well.

You can manually set permission to RW to your SSH Key file and then manually test the command.
Try the following:
chmod 600 /root/.ssh/tscwestcloudykey.pem

Hope this helps.
/fred

By: Ralph Jackson
copy AMI fails on rsync step [ reply ]  
2012-06-07 14:18
I attemtp to use the sample copy ami script and I get the following error on the rsync part of the script. I've also used this command on the actually server and am asked for a password becuase the permissions of the ssh key file are not correct. Below is a log/execution excerpt. Please let me know what I can to do resolve this. Thanks for developing this project and your help.


pty successfully obtained
D, [2012-06-07T07:13:48.333868 #29993] DEBUG -- : process terminated with exit-status: 0
D, [2012-06-07T07:13:48.334473 #29993] DEBUG -- : use rsync command on /root/.ssh/tscwestcloudykey.pem
D, [2012-06-07T07:13:48.334531 #29993] DEBUG -- : going to execute rsync -rlpgoDzq --rsh 'ssh -o stricthostkeychecking=no -i /root/.ssh/tscwestcloudykey.pem' --rsync-path='sudo rsync' /mnt/tmp_vol-7bb03015/ root@ec2-50-112-65-7.us-west-2.compute.amazonaws.com:/mnt/tmp_vol-27e9cc4a /> D, [2012-06-07T07:13:48.597421 #29993] DEBUG -- : pty successfully obtained
D, [2012-06-07T07:13:48.597837 #29993] DEBUG -- : RemoteCommandHandler: starts executing 'rsync -rlpgoDzq --rsh 'ssh -o stricthostkeychecking=no -i /root/.ssh/tscwestcloudykey.pem' --rsync-path='sudo rsync' /mnt/tmp_vol-7bb03015/
root@ec2-50-112-65-7.us-west-2.compute.amazonaws.com:/mnt/tmp_vol-27e9cc4a' /> D, [2012-06-07T07:13:48.598001 #29993] DEBUG -- : RemoteCommandHandler.on_process; send line-feed/sleep
D, [2012-06-07T07:13:49.600074 #29993] DEBUG -- : RemoteCommandHandler.on_process; send line-feed/sleep
D, [2012-06-07T07:13:50.602410 #29993] DEBUG -- : RemoteCommandHandler.on_process; send line-feed/sleep
D, [2012-06-07T07:13:51.604685 #29993] DEBUG -- : RemoteCommandHandler.on_process; send line-feed/sleep
D, [2012-06-07T07:13:52.606980 #29993] DEBUG -- : RemoteCommandHandler.on_process; send line-feed/sleep
D, [2012-06-07T07:13:53.609342 #29993] DEBUG -- : process terminated with exit-status: 255
E, [2012-06-07T07:13:53.609464 #29993] ERROR -- : Remote command execution failed with code: 255
D, [2012-06-07T07:13:53.609770 #29993] DEBUG -- : RemoteCommandHandler.on_eof: remote end is done sending data
D, [2012-06-07T07:13:53.610023 #29993] DEBUG -- : RemoteCommandHandler.on_close: remote end is closing!
state change notification: new state = FailedState (terminated)
W, [2012-06-07T07:13:53.610216 #29993] WARN -- : StateMachine exception during execution: rsync bewteen source and target servers failed with status: false
W, [2012-06-07T07:13:53.610260 #29993] WARN -- : /usr/lib64/ruby/gems/1.8/gems/CloudyScripts-2.14.52/lib/help/remote_command_handler.rb:240:in `remote_rsync'
/usr/lib64/ruby/gems/1.8/gems/CloudyScripts-2.14.52/lib/help/state_transition_helper.rb:948:in `remote_copy'
/usr/lib64/ruby/gems/1.8/gems/CloudyScripts-2.14.52/lib/help/state_transition_helper.rb:943:in `each'
/usr/lib64/ruby/gems/1.8/gems/CloudyScripts-2.14.52/lib/help/state_transition_helper.rb:943:in `remote_copy'
/usr/lib64/ruby/gems/1.8/gems/CloudyScripts-2.14.52/lib/scripts/ec2/copy_ami.rb:216:in `enter'
/usr/lib64/ruby/gems/1.8/gems/CloudyScripts-2.14.52/lib/help/script_execution_state.rb:37:in `start_state_machine'
/usr/lib64/ruby/gems/1.8/gems/CloudyScripts-2.14.52/lib/scripts/ec2/ec2_script.rb:64:in `start_script'
/root/cloudy-copyami-sample1.rb:111:in `run'
/root/cloudy-copyami-sample1.rb:126
== > Results of Copy AMI: true
New AMI ID:
done in 836s