Skip to content
Advertisement

Glassfish is not working on ReadHat Server

I am trying to install Glassfish 4.0 on a Linux Red Hat Entreprise Linux release 5.11 (Tikanga) Server.

Therefore, I successfully installed Java jdk1.7.0_79 and NetBeans 4.0 on this server following this website instructions: https://blog.idrsolutions.com/2014/02/tutorial-setting-up-glassfish-on-a-linux-server/

When I run the server using the linux command ./asadmin start-domain, the console tells me that everything is ok: enter image description here

If I run the sudo netstat -lntp command, I obtain the following output for port 4848:

enter image description here

which seems to be all right.

Finally, if I open the domain.xml file in glassfish/domains/domain1/config repertory, I will have: enter image description here

and enter image description here

and enter image description here

which is quite strange because port 4848 is not appearing and everything is set to localhost.

I really do not know what is going on. In the tutorial everything looked so straightforward. Could you help me please ?

Advertisement

Answer

I finally found out the problem.

The firewall of my Linux Red Hat Entreprise Linux release 5.11 was blocking the 4848 port. Therefore, using the following commands I successfully made everything working properly:

  1. Go to the following folder:

/etc/sysconfig

  1. Open the file containing the firewall table:

vi iptables

  1. Add the following line to the table:

-A RH-Firewall-1-INPUT -m state –-state NEW -m tcp -p tcp -–dport 4848 -j ACCEPT

  1. Save and exit
  2. Restart the network service by typing :

service iptables restart

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement