0

I've created a free tier EC2 instance on AWS. I've opened inbound connections to this instance through security group. On EC2 instance, I'm able to access wildfly server and see it running/listening on port 127.0.0.1:8080. When I run netstat -ab command on EC2 instance I can see services listening on above IP address/port number combination. Could you please help me connect to this instance from my own machine? Please let me know if I should provide any additional info that would help troubleshoot the problem. Thanks in advance.

I've opened below inbound ports-

80      tcp 0.0.0.0/0
8080    tcp 0.0.0.0/0
22      tcp 0.0.0.0/0
23      tcp 0.0.0.0/0
3389    tcp 0.0.0.0/0
443     tcp 0.0.0.0/0
-1     icmp 0.0.0.0/0
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
tanmayub
  • 86
  • 3
  • 13
  • Did you check the Windows firewall? Which address do you use to connect remotely? The public dns name? – David Levesque Feb 08 '16 at 19:24
  • I've allowed all inbound traffic on port 8080 through windows firewall on EC2 instance. I'm using below address: xxx.us-west-2.compute.amazonaws.com:8080 to connect – tanmayub Feb 08 '16 at 19:25

2 Answers2

2

Your service listens 127.0.0.1 which is not your network interface. Configure to listen to your instances private ip (10.x..) or 0.0.0.0 (all) instead

Michel Feldheim
  • 17,625
  • 5
  • 60
  • 77
  • Could you please guide how can I achieve that? I've changed standalone.xml as below: and I've changed my /etc/hosts file with: ::1 xxx.us-west-2.compute.amazonaws.com – tanmayub Feb 08 '16 at 19:27
1

Solved it with the help of this post: JBoss WildFly: Starts but can't connect?

I was almost there but had to change standalone.xml to listen to all ports as @Michel suggested. Below is my standalone.xml . Thank you all again for all the help.

Earlier standalone entry:

<interfaces> 
 <interface name="management"> 
    <inet-address value="${jboss.bind.address.management:0.0.0.0}"/> 
 </interface> 
 <interface name="public"> 
    <inet-address value="${jboss.bind.address:0.0.0.0}"/> 
 </interface> 
 <interface name="unsecure"> 
    <inet-address value="${jboss.bind.address.unsecure:0.0.0.1}"/> 
 </interface> 
</interfaces>

Changed above to this:

<interfaces>
        <interface name="management">
            <!-- Use the IPv4 wildcard address -->
        <any-address/>
        </interface>
        <interface name="public">
            <!-- Use the IPv4 wildcard address -->
        <any-address/>
        </interface>
        <interface name="unsecure">
            <!-- Use the IPv4 wildcard address -->
        <any-address/>
        </interface>
    </interfaces>
Community
  • 1
  • 1
tanmayub
  • 86
  • 3
  • 13