Can't connect to EC2 Instance via Browser. Via terminal works fine - amazon-web-services

I launched an EC2 instance on Amazon Web Services and want to deploy Confluence on a Ubuntu 18.04 Server. Almost everything is set up now.
I just need the last step:
I need to call http://{ec2-public-ip}:8090 from my browser to do the last steps of configuration of Confluence via the frontend, as described in the instructions of Confluence (https://confluence.atlassian.com/doc/installing-confluence-on-linux-143556824.html).
I don't have any issues with connecting to the EC2 instance via ssh in terminal (macOS) as ubuntu and also as root by using privateKey.pem. This works fine. Installation of Confluence and setting up a MySql DB were also successful. EC2 instance is running. Getting a connection via AWS Session Manager also works, but opens a terminal in my browser and if I ping the EC2 instance via the AWS Session Manager, there is a 100% packet loss. Via local terminal on my mac there is 0% packet loss.
Also calling http://{ec2-public-ip}:8090 via browser causes ERR_CONNECTION_REFUSED in Safari, Chrome, IE and Firefox.
What I already tried:
Security Groups (All Traffic, MyIP); also tried to allow Any Traffic
Firewall completely off; Proxy completely off
Opened all necessary Ports in my Network (8090, 8000, 22, 23)
Emptied Browser Cache
Flushed DNS; new IP; rebooted router; rebooted EC2 instance
Does anybody have an idea how to solve this problem? I know that there have been a few discussion about this topic, but none of those comments or solutions worked.

I chose a different Port as selected by Confluence. This worked immediately.
The packet loss was caused by the already assigned HTTP Port 80, although Confluence uses 8090 by default. When I pinged the server, all of my packets have been delivered, while all incoming packets went to a different device in my Network. As result my Terminal told me, that no packet was delivered to my Mac. Which was obviously true.
Now everything is up and running just fine.
I saw that a lot of people in the Internet had the same problem. Just try it again but choose different Ports while installing Confluence on your Server.

Related

Unable to open Public IPv4 DNS in AWS EC2 - Linux instance

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.

HTTP server on EC2 instance unreachable after a few minutes

I have a running instance on the Linux 2 AMI.
I have a default VPC and network interface.
Security groups taken care of, even opened all traffic and still got nothing.
There is an Internet Gateway
Routes are open on the VPC
The server is running
nginx is running
Once the instance is initiated and installed, all of this is ready
I can reach the http website the first 2-3 minutes, then it is unreacheable.
No idea why, everything else still running, can still ssh into the server, but http port 80 not running.
I opened everything from iptables, still nothing.
If I reboot the server, I get a minute where I can reach the server via http, but then a minute later its the same again.
I can reach http if I use $ wget http://localhost
So I think it is probably something from the EC2 control panel, not the instance itself.
I tried on new instances too.
Anyone has an idea?
The reason behind this weird behavior was that AWS abuse team had blocked some of my ports, had to upgrade to the developer plan to be able to know this, contacting them at the moment

Unable to make API requests in AWS EC2 Windows instance

I have made a spring boot REST API (as a jar file) which links to MongoDB compass installed on the same EC2 instance.
When I run the jar file (in cmd) on my Windows 10 laptop (not the EC2 instance), it works totally fine and I'm able to make the http requests with Postman (from my IP). And when I run the jar file on my EC2 instance with cmd, it still runs normal and everything seems fine.
But this time I'm unable to make the http requests from anywhere. Postman says Could not send request Error: Request timed out.
I've tried using both the public IP and Public DNS IP. Going through the other solutions to questions similar as mine, I got to know that I'd to add inbound rules for all the ports which I'm using (8080 and 27017 in my case). I also enabled stuff from Windows Firewall in the EC2 instance but nothing helps me at the end.
Any help would be really appreciated.

How do I access the web GUI of my NiFi instance running on an AWS machine?

I am trying to run NiFi on an AWS machine and access the web GUI on my local computer.
I have followed guides such as: https://community.hortonworks.com/articles/47778/hdf-installation-on-ec2.html but whenever I type in the DNS:8080/nifi into my web browser I get a "connection refused" or timed out message.
I have created an AWS Red Hat machine, installed NiFi + java, and edited the nifi.properties file such that it is now:
# Site to Site properties
nifi.remote.input.host=ec2-34-224-216-146.compute-1.amazonaws.com
nifi.remote.input.secure=false
nifi.remote.input.socket.port=
I have tried leaving the port number blank, as well as other numbers such as: nifi.remote.input.socket.port=8082
but neither work when I enter
ec2-34-224-216-146.compute-1.amazonaws.com:8080/nifi into my browser.
I have also tried adding the domain to my local computer's /etc/hosts file in the form of the Public DNS as well as IPv4. I have also configured the security group on AWS such that I have a "Custom TCP Rule" with the port range 8081, 8082, etc. for the respective ports I have attempted.
I am not sure what I am doing wrong or if I am missing a step. Any help is appreciated.
The properties you are configuring are for site-to-site connections and are not related to the UI. These would be used if another NiFi or MiNiFi was making a site-to-site connection to your NiFi instance.
To control the UI you should be configuring:
nifi.web.http.host=
nifi.web.http.port=8080
nifi.web.https.host=
nifi.web.https.port=

AWS EC2 is running but website is showing connection time out

I am running Bitnami WordPress on AWS server website working since two days but suddenly it stop showing anything and connection timeout is showing. The instance EC2 is running perfectly fine, and I have also seen IP logs, and nothing suspicious has come up.
Based on the above comments I guess the issue is with the internal web server
Make sure that the web server is running perfectly fine. And I do not mean just checking the EC2 instance state, because it is possible that the EC2 instance is running but the web server is down, causing the issue