1

I have hosted an application in a machine running Red Hat Enterprise Linux 5. I started the jBoss AS using the command.

./run.sh -b 0.0.0.0

and

./run.sh -Djboss.bind.address=<<server_address>>

and

./run.sh --host=<<ipaddress>>

but using any of these commands i cannot access the application remotely. Using the the above commands I cannot even access the application on the host machine itself, using localhost as well as ip address. I am not able to figure out the problem here. I can ping the linux machine from the other windows machines.

Rohan Patil
  • 277
  • 1
  • 4
  • 10

1 Answers1

1

Check iptables rules are not blocking firstly

Also are you running as a user? If so, you will not have permission to bind to a port number less than 1024.

try telneting the port from the server itself to check the service is responding e.g.

telnet localhost 8080

presuming that you are running on 8080 in the example above.

you can drop your iptables temporarily for testing if it is safe to do so by:

/etc/init.d/iptables stop

and restart them when you've finished with

/etc/init.d/iptables start

you can make a permanent change to your iptables config by adding the following line to /etc/sysconfig/iptables

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
Surfrdan
  • 505
  • 3
  • 12
  • i am running as root.. and yes after dropping the iptables i am able to access it :) thank you. Is there a method to open the port 8080 securely ?? – Rohan Patil Nov 16 '10 at 14:19
  • I tend to modify the iptables config manually. It's /etc/sysconfig/iptables – Surfrdan Nov 16 '10 at 14:31
  • Adding a line like so will enable port 8080 access to new connections from outside: -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT – Surfrdan Nov 16 '10 at 14:32
  • I anyway went to System->Administration->Selinux and Firewall and added 8080 port in other port section and its working fine now.. – Rohan Patil Nov 16 '10 at 14:36