I've recently switch over to AWS from Rackspace and I'm setting up a simple geolocation server using freegeopip. While the following commands work perfectly on a new Rackspace serve (Ubuntu) I can't getting working on AWS (tried Red Hat and Ubuntu). Here is the code I've used to set it up:
curl -s https://storage.googleapis.com/golang/go1.4.1.linux-amd64.tar.gz | tar -C /opt -zx
export GOPATH=$HOME
export GOROOT=/opt/go
export PATH=$PATH:/opt/go/bin
go get github.com/fiorix/freegeoip/cmd/freegeoip
$GOPATH/bin/freegeoip -addr="<MY IP ADDRESS>:8080"
As I've said this works perfecectly on my Rackspace instace but AWS gives me this error:
listen tcp <MY IP ADDRESS>:8080: bind: cannot assign requested address
I've checked this port with netstat and there is nothing running on it. I have no idea why I'm getting this error. Any ideas?