Can't `appscale up` on EC2. failing on some shell command?

31 views
Skip to first unread message

Nick Bauman

unread,
Jul 14, 2015, 11:09:30 PM7/14/15
to appscale_...@googlegroups.com
This should be pretty simple: what am I doing wrong? I see no instances running in my amazon console. My AppScalefile looks like this (removed all commented lines):

---
infrastructure : 'ec2'
machine : 'ami-94a0a6fc'
EC2_ACCESS_KEY: 'REDACTED'
EC2_SECRET_KEY: 'REDACTED'
instance_type : 'm3.medium'
zone : 'us-east-1b'
table : 'cassandra'
min : 1
max : 1


When I try to do an `appscale up` I get the following stack trace in the log:

stacktrace : Traceback (most recent call last):
  File "/usr/local/bin/appscale", line 61, in <module>
    appscale.up()
  File "/Library/Python/2.7/site-packages/appscale/appscale.py", line 252, in up
    AppScaleTools.run_instances(options)
  File "/Library/Python/2.7/site-packages/appscale/appscale_tools.py", line 405, in run_instances
    node_layout)
  File "/Library/Python/2.7/site-packages/appscale/remote_helper.py", line 118, in start_head_node
    instance_id, public_ip, private_ip = cls.spawn_node_in_cloud(options)
  File "/Library/Python/2.7/site-packages/appscale/remote_helper.py", line 248, in spawn_node_in_cloud
    options.infrastructure, options.verbose)
  File "/Library/Python/2.7/site-packages/appscale/remote_helper.py", line 338, in enable_root_login
    is_verbose, user='ubuntu')
  File "/Library/Python/2.7/site-packages/appscale/remote_helper.py", line 367, in ssh
    cls.SSH_OPTIONS, user, host), is_verbose, num_retries, stdin=command)
  File "/Library/Python/2.7/site-packages/appscale/local_state.py", line 771, in shell
    .format(command, stdin, output))
ShellException: Executing command 'ssh -i /Users/nickbauman/.appscale/appscale9f0edb7a33cb478b8b8828d805ca40f1.key -o LogLevel=quiet -o NumberOfPasswordPrompts=0 -o StrictHostkeyChecking=no -o UserKnownHostsFile=/dev/null ubu...@ec2-52-2-173-87.compute-1.amazonaws.com  sudo sort -u ~/.ssh/authorized_keys /root/.ssh/authorized_keys -o /var/folders/3d/lfb8v4bn2w37m1gdnbm95vpw0000gn/T/tmpno22S5' failed:


Here's the shell session for appscale up:

➜  appscale_aws  appscale up                                              
Machine image ami-94a0a6fc does exist
Availability zone us-east-1b does exist
Starting AppScale without specifying persistent disks means your data will not be saved when your cloud is destroyed.
Are you sure you want to do this? (Y/N) y
Starting AppScale 2.3.1 over the ec2 cloud.
Verifying that keyname appscale9f0edb7a33cb478b8b8828d805ca40f1 is not already registered.
Creating key pair: appscale9f0edb7a33cb478b8b8828d805ca40f1
Creating security group: appscale9f0edb7a33cb478b8b8828d805ca40f1
Authorizing security group appscale9f0edb7a33cb478b8b8828d805ca40f1 for udp traffic from port 1 to port 65535
Authorizing security group appscale9f0edb7a33cb478b8b8828d805ca40f1 for tcp traffic from port 1 to port 65535
Authorizing security group appscale9f0edb7a33cb478b8b8828d805ca40f1 for icmp traffic from port -1 to port -1
Starting 1 machines with machine id ami-94a0a6fc, with instance type m3.medium, keyname appscale9f0edb7a33cb478b8b8828d805ca40f1, in security group appscale9f0edb7a33cb478b8b8828d805ca40f1, in availability zone us-east-1b
Using on-demand instances
Waiting for your instances to start...
Waiting for your instances to start...
Waiting for your instances to start...
Started 1 on-demand instances in 44 seconds
Please wait for your instance to boot up.
Root login not enabled - enabling it now.
Executing command 'ssh -i /Users/nickbauman/.appscale/appscale9f0edb7a33cb478b8b8828d805ca40f1.key -o LogLevel=quiet -o NumberOfPasswordPrompts=0 -o StrictHostkeyChecking=no -o UserKnownHostsFile=/dev/null ubu...@ec2-52-2-173-87.compute-1.amazonaws.com  sudo sort -u ~/.ssh/authorized_keys /root/.ssh/authorized_keys -o /var/folders/3d/lfb8v4bn2w37m1gdnbm95vpw0000gn/T/tmpno22S5' failed:
Welcome to Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-80-virtual x86_64)

 * Documentation:  https://help.ubuntu.com/

 System information disabled due to load higher than 1.0

  Get cloud support with Ubuntu Advantage Cloud Guest:

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

New release '14.04.2 LTS' available.
Run 'do-release-upgrade' to upgrade to it.



sort: open failed: /var/folders/3d/lfb8v4bn2w37m1gdnbm95vpw0000gn/T/tmpno22S5: No such file or directory


chris....@appscale.com

unread,
Jul 14, 2015, 11:47:39 PM7/14/15
to appscale_...@googlegroups.com
This is a bug in appscale tools. The tools are generating a temporary file location, but they are asking your local machine for the location of a temporary file. It appears your os uses /var/folders/... as a location for a temp file. That directory doesn't exist on the vm, so the ssh command fails.

We will have to implement a proper fix, but in the meantime, you should be able to hardcode a location on the vm to use (eg /tmp/as_auth_keys) in your tools. Here's the line: https://github.com/AppScale/appscale-tools/blob/master/lib/remote_helper.py#L317

Nick Bauman

unread,
Jul 15, 2015, 11:02:56 AM7/15/15
to appscale_...@googlegroups.com
Anyone know what this is about? We tried this with two separate EC2 accounts and we get the same error.

Nick Bauman

unread,
Jul 15, 2015, 11:50:58 AM7/15/15
to appscale_...@googlegroups.com
It appears the problem has to do with having the appscale-tools running on a Mac. We seem to be getting further with the appscale-tools running from Linux.

Nick Bauman

unread,
Jul 15, 2015, 12:18:02 PM7/15/15
to appscale_...@googlegroups.com
Yes that's it: the appscale tools make incorrect assumptions about creating temporary files on different platforms. A temp file created on a Darwin machine can't also be created on a Linux machine because the directory structures of either machine are not the same at all.

We were able to work around this by deploying using a Linux VM from our macs for now.

chris....@appscale.com

unread,
Aug 5, 2015, 7:18:52 PM8/5/15
to AppScale Community
Just to follow up on this, a fix for this issue has been merged to master.
Reply all
Reply to author
Forward
0 new messages