Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting a cherrypy Hello World running on EC2 instance

I am trying to do a simple proof of concept on a new EC2 instance in which I run the "Hello World" tutorial code from the CherryPy distribution.

CherryPy launches successfully, and a wget run directly on the EC2 instance successfully retrieves the Hello World page. However, trying to access the same page from my own machine results in a "could not connect" error.

CherryPy is running on port 8080, and my EC2 instance is set up with a security group that ought to be allowing traffic from anywhere to connect to port 8080.

Here is my CherryPy tutorial.conf:

[global]
server.socket_host = "127.0.0.1"
server.socket_port = 8080
server.thread_pool = 10

I have tried connecting to the web server using both the public DNS listed in the AWS management console, as well as by setting up an elastic IP; neither allows a successful connection.

Any guidance would be greatly appreciated.

like image 452
JTB Avatar asked Apr 09 '11 22:04

JTB


People also ask

Can I run a Python script on AWS?

Run a Python script from GitHubOpen the AWS Systems Manager console at https://console.aws.amazon.com/systems-manager/ . In the navigation pane, choose Run Command. If the AWS Systems Manager home page opens first, choose the menu icon ( ) to open the navigation pane, and then choose Run Command. Choose Run command.

Can you create AMI from running instance?

From the Amazon EC2 Instances view, you can create Amazon Machine Images (AMIs) from either running or stopped instances. Right-click the instance you want to use as the basis for your AMI, and choose Create Image from the context menu.

What are the 3 different methods that you connect to a EC2 instance?

Connect using a standalone SSH client. Connect using Session Manager. Connect using browser-based SSH connection.


1 Answers

Set the socket_host to the server ip or '0.0.0.0' for external access.

like image 185
A. Coady Avatar answered Sep 30 '22 20:09

A. Coady