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:
If I run the sudo netstat -lntp command, I obtain the following output for port 4848:
which seems to be all right.
Finally, if I open the domain.xml file in glassfish/domains/domain1/config repertory, I will have:
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:
- Go to the following folder:
/etc/sysconfig
- Open the file containing the firewall table:
vi iptables
- Add the following line to the table:
-A RH-Firewall-1-INPUT -m state –-state NEW -m tcp -p tcp -–dport 4848 -j ACCEPT
- Save and exit
- Restart the network service by typing :
service iptables restart