Ask Your Question
1

IP address / domain name not resolved on Amazon EC2

asked 2011-11-27 19:10:08 -0500

IsaacSaito gravatar image IsaacSaito flag of United States
11 1 3

updated 2011-11-28 05:38:45 -0500

I have installed askbot experimentally on Amazon EC2, both of which I'm new to. On EC2 there's a feature called "Elastic IP" that assigns static IP to its virtual machine instance. When I start running askbot by following command WITHOUT using Elastic IP (meaning I used the IP dynamically assigned by EC2 at that moment), I can access to my askbot via browser by using WAN IP.

sudo python manage.py runserver `hostname -i`:8008

However, when I turn on Elastic IP, I can't access via browser ("not found" on browser, and no record in the web server's log).

It looks like hostname command returns LAN IP on EC2. So I tried:

sudo python manage.py runserver %WAN_IP%:8008

where %WAN_IP% is the one assigned by Elastic IP. This fails to run askbot complaining "Error: That IP address can't be assigned-to."

I want to keep using Elastic IP (since it's too cumbersome every time to change IP accordingly). Any idea would be appreciated.

The last 4 lines of my setting.py looks like this:

DOMAIN_NAME = '%WAN_IP%'

CSRF_COOKIE_NAME = '%WAN_IP%_csrf'
CSRF_COOKIE_DOMAIN = DOMAIN_NAME
delete close flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-11-27 23:27:53 -0500

Evgeny gravatar image Evgeny flag of Chile
11034 50 84 182
http://askbot.org/

updated 2011-11-27 23:28:47 -0500

Looks like you need to associate the "Elastic IP" with your instance, please take a look at the Amazon documentation.

http://aws.amazon.com/articles/1346

Take a look at the section "associate IP address with a running instance".

(The way you name the csrf cookie does not matter)

link publish delete flag offensive edit

Comments

@Evgeny thx. Once I manage to have time I'll try your suggestion and report.

IsaacSaito ( 2011-12-18 01:48:29 -0500 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2011-11-27 19:10:08 -0500

Seen: 267 times

Last updated: Nov 28 '11