0
votes

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 ?

1
What have you done to investigate this so far? Some questions to consider: [1] Is the server definitely running? Check with sudo netstat -lntp to see if port 4848 is occupied. Also check the server log to make sure it started correctly. [2] Are you trying to connect to a remote server? If so, you need to enable secure admin and open the console over https.Mike
Thank you for your help Mike. I have updated my answer.Dave_Dev
The admin console port is set as a network listener under the network-config in the domain.xml. You might want to check that the server you are connecting to accepts connections on port 4848Mike
I've run on the server the tcpdump -i eth0 port 4848 command in order to see the traffic getting in the server. The 4848 seems to be opened. I do not have any error message.Dave_Dev
There's nothing blocking traffic from outside the network local to your server though? What about the other ports, can you access GlassFish on port 8080? There is a default page there even when nothing is deployed.Mike

1 Answers

0
votes

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