Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon EC2: Jetty Unaccessible

I'm trying to install jetty in an Amazon EC2 instance running Ubuntu. The installation seems OK

$ sudo apt-get install jetty

After that I made the parameter NO_START=0 in /etc/default/jetty

Finally

$ sudo service jetty start
    Starting Jetty servlet engine. jetty
    Jetty servlet engine started, reachable on http://ip-xx-xxx-xxx-xxx:8080/
    ...

Nevertheless, when I write in the browser (external computer):

 http://ec2-xxx-xx-xx-xx.compute.amazonaws.com:8080 

The browser could not connect to the address using the given port. I don't know if something is missing during the installation or the URL is wrong.

Thanks for your time and help :-) ,
- Carolina

like image 483
user968175 Avatar asked Oct 10 '22 21:10

user968175


2 Answers

Each instance on amazon has a security group assigned to it. In the AWS console, select the instance and the security group is shown in the lower pane. Then select security groups on the left and select the group for that instance from the table. In the lower tab, select inbound, these are the IPs addresses/ports allowed in. If 8080 isn't allowed, that's your problem, you need to add it. Enter 8080 in the port range box and 0.0.0.0/0 for the source. Then "add rule" and make sure you "apply rule change" lastly.

like image 200
Thomas the Tank Engine Avatar answered Oct 13 '22 11:10

Thomas the Tank Engine


I found the answer here: Jetty (mis)configuration: it wont respond from an external machine... why? You need to change /etc/default/jetty to have JETTY_HOST=0.0.0.0

like image 24
fratrik Avatar answered Oct 13 '22 10:10

fratrik