Could someone please guide me as to how I can launch my app on the EC2 instance? I have created the instance. I am able to connect using SSH. I have also uploaded my files to the instance. I am using Ubuntu as my OS. I have checked and reset the Security Groups rules to accept all traffic as both inbound and outbound traffic rules for my running instance. I am unable to move to next step where I would ideally be launching my app on the browser. I have also installed Apache server and made sure it is running. Am I missing something? I can see my files in the /var/www/html folder when I navigate through the terminal. How can I launch the index.html through the instance?
Any help would be appreciated.
Related
I have a Spring boot project which I want to host on an AWS-EC2 instance. I was able to create its image using Git-hub, Jenkin and docker. I was also able to successfully pull and run this image in the Linux console of my AWS-EC2 instance.
According the tutorial I was following I should have been able to open the project now using the public IPv4 DNS but the response I got was that it refuse to connect.
I know that this usually has to do with Inbound rules so I added a rule to allow all traffic but it didn't help.
For anyone who wants to know:
Git-hub repository: https://github.com/SalahuddinShayan/telecom
Docker-Hub repository: https://hub.docker.com/repository/docker/salahuddinshayan/telecom
Command I used to run the image in AWS:
docker run -p8081:8081 --name final-app --link docker-mysql:mysql salahuddinshayan/telecom
Security Groups:
Networking Details:
Here is the Error:
I am completely stumped by it. Does anyone an idea on what to do to fix this?
Please check if your client is calling the right protocol, e.g. http vs https.
You are transmitting on port 8081. http://3.110.29.193:8081/ works fine from the EC2 side. 404 status is raised, so this is a client side error, not a server side error.
It means that no firewall is blocking traffic and a process (your app) was found that listens on IP:Port that you require. The problem is that the process it encountered (your app) is sending only a WhiteLabel Error Page, which is a generic Spring Boot error page that is displayed when no custom error page is present. So the issue is with the Spring app itself and not with EC2 or with connection. In other words: the traffic can reach your Spring app, but your Spring app has nothing to say in response.
As a side note, after deploying your app I would advise to refine the inbound traffic rules to allow only the traffic you want. There is no need of allowing all traffic on all ports.
I just launched a instance on AWS and I'm trying to open the website. So I copy the Public IPv4 address and paste it on my page. But it always returns This site can’t be reached 35.78.183.239 took too long to respond.
I've changed my firewall setting to access google chrome and set security groups HTTP, HTTPS. I can't figure out where the problem is. Any suggestions?
You didn't specify what webserver or AMI is on your EC2 instance.
You need to setup an AMI or manually install and setup a webserver for anything to show, otherwise the EC2 instance, while reachable, will not respond.
Make sure that ssh access is enabled and try ssh into the machine. If you can successfully login, then you know the instance is reachable and the problem is with your webserver software. This will help you debug.
What port is your application running on? When you enable HTTP and HTTPS it only allows ports 80 and 443 on the security group. This won't help if your application runs on a different port, so you'll need to add that to your security group to allow inbound traffic.
I am trying to run my springboot API on AWS however when i try to connect to the endpoint the error Site cannot be reached IP refused to connect. This my first time working with AWS.
I created a linux instance and connected to it using filezilla. Afterwards i added my jar to a folder which i created on the linux instance using filezilla. I started the springboot project and its running but the problem is that i cannt seem to connect to the endpoints. Am i missing something, how do i connect to my endpoints.
The other thing to note is that i enabled https on my API and added swagger also.
You need to enable relevant ports in the instances' Security Group.
Look at this to create a new Inbound rule for the specific port.
You can go to the aws console, (here I am assuming you have deployed to us-east-1 if its something else, go to the relevant region.
Open up the relevant security group, and then click edit Inbound roles.
I have installed PencilBlue on AWS EC2 instance. i have started PB by using the command pbctrl start
Now, how can I access the PencilBlue login page?
Just like you run any other web server on EC2, you start the service, open the port in the Security Group, and then open the website in your browser.
I'm fairly new to EC2, hopefully someone can point me into the correct direction. I have a WCF Service hosted in Windows Service and would like to run this on EC2. I set up an EC2 account with Windows Server 2008 with SQL Server Express. I put my service out there and ran it, I'm able to test and connect to it from the browser with the private IP on the VM, but when I try to connect to the service from my computer with the Public IP, I'm not able to do so.
Am I missing some important configuration or am I totally off? Any help would be greatly appreciated. I'm testing this with port 8080 and added that to the Permission Groups. I also tried to assigned an elastic IP to the instance. Thanks in advance.
EC2 provides security groups, which are essentially a firewall external to the machine. The default security group will allow SSH and RDP connections. If you want requests for port 8080 to be received by the VM, update the security group settings for the VM. You can do this interactively from the Amazon Management Console.
You also need to configure the firewall running in the windows VM, but it appears you did this when you added the service to the 'Permission Groups'.