I installed jboss in my ec2 instance. My elastic ip address 52.16.53.218.
I deployed my retailproduct application. Server is started. Deployed successfully, but I can't access my application.
I tried below ways:
http://localhost:8080/retailcare
http://127.0.0.1:8080/retailcare
http://52.16.53.218:8080/retailcare
I can't access. Any help appreciated.
Accessing localhost stays totally within the Amazon EC2 instance, so it would not be impacted by Security Group.
If you are able to SSH/RDP to the actual server and accessing http://localhost:8080/retailcare does not work, then it is a problem with your application or JBoss configuration.
Related
I'm using Elastic Beanstalk to run my app. It's associated with a single EC2 instance (PHP 8.0 running on 64bit Amazon Linux 2/3.3.4, using Nginx) and a RDS.
The problem is that I can access the app via the EB domain (e.g. http://app21.us-east-2.elasticbeanstalk.com/) on a Browser, but I get an instant "connection refused" via the EC2 instance public IP address (e.g. 18.190.158.12). Note, its slow to load via the EB domain because its attempting to load over https (and I dont have ssl set up yet). I can also SSH into the EC2 instance.
The first thing I tried was to look at the EC2 security groups below. I added some rules to be sure https and http were both allowed via IP4 and IP6 (Screenshot ->
EC2 Security Groups)
In the EB configuration details it says the EB environment is not part of a VPC. That confuses me a little as I think the EC2 instance is? Anyway, navigating through the instance pages I found the ACL associated with the instance. Below are the inbound and outbound rules (Screenshots ->
ACL Inbound Rules,
ACL Outbound rules)
Interestingly when I ping both the EB domain and the EC2 IP they both timeout.
I'm not sure where to go next! Is it possibly a Nginx issue? It's a Laravel app but I cant imagine Laravel is causing the issue.
Let me know if there's other info I can provide! Thanks in advance for any help.
UPDATE-SOLVED
Both the EB domain and the instance public IP address are now available. Its not clear to me why, but here's what I changed;
I changed my a-name to point to the EBS domain rather than the EC2 instance IP (I dont think should have any effect on the issue though)
I added a listener on the application load balancer for https (which references an AMS cert).
My domain resolves to the EB domain and the public EC2 IP address also resolves. Go figure!
So, I am using parse server which is hosted on an elastic beanstalk environment and I was able to upload it successfully since the Health states that it is 'OK'. My database is hosted within my EC2 instance and I'm usually able to access it via Mongodb Compass. The problem is that my Elastic beanstalk cannot seem to read the database that is within the ec2 instance.
I know that for apps built using parse server require one to set up environment variables shown in the screenshot. So my question is, which url should I use for the database_uri? I have tried using the Public DNS (IPv4) and the Private IPs from the EC2 instance but none of them have worked. I believe that knowing this answer will successfully connect the ec2 instance to the app. I appreciate the help in advance.
I assume the EC2 instance with MongoDB and the Elastic Beanstalk instance are both in the same VPC. If that is so, then you need to use the private IP of the EC2 MongoDB instance. You will also need to open the security group rules assigned to the MongoDB instance appropriately.
I am new to amazon EC2 instances. I am able to deploy my jar in EC2 linux instance and execute it but the jar is running in Private DNS mode. I am not able to access the http and https urls from my local machine. I already enabled all traffic to access the api (in Security Group). Do I miss anything to get the api access over the internet? How can I run my api in public DNS mode?
I am trying to create a web application using AWS Cloudformation. This particular app will have 3 instances (Web server, App server, RDS database). I want these instances to be able to talk to each other. For example, the Web server should talk to App server, and the App server should talk to RDS database.
I can't understand how to configure the servers so that they know each other's IP address. I figure there are 3 ways to do this - but I'm not sure which of these is realistically possible or feasible:
I can assign a fixed private IP address (e.g. 192.168.0.2 and so on) during stack creation - this way I know beforehand the IP address of each instance
I can wait for AWS Cloudformation to return the IP addresses of the created instances and manually tweak my code to use these IP addresses to communicate using these IPs
I can somehow get the IP address of the created instance during the stack creation process and store it as a parameter in the next instance I create (not sure if Cloudformation allows this?)
Which is the best way to set this up? Also, please share a little bit of detail around how I can do this in Cloudformation.
A solution would be to place your Web server and App server behind an ELB (load balancer). This way, your web server will communicate with the app server using the ELB's URL (not the app server's IP). The app server can communicate with the RDS instance via the RDS instance's endpoint (which is again an URL).
Let's suppose you separate your infrastructure into 3 CloudFormation stacks: the RDS database, the app server and the web server. The RDS stack will expose the RDS instance's through the CloudFormation Outputs feature. This endpoint will in turn be used as an CloudFormation Parameter to the App server stack. You can insert the RDS endpoint in the App server LauchConfiguration's UserData field, so that on startup, your App server will know the RDS instance's endpoint. Finally, your App server stack will expose the App server's ELB endpoint (again using the CloudFormation outputs feature). Using the same recipe, the URL of your App server's ELB will be injected and used by your Web server stack.
As a side note, it is also a good idea to oversee your services (web server, app server) using an Autoscaling group. It is very probable that your instances will be terminated by factors out of you control. In that case, you would want the Autoscaling group to start a fresh new instance and place it behind your ELB.
I have 1 AWS - EC2 instance (windows server 2008 r2) running - I configured the security group to my IP address - I downloaded the RDP for it, and was able to logged in successfully,and now I want to give my friend's computer an access to the EC2 instance I have.
how do you I add another ip address on an EC2 instance so that my team can access the same windows server on AWS?
we want to use the server as a development environment. please advice.
thanks in advance.