Adam Howitt's Blog

May 06
2009

WalkJogRun iPhone Application v1 is live!

After over 200 hours of development, sweat, tears and late nights after work, Apple finally approved our app. It's available in the App Store today and I'd love to hear your feedback.

Under the hood it connects to WalkJogRun.net built on ColdFusion and MySQL, hosted at Amazon, to pull routes from our database. We've grown to over 400,000 routes in over 200 countries and growing every day.

Learn more here or download a copy here.

Mar 27
2008

Elastic IP addresses for Amazon

Amazon launched elastic IP addresses today for EC2. Elastic IP addresses allow you to assign a static ip address to your Amazon instance which makes it far more suitable for hosting your own sites now.

Prior to the launch of elastic IP addresses, your EC2 instances would be assigned an IP address from the pool that was not guaranteed to remain under your power. So if your instance crashed and you had to bring up a new instance, you get a new IP address and, if you were hosting a site on the old IP would now have to login to your domain name provider and update the A NAME record to the new address. PITA.

I just cut WalkJogRun over to an elastic IP address and it was far less painful than I imagined. The process for using elastic IP addresses is as follows:

  • Start an Amazon EC2 instance if you don't already have one
  • Request an IP address using the latest version of the EC2 tools and the ec2-allocate-address command
  • Assign that IP address to an instance id (i-something)
    ec2-associate-address -i i-b3e019da 75.101.157.145
  • Rush over to GoDaddy or wherever your DNS is recorded and change the A NAME to point at this new address.

Read the feature announcement here

Mar 18
2008

PASV mode FTP on Amazon EC2 with VSFTP

I've just spent the better part of an hour bashing my head against an FTP problem with Amazon EC2 so I thought I'd share the answer.

The problem was that active mode FTP kept crashing when I tried to use Beyond Compare to compare my local machine to my Amazon EC2 hosted  site.  I would get

500 Illegal PORT command
when using active and frequently saw suggestions to use PASV mode instead.

PASV mode on Ubuntu's default VSFTP installation is enabled by default but the default is to use any available pair of ports to handle passive mode.  Since Amazon locks down all ports except those you open manually my requests were being denied. I don't want to open up all ports on the server for the potential that a client tries to connect on any port.

You can force VSFTP to use a set range of ports for passive support by editing your /etc/vsftpd.conf to specify a port range.  I've used 15393-4 here:

# Passive support
pasv_min_port=15393
pasv_max_port=15394

Restart VSFTP

/etc/init.d/vsftpd restart

Open your Amazon EC2 firewall ports as specified. I do this using the firefox plugin EC2UI to accept the range 15393-4.

Lastly go to beyond compare Tools > Options > FTP > Firewall / Proxy and check the Passive Mode box.

Tada!