- Newest
- Most votes
- Most comments
Connection error:
It appears to me that you should check your security group's inbound rules. Please check the source either it is My IP or 0.0.0.0/0. If you get the public IP dynamically, then you have to change the My IP, and I believe you know the 0.0.0.0/0 source which is not secure, but you may try it. By stopping and restarting the ec2 could replace the EIP or Auto enabled public IP. If this the case you should reassociate the EIP with the VPC/EC2.
If I am not wrong "sudo apachectl configtest" will tell you line by line, if there is any apache server problem.
The wider part is DNS configuration with your new EIP or public IP and check the NS server. There are a few commands to check those. There is a publication on AWS "How do I troubleshoot issues with DNS record resolution for my public hosted zone in Route 53?" could help you.
Before you do anything, please make a snopshot of the instance, in case you may create more problem with the current instance.
I hope this will help you.
Your security group inbound rules, look fine. As you have mentioned that you are not an AWS infrastructure expert, that's a concern. So, I an not sure whether you have created the VPC and its dependencies manually or dynamically. If you have created the VPC and its dependencies manually, then it will be hard for you to check the association of subnets, IG, and IG's association with the VPC. You will get there, no worries. As I have said before when you have stopped the instance, your instance is no longer with the EIP any more. What you can do, just select that EIP and under Action on the top, release that EIP and reassociate it with the EC2. Action > Release Elastic IP addresses Action > Associate Elastic IP addresses On Associate Elastic IP address Info - Page Click refresh icon under the Instance and click inside the box, you will see the Instance/s, select the correct instance to associate the EIP. Afer all click the "Associate" button.
Or you can delete the EIP, and allocate a new EIP and associate the new EIP with the EC2. Select "Elastic IPs" on the left side of the dashboard. Click "Allocate Elastic IP address" top right corner of the page.
Now follow the "Action" menu to associate this EIP with your correct instance. I hope this will help you, and again you have reedit the DNS A recored. Because your DNS A record still have the old EIP. You have to replace the old EIP with the new one, if you have created a new noe. If you have not created a new EIP then you do not need to edit the DNS A record.
Let me know, I am happy to assist you.
Thank you for your reply. I did not create anything manually. I used Bitnami image and I believe that took care of everything automatically and resources were created dynamically. Before I make changes to elastic IP can you please have a look at the current settings I described (with screenshots) in this question. https://stackoverflow.com/questions/75624841/site-unavailable-on-ec2-instance-bitnami-image Please let me know afterwards if you think I should proceed with the changes regarding elastic IP you recommended.
Just one more quick comment regarding elastic IP. I see the same IP in DNS A records in "Route53 -> DNS Management, Hosted zone -> My Domain Name". Can you please explain how adding a new elastic IP could resolve the issue? Are you sure I don't need to update anything else except DNS A record after I create a new elastic IP?
Thanks again for your support!
UPDATE: if I try to release the EIP, I get this message: https://prnt.sc/hxpmArxuXfPg Additionally, I don't see where I can delete the EIP: https://prnt.sc/yVumPxORTYUg (since I am not infra. expert, as you can see, I am being super cautious regarding the changes)
In the tutorial (time 4:20) it says to start the following command: sudo systemctl status httpd When I run this command I get the following output Unit httpd.service could not be found.
I am back again, its probably you have installed "apache2" instead of httpd, even though both are apache server. Type-
sudo systemctl status apache2
sudo systemctl start apache2
sudo systemctl enable apache2
sudo apachectl configtest
Let me know with the update.
If I run "sudo systemctl status apache2" then I get the following output "Unit apache2.service could not be found.".
If I run "sudo /opt/bitnami/ctlscript.sh status" then I get this output: apache already running mariadb already running php-fpm already running
I posted this question on Bitnami forum https://github.com/bitnami/vms/issues/720 and to my question whether an issue is on Bitnami side, Bitnami says the following: "That's not possible. Bitnami pre-configures, packs, and publishes applications which can be deployed by end-users. Our applications are tested to work out of the box so it's unlikely that the issue is related to Bitnami configuration itself. Most of the time when the applications fail after deployment, it's due to either changes in the configuration or a lack of machine resources."
(I did not experience any issues with performance)
It appears everything is fine by looking at the screenshots. I did not get which security group is attached with your EC2 whether it is default or other two-security group. There are many cURL and dig commands to troubleshot the DNS, HTTP, HTTPS, NS, SOA and the correct IP address maped with the FQDN. You are right, there is no EIP delete option.
Before that I would say clear your Browser cache, and flush dns cache from the system. Turn off your router for a moment and reset it. And even you can restart your computer. Without getting the full access of the system, I am unable to investigate any further. You can approach to AWS. Please take a snapshot, you can make an instance from the snapshot - before you make any changes of the current EC2. If you have any further questions, please do not hesitate to ask me. Finally, I apologise for any inconvience.
Thanks for your quick response.
I am very much stuck with this and don't have any ideas on what to do next. As you could see I posted the issue on multiple forums, but it did not bring me any further.
Cache is emptied and routed is restarted. Site is still unreachable and it's been like this for 6 days already.
Do you have any other concrete ideas regarding resolving the issue? I'd appreciate any help I can get.
I have an Amazon Linux 2 AMI with httpd, MySQL, and WordPress installed. I have activated a theme. All on a sudden, I could not access the website. I tried all the avenues, nothing worked. Then I thought, as I am trying so many times, may be my network treat it as a DDoS attack. I had stopped for a few days to open the website, you will be surprused that my website came back after a day or two. It is from my own experience.
One thing I did extra which was I added the IP with the server host's folder. In my case it is: "sudo nano /etc/hosts"
x.x.x.x domain name
Saved it and restarted the server.
You can have a look at the link: https://aws.amazon.com/premiumsupport/knowledge-center/route-53-fix-dns-record-resolution/
Please let me know. Thanks again.
I found a solution - when I ran this command "sudo /opt/bitnami/ctlscript.sh restart" my site was up again. Hope this helps someone in the future.
Many thanks for your help and guidance! I really appreciate it
I found a solution - when I ran this command "sudo /opt/bitnami/ctlscript.sh restart" my site was up again. Hope this helps someone in the future
Thanks for letting me know, when you provided me the full details of your post, I saw this command in the bitname documents, and I thught you already applied this command. Good luck.
Relevant content
- asked a year ago
- asked 9 months ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 months ago
Thanks for your reply. This is how inbound rules in the security group are defined: https://prnt.sc/ieCq2NSsX6B6 I am using public hosted zone. I also noticed that elastic IP is associated with VPC. "sudo apachectl configtest" returns "Syntax OK".
I am really running out of options here, so I'd appreciate any help. Please consider I am not an infrastructure expert. Thanks.
I'd appreciate if we can proceed more structurally. Please let me know how and what I need to check and I will send you the infos. Thanks.