Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Miumum miumum
RE: SCP Problem during copy AMI to another zone [ reply ]  
2011-09-15 13:54
Thank you very much. I have also recognize this problem. Now it is working very well.
I am quite new in Ruby scripting.

Thank you anyway.
Roman

By: Frederic Donnat
RE: SCP Problem during copy AMI to another zone [ reply ]  
2011-09-15 13:41
Hi

Thanks for using CloudyScripts and helping us to improve it.

After a qui look at your logs, I saw that the problem comes from the fact that the target SSH key file is not specified.
0: new progress message = going to upload to root@ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com:/root/.ssh/testing.pem /> state change notification: new state = FailedState (terminated)
W, [2011-09-15T11:04:43.515742 #6221] WARN -- : StateMachine exception during execution: can't convert nil into String

This mean that in the sample "source_ssh_keyfile" is not set or is commented (maybe a mistake of us while commiting).

You should specify it. I have just commited a new version of the sample script.

You will also noticed that we have updated the Basic 32-bit Amazon Linux AMI, that we start in the target region. So you should update to the lastest version of CloudyScripts meaning that you could build it using "rake gem" at the soource tree and then install it using "gem install pkg/CloudyScript-x.x.x.gem".

Just let us know if this doeest not solve your problem.
fred

By: Miumum miumum
SCP Problem during copy AMI to another zone [ reply ]  
2011-09-15 09:34

Hello thank you for cool amazon scripts.
I am trying to use sample code "sample_copy_ami.rb" to copy AMI from eu.west to us.east. I setted up all the variables in script but it does not work well.

The problem is probabaly during coppiing files using scp. Instances in both regions are created volumes mounted. But script "throw some exception" to log:

describe images: {"imagesSet"=>{"item"=>[{"name"=>"Yoncp DB", "imageType"=>"machine", "blockDeviceMapping"=>{"item"=>[{"ebs"=>{"snapshotId"=>"snap-9b26ddf3", "deleteOnTermination"=>"false", "volumeSize"=>"15"}, "deviceName"=>"/dev/sda1"}]}, "ramdiskId"=>"ari-37022943", "imageState"=>"available", "kernelId"=>"aki-6d022919", "imageId"=>"ami-a8a99adc", "rootDeviceName"=>"/dev/sda1", "rootDeviceType"=>"ebs", "description"=>"Yoncp DB AMI test", "isPublic"=>"false", "imageLocation"=>"107452520413/Yoncp DB", "virtualizationType"=>"paravirtual", "architecture"=>"x86_64", "imageOwnerId"=>"107452520413"}]}, "requestId"=>"381b51a5-e37f-4fb8-b940-56910d8c60b9", "xmlns"=>"http://ec2.amazonaws.com/doc/2010-08-31/";}
I, [2011-09-15T11:01:13.175913 #6221] INFO -- : start state machine with InitialState
I, [2011-09-15T11:01:13.176219 #6221] INFO -- : state machine: current state = InitialState
0: new progress message = starting up instance to execute the script (AMI = ami-a8a99adc) ...
D, [2011-09-15T11:01:13.176378 #6221] DEBUG -- : start up AMI ami-a8a99adc
I, [2011-09-15T11:01:13.477739 #6221] INFO -- : Architecture of image ami-a8a99adc is x86_64. Use instance_type m1.large.
0: new progress message = Architecture of image ami-a8a99adc is x86_64. Use instance_type m1.large.
I, [2011-09-15T11:01:14.223585 #6221] INFO -- : started instance i-9a3921ec
0: new progress message = Started instance i-9a3921ec. wait until it is ready...
I, [2011-09-15T11:01:19.615927 #6221] INFO -- : instance is in state pending (0)
0: new progress message = instance still starting up...
I, [2011-09-15T11:01:24.950812 #6221] INFO -- : instance is in state pending (0)
0: new progress message = instance still starting up...
I, [2011-09-15T11:01:30.277323 #6221] INFO -- : instance is in state pending (0)
0: new progress message = instance still starting up...
I, [2011-09-15T11:01:35.627695 #6221] INFO -- : instance is in state running (16)
0: new progress message = instance is up and running
instances = {"requestId"=>"10ebcd67-956d-43dc-beb0-0462cc2436a6", "reservationSet"=>{"item"=>[{"reservationId"=>"r-4aaeec3c", "groupSet"=>{"item"=>[{"groupId"=>"default"}]}, "instancesSet"=>{"item"=>[{"privateIpAddress"=>"10.58.87.144", "keyName"=>"amazon_yonc_production", "blockDeviceMapping"=>{"item"=>[{"ebs"=>{"volumeId"=>"vol-0aeeb063", "deleteOnTermination"=>"false", "attachTime"=>"2011-09-15T09:01:30.000Z", "status"=>"attached"}, "deviceName"=>"/dev/sda1"}]}, "ramdiskId"=>"ari-37022943", "clientToken"=>nil, "productCodes"=>nil, "ipAddress"=>"46.51.146.30", "kernelId"=>"aki-6d022919", "launchTime"=>"2011-09-15T09:01:13.000Z", "amiLaunchIndex"=>"0", "imageId"=>"ami-a8a99adc", "instanceType"=>"m1.large", "reason"=>nil, "rootDeviceName"=>"/dev/sda1", "rootDeviceType"=>"ebs", "placement"=>{"groupName"=>nil, "availabilityZone"=>"eu-west-1c"}, "instanceId"=>"i-9a3921ec", "privateDnsName"=>"ip-10-58-87-144.eu-west-1.compute.internal", "dnsName"=>"ec2-46-51-146-30.eu-west-1.compute.amazonaws.com", "virtualizationType"=>"paravirtual", "architecture"=>"x86_64", "monitoring"=>{"state"=>"disabled"}, "instanceState"=>{"name"=>"running", "code"=>"16"}}]}, "ownerId"=>"107452520413"}]}, "xmlns"=>"http://ec2.amazonaws.com/doc/2010-08-31/";}
attachments: [{"ebs"=>{"volumeId"=>"vol-0aeeb063", "deleteOnTermination"=>"false", "attachTime"=>"2011-09-15T09:01:30.000Z", "status"=>"attached"}, "deviceName"=>"/dev/sda1"}]
item = {"volumeId"=>"vol-0aeeb063", "deleteOnTermination"=>"false", "attachTime"=>"2011-09-15T09:01:30.000Z", "status"=>"attached"}
going to return 1
get_attached returns: [{"volumeId"=>"vol-0aeeb063", "deleteOnTermination"=>"false", "attachTime"=>"2011-09-15T09:01:30.000Z", "status"=>"attached"}]
instances = {"requestId"=>"388834b0-079f-41f4-aeff-b740156b283e", "reservationSet"=>{"item"=>[{"reservationId"=>"r-4aaeec3c", "groupSet"=>{"item"=>[{"groupId"=>"default"}]}, "instancesSet"=>{"item"=>[{"privateIpAddress"=>"10.58.87.144", "keyName"=>"amazon_yonc_production", "blockDeviceMapping"=>{"item"=>[{"ebs"=>{"volumeId"=>"vol-0aeeb063", "deleteOnTermination"=>"false", "attachTime"=>"2011-09-15T09:01:30.000Z", "status"=>"attached"}, "deviceName"=>"/dev/sda1"}]}, "ramdiskId"=>"ari-37022943", "clientToken"=>nil, "productCodes"=>nil, "ipAddress"=>"46.51.146.30", "kernelId"=>"aki-6d022919", "launchTime"=>"2011-09-15T09:01:13.000Z", "amiLaunchIndex"=>"0", "imageId"=>"ami-a8a99adc", "instanceType"=>"m1.large", "reason"=>nil, "rootDeviceName"=>"/dev/sda1", "rootDeviceType"=>"ebs", "placement"=>{"groupName"=>nil, "availabilityZone"=>"eu-west-1c"}, "instanceId"=>"i-9a3921ec", "privateDnsName"=>"ip-10-58-87-144.eu-west-1.compute.internal", "dnsName"=>"ec2-46-51-146-30.eu-west-1.compute.amazonaws.com", "virtualizationType"=>"paravirtual", "architecture"=>"x86_64", "monitoring"=>{"state"=>"disabled"}, "instanceState"=>{"name"=>"running", "code"=>"16"}}]}, "ownerId"=>"107452520413"}]}, "xmlns"=>"http://ec2.amazonaws.com/doc/2010-08-31/";}
attachments: [{"ebs"=>{"volumeId"=>"vol-0aeeb063", "deleteOnTermination"=>"false", "attachTime"=>"2011-09-15T09:01:30.000Z", "status"=>"attached"}, "deviceName"=>"/dev/sda1"}]
item = {"volumeId"=>"vol-0aeeb063", "deleteOnTermination"=>"false", "attachTime"=>"2011-09-15T09:01:30.000Z", "status"=>"attached"}
going to return 1
state change notification: new state = SourceInstanceLaunchedState
I, [2011-09-15T11:01:36.287858 #6221] INFO -- : state machine: current state = SourceInstanceLaunchedState
0: new progress message = going to create a snapshot for volume vol-0aeeb063...
D, [2011-09-15T11:01:36.288116 #6221] DEBUG -- : create snapshot for volume vol-0aeeb063
I, [2011-09-15T11:01:36.852812 #6221] INFO -- : snapshot_id = snap-173df87f
D, [2011-09-15T11:01:42.156904 #6221] DEBUG -- : snapshot creating: {"requestId"=>"65514d20-4ce0-4b60-83b8-bf53b0364fe6", "snapshotSet"=>{"item"=>[{"volumeId"=>"vol-0aeeb063", "snapshotId"=>"snap-173df87f", "progress"=>"100%", "volumeSize"=>"15", "ownerId"=>"107452520413", "description"=>"Cloudy_Scripts Snapshot for copying AMIs", "startTime"=>"2011-09-15T09:01:36.000Z", "status"=>"completed"}]}, "xmlns"=>"http://ec2.amazonaws.com/doc/2010-08-31/";}
0: new progress message = snapshot is done with ID=snap-173df87f
state change notification: new state = AmiSnapshotCreatedState
I, [2011-09-15T11:01:42.157291 #6221] INFO -- : state machine: current state = AmiSnapshotCreatedState
0: new progress message = going to create a new EBS volume from the specified snapshot...
D, [2011-09-15T11:01:42.157416 #6221] DEBUG -- : create volume in zone eu-west-1c
D, [2011-09-15T11:01:47.967229 #6221] DEBUG -- : volume state available
0: new progress message = EBS volume vol-e8eeb081 is ready
0: new progress message = going to attach volume vol-e8eeb081 to instance i-9a3921ec on device /dev/sdj...
I, [2011-09-15T11:01:47.967580 #6221] INFO -- : attach volume vol-e8eeb081 to instance i-9a3921ec on device /dev/sdj
D, [2011-09-15T11:01:48.666732 #6221] DEBUG -- : storage attaching: volume state: in-use, attachment state: attaching
D, [2011-09-15T11:01:54.084987 #6221] DEBUG -- : storage attaching: volume state: in-use, attachment state: attached
I, [2011-09-15T11:01:59.090555 #6221] INFO -- : volume vol-e8eeb081 successfully attached
0: new progress message = volume vol-e8eeb081 successfully attached
0: new progress message = connecting 'root' to ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com...
I, [2011-09-15T11:01:59.090905 #6221] INFO -- : connecting using keydata
I, [2011-09-15T11:01:59.172460 #6221] INFO -- : connection failed due to Connection refused - connect(2)
D, [2011-09-15T11:01:59.172711 #6221] DEBUG -- : /var/lib/gems/1.8/gems/CloudyScripts-1.9.40/lib/help/state_transition_helper.rb:61:in `connect'
I, [2011-09-15T11:02:19.192491 #6221] INFO -- : connecting using keydata
I, [2011-09-15T11:02:19.241063 #6221] INFO -- : connection failed due to Connection refused - connect(2)
D, [2011-09-15T11:02:19.241313 #6221] DEBUG -- : /var/lib/gems/1.8/gems/CloudyScripts-1.9.40/lib/help/state_transition_helper.rb:61:in `connect'
I, [2011-09-15T11:02:39.250042 #6221] INFO -- : connecting using keydata
D, [2011-09-15T11:02:42.581293 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:02:42.582287 #6221] DEBUG -- : RemoteCommandHandler: starts executing 'uname -r'
D, [2011-09-15T11:02:42.583540 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:02:42.584109 #6221] DEBUG -- : RemoteCommandHandler.on_process; send line-feed/sleep
D, [2011-09-15T11:02:43.586372 #6221] DEBUG -- : RemoteCommandHandler.on_eof: remote end is done sending data
D, [2011-09-15T11:02:43.587175 #6221] DEBUG -- : RemoteCommandHandler.on_close: remote end is closing!
0: new progress message = connected to ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com. OS installed is 2.6.21.7-2.ec2.v1.2.fc8xen
I, [2011-09-15T11:02:43.587424 #6221] INFO -- : connected to ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com
0: new progress message = going to mount /dev/sdj on /mnt/tmp_vol-e8eeb081...
D, [2011-09-15T11:02:43.587554 #6221] DEBUG -- : mount /dev/sdj on /mnt/tmp_vol-e8eeb081
D, [2011-09-15T11:02:43.777152 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:02:44.781722 #6221] DEBUG -- : process terminated with exit-status: 2
E, [2011-09-15T11:02:44.781940 #6221] ERROR -- : Remote command execution failed with code: 2
0: new progress message = creating mount point /mnt/tmp_vol-e8eeb081...
D, [2011-09-15T11:02:44.782994 #6221] DEBUG -- : creating mount point /mnt/tmp_vol-e8eeb081
D, [2011-09-15T11:02:45.000285 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:02:46.003826 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:02:46.193036 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:02:47.197093 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:02:47.386247 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:02:48.390505 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:02:48.578914 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:02:48.585843 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:02:48.690680 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:02:49.703320 #6221] DEBUG -- : process terminated with exit-status: 0
I, [2011-09-15T11:02:54.704981 #6221] INFO -- : device /dev/sdj successfully mounted
0: new progress message = device /dev/sdj successfully mounted
0: new progress message = Retrieving '/' root partition filesystem type and label...
D, [2011-09-15T11:02:54.705290 #6221] DEBUG -- : get root partition filesystel type
D, [2011-09-15T11:02:54.806210 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:02:54.807046 #6221] DEBUG -- : RemoteCommandHandler: starts executing 'cat /etc/mtab | grep -E '[[:blank:]]+/[[:blank:]]+' | cut -d ' ' -f 3'
D, [2011-09-15T11:02:54.807290 #6221] DEBUG -- : RemoteCommandHandler.on_process; send line-feed/sleep
D, [2011-09-15T11:02:55.809071 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:02:55.809586 #6221] DEBUG -- : RemoteCommandHandler.on_eof: remote end is done sending data
D, [2011-09-15T11:02:55.810442 #6221] DEBUG -- : RemoteCommandHandler.on_close: remote end is closing!
D, [2011-09-15T11:02:55.810627 #6221] DEBUG -- : Found 'ext3' as root filesystem type
0: new progress message = '/' root partition contains an ext3 filesystem
D, [2011-09-15T11:02:55.995717 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:02:55.997190 #6221] DEBUG -- : RemoteCommandHandler: starts executing 'cat /etc/mtab | grep -E '[[:blank:]]+/[[:blank:]]+' | cut -d ' ' -f 1'
D, [2011-09-15T11:02:55.998202 #6221] DEBUG -- : RemoteCommandHandler.on_process; send line-feed/sleep
D, [2011-09-15T11:02:57.002569 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:02:57.003081 #6221] DEBUG -- : RemoteCommandHandler.on_eof: remote end is done sending data
D, [2011-09-15T11:02:57.003929 #6221] DEBUG -- : RemoteCommandHandler.on_close: remote end is closing!
D, [2011-09-15T11:02:57.004115 #6221] DEBUG -- : Found '/dev/sda1' as root device
0: new progress message = '/' root partitition on root device '/dev/sda1'
D, [2011-09-15T11:02:57.188641 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:02:57.189462 #6221] DEBUG -- : RemoteCommandHandler: starts executing 'e2label /dev/sda1'
D, [2011-09-15T11:02:57.189716 #6221] DEBUG -- : RemoteCommandHandler.on_process; send line-feed/sleep
D, [2011-09-15T11:02:58.191692 #6221] DEBUG -- : RemoteCommandHandler.on_eof: remote end is done sending data
D, [2011-09-15T11:02:58.192313 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:02:58.193117 #6221] DEBUG -- : RemoteCommandHandler.on_close: remote end is closing!
D, [2011-09-15T11:02:58.193302 #6221] DEBUG -- : Found label 'myroot'
0: new progress message = '/' root partition label 'myroot' for root device node '/dev/sda1'
state change notification: new state = SourceVolumeReadyState
I, [2011-09-15T11:02:58.193781 #6221] INFO -- : state machine: current state = SourceVolumeReadyState
0: new progress message = starting up instance to execute the script (AMI = ami-b3a062da) ...
D, [2011-09-15T11:02:58.193946 #6221] DEBUG -- : start up AMI ami-b3a062da
I, [2011-09-15T11:02:59.249043 #6221] INFO -- : Architecture of image ami-b3a062da is x86_64. Use instance_type m1.large.
0: new progress message = Architecture of image ami-b3a062da is x86_64. Use instance_type m1.large.
I, [2011-09-15T11:03:00.570675 #6221] INFO -- : started instance i-bee34bde
0: new progress message = Started instance i-bee34bde. wait until it is ready...
I, [2011-09-15T11:03:06.286933 #6221] INFO -- : instance is in state pending (0)
0: new progress message = instance still starting up...
I, [2011-09-15T11:03:11.977624 #6221] INFO -- : instance is in state pending (0)
0: new progress message = instance still starting up...
I, [2011-09-15T11:03:17.664736 #6221] INFO -- : instance is in state pending (0)
0: new progress message = instance still starting up...
I, [2011-09-15T11:03:23.394350 #6221] INFO -- : instance is in state running (16)
0: new progress message = instance is up and running
state change notification: new state = TargetInstanceLaunchedState
I, [2011-09-15T11:03:23.394806 #6221] INFO -- : state machine: current state = TargetInstanceLaunchedState
0: new progress message = going to create a new EBS volume of size 15GB...
D, [2011-09-15T11:03:23.810004 #6221] DEBUG -- : create volume in zone us-east-1c
D, [2011-09-15T11:03:30.451980 #6221] DEBUG -- : volume state available
0: new progress message = EBS volume vol-00c1a26a is ready
0: new progress message = going to attach volume vol-00c1a26a to instance i-bee34bde on device /dev/sdj...
I, [2011-09-15T11:03:30.452384 #6221] INFO -- : attach volume vol-00c1a26a to instance i-bee34bde on device /dev/sdj
D, [2011-09-15T11:03:31.832193 #6221] DEBUG -- : storage attaching: volume state: in-use, attachment state: attaching
D, [2011-09-15T11:03:37.570454 #6221] DEBUG -- : storage attaching: volume state: in-use, attachment state: attaching
D, [2011-09-15T11:03:43.278884 #6221] DEBUG -- : storage attaching: volume state: in-use, attachment state: attached
I, [2011-09-15T11:03:48.281892 #6221] INFO -- : volume vol-00c1a26a successfully attached
0: new progress message = volume vol-00c1a26a successfully attached
0: new progress message = connecting 'root' to ec2-xx-xx-xx-xx.compute-1.amazonaws.com...
I, [2011-09-15T11:03:48.282231 #6221] INFO -- : connecting using keydata
I, [2011-09-15T11:03:48.450388 #6221] INFO -- : connection failed due to Connection refused - connect(2)
D, [2011-09-15T11:03:48.450639 #6221] DEBUG -- : /var/lib/gems/1.8/gems/CloudyScripts-1.9.40/lib/help/state_transition_helper.rb:61:in `connect'
I, [2011-09-15T11:04:08.462423 #6221] INFO -- : connecting using keydata
D, [2011-09-15T11:04:10.401796 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:04:10.402721 #6221] DEBUG -- : RemoteCommandHandler: starts executing 'uname -r'
D, [2011-09-15T11:04:10.402979 #6221] DEBUG -- : RemoteCommandHandler.on_process; send line-feed/sleep
D, [2011-09-15T11:04:11.405768 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:04:11.406283 #6221] DEBUG -- : RemoteCommandHandler.on_eof: remote end is done sending data
D, [2011-09-15T11:04:11.407173 #6221] DEBUG -- : RemoteCommandHandler.on_close: remote end is closing!
0: new progress message = connected to ec2-184-72-65-254.compute-1.amazonaws.com. OS installed is 2.6.16.33-xenU
I, [2011-09-15T11:04:11.407415 #6221] INFO -- : connected to ec2-xx-xx-xx-xx.compute-1.amazonaws.com
0: new progress message = going to create filesystem on ec2-xx-xx-xx-xx.compute-1.amazonaws.com to /dev/sdj...
D, [2011-09-15T11:04:11.407550 #6221] DEBUG -- : create filesystem of type 'ext3' (default is ext3) on 'ec2-xx-xx-xx-xx.compute-1.amazonaws.com' to '/dev/sdj'
D, [2011-09-15T11:04:11.407641 #6221] DEBUG -- : create 'ext3' filesystem on device '/dev/sdj'
D, [2011-09-15T11:04:11.804985 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:04:24.933991 #6221] DEBUG -- : process terminated with exit-status: 0
0: new progress message = ext3 filesystem system successfully created on device /dev/sdj
0: new progress message = going to add label myroot for device /dev/sdj...
D, [2011-09-15T11:04:24.935435 #6221] DEBUG -- : add label 'myroot' to device '/dev/sdj'
D, [2011-09-15T11:04:25.335128 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:04:26.338607 #6221] DEBUG -- : process terminated with exit-status: 0
0: new progress message = label myroot added to device /dev/sdj
0: new progress message = going to mount /dev/sdj on /mnt/tmp_vol-00c1a26a...
D, [2011-09-15T11:04:26.340230 #6221] DEBUG -- : mount /dev/sdj on /mnt/tmp_vol-00c1a26a
D, [2011-09-15T11:04:26.746349 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:04:27.750968 #6221] DEBUG -- : process terminated with exit-status: 2
E, [2011-09-15T11:04:27.751186 #6221] ERROR -- : Remote command execution failed with code: 2
0: new progress message = creating mount point /mnt/tmp_vol-00c1a26a...
D, [2011-09-15T11:04:27.752539 #6221] DEBUG -- : creating mount point /mnt/tmp_vol-00c1a26a
D, [2011-09-15T11:04:28.154898 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:04:29.158377 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:04:29.576317 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:04:30.580555 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:04:30.985670 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:04:31.990147 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:04:32.394807 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:04:33.398667 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:04:33.812316 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:04:34.876774 #6221] DEBUG -- : process terminated with exit-status: 0
I, [2011-09-15T11:04:39.882544 #6221] INFO -- : device /dev/sdj successfully mounted
0: new progress message = device /dev/sdj successfully mounted
state change notification: new state = TargetVolumeReadyState
I, [2011-09-15T11:04:39.891366 #6221] INFO -- : state machine: current state = TargetVolumeReadyState
0: new progress message = upload key of target-instance to source-instance...
0: new progress message = connecting 'root' to ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com...
I, [2011-09-15T11:04:39.891687 #6221] INFO -- : connecting using keydata
D, [2011-09-15T11:04:40.573494 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:04:40.574522 #6221] DEBUG -- : RemoteCommandHandler: starts executing 'uname -r'
D, [2011-09-15T11:04:40.574825 #6221] DEBUG -- : RemoteCommandHandler.on_process; send line-feed/sleep
D, [2011-09-15T11:04:41.577314 #6221] DEBUG -- : process terminated with exit-status: 0
D, [2011-09-15T11:04:41.578382 #6221] DEBUG -- : RemoteCommandHandler.on_eof: remote end is done sending data
D, [2011-09-15T11:04:41.579088 #6221] DEBUG -- : RemoteCommandHandler.on_close: remote end is closing!
0: new progress message = connected to ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com. OS installed is 2.6.21.7-2.ec2.v1.2.fc8xen
I, [2011-09-15T11:04:41.579650 #6221] INFO -- : connected to ec2-46-51-146-30.eu-west-1.compute.amazonaws.com
D, [2011-09-15T11:04:41.762477 #6221] DEBUG -- : pty successfully obtained
D, [2011-09-15T11:04:42.765877 #6221] DEBUG -- : process terminated with exit-status: 0
0: new progress message = going to upload to root@ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com:/root/.ssh/testing.pem /> state change notification: new state = FailedState (terminated)
W, [2011-09-15T11:04:43.515742 #6221] WARN -- : StateMachine exception during execution: can't convert nil into String
W, [2011-09-15T11:04:43.515960 #6221] WARN -- : /var/lib/gems/1.8/gems/net-scp-1.0.4/lib/net/scp/upload.rb:117:in `stat'
/var/lib/gems/1.8/gems/net-scp-1.0.4/lib/net/scp/upload.rb:117:in `set_current'
/var/lib/gems/1.8/gems/net-scp-1.0.4/lib/net/scp/upload.rb:24:in `upload_start_state'
/var/lib/gems/1.8/gems/net-scp-1.0.4/lib/net/scp.rb:356:in `send'
/var/lib/gems/1.8/gems/net-scp-1.0.4/lib/net/scp.rb:356:in `start_command'
/var/lib/gems/1.8/gems/net-ssh-2.2.1/lib/net/ssh/connection/channel.rb:311:in `call'
/var/lib/gems/1.8/gems/net-ssh-2.2.1/lib/net/ssh/connection/channel.rb:311:in `process'
/var/lib/gems/1.8/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:214:in `preprocess'
/var/lib/gems/1.8/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:214:in `each'
/var/lib/gems/1.8/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:214:in `preprocess'
/var/lib/gems/1.8/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:197:in `process'
/var/lib/gems/1.8/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:161:in `loop'
/var/lib/gems/1.8/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:161:in `loop_forever'
/var/lib/gems/1.8/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:161:in `loop'
/var/lib/gems/1.8/gems/net-ssh-2.2.1/lib/net/ssh/connection/channel.rb:269:in `wait'
/var/lib/gems/1.8/gems/net-scp-1.0.4/lib/net/scp.rb:279:in `upload!'
/var/lib/gems/1.8/gems/CloudyScripts-1.9.40/lib/help/remote_command_handler.rb:320:in `upload'
/var/lib/gems/1.8/gems/net-scp-1.0.4/lib/net/scp.rb:202:in `start'
/var/lib/gems/1.8/gems/CloudyScripts-1.9.40/lib/help/remote_command_handler.rb:319:in `upload'
/usr/lib/ruby/1.8/timeout.rb:67:in `timeout'
/var/lib/gems/1.8/gems/CloudyScripts-1.9.40/lib/help/remote_command_handler.rb:318:in `upload'
/var/lib/gems/1.8/gems/CloudyScripts-1.9.40/lib/help/state_transition_helper.rb:816:in `upload_file'
/var/lib/gems/1.8/gems/CloudyScripts-1.9.40/lib/scripts/ec2/copy_ami.rb:173:in `enter'
/var/lib/gems/1.8/gems/CloudyScripts-1.9.40/lib/help/script_execution_state.rb:36:in `start_state_machine'
/var/lib/gems/1.8/gems/CloudyScripts-1.9.40/lib/scripts/ec2/ec2_script.rb:55:in `start_script'
/home/roman/Develop/RubyWorkspace/Test.rb:128:in `run'
/home/roman/Develop/RubyWorkspace/Test.rb:172
== > Results of Copy AMI: true
New AMI ID:
done in 212s

Can you please help me what cause this error?