0
votes

I have an EC2 instance running Apex Oracle.

On the virtual machine I can access Apex by typing : localhost:8080/apex

I'm trying to access the same URL but from internet.

I use : ec2-xx-xx-xx-xx.us-east-2.compute.amazonaws.com:8080/apex but it's not working.

In my security attributes I have the following inbound rule :

  • Customized TCP Rule
  • Protocol : TCP
  • Ports : 8080
  • Source : MyIP address

My virtual machine's firewall doesn't block any connexion on this port.

What am I doing wrong ?

Thanks. Cheers,

4
It could be that the web service is not binding to the external port. Do you have another Amazon EC2 instance in the same VPC? If so, login to that instance and try accessing the Apex instance using its private IP address, eg 10.0.0.42:8080/apex - John Rotenstein
@JohnRotenstein thanks for your comment. Actually I can access my application from the host computer by typing : 127.0.0.1:8080/apex do you know what else should I check please ? - Thomas Carlton

4 Answers

0
votes

you should use elastic IP instead of EC2 public DNS. Besides, you need check your VPC network, routing, NACLs. It's better if you can showing your logs error.

0
votes

It could be the NACLs as well. Most often when you create a VPC you end up with some subnets that are not accessible via the internet. If your instance is in one of those subnets the security groups won't matter.

0
votes

this is only an option, may help you and cannot be guaranteed

See following post

check if the listener is bound only to localhost

lsnrctl status

you may get something like

 ADDRESS=(PROTOCOL=tcp)(HOST=localhost)

you need to find the configuration file and change HOST=0.0.0.0 (I'm not sure which file, just search for it)

0
votes

Make sure your instance is in a public subnet and not in a private subnet. An easy way to tell is whether or not your instance has a public IP, though this could also be incorrectly configured during the EC2 instance creation.

To verify connectivity, you could assign an Elastic IP to that instance then try connecting to it using the IP instead of the hostname. If that works then you know it's an issue with the hostname.

If you want to check your NACLs:

  1. VPC
  2. Route Tables
  3. Routes

The default VPC settings should work fine, it's only if you start using private subnets that things get tricky and you need a NAT Gateway.