I am receiving the below error message when trying to start the glassfish server.
I have windows firewall turned on + microsoft security essentials (no other firewall is running).
I have done some research in forums and checked the following things as per suggestions:
1. checked that localhost 127.0.0.1 is present in hosts file
2. windows firewall is configured to allow java and glassfish processes
3. glassfish domain.xml is configured for the 64-bit jvm .
Please, can anybody help to resolve the issue?
java.io.IOException: Unable to establish loopback connection
at java.security.AccessController.doPrivileged(Native Method)
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
... 15 more
You will find that once you disable the firewall, things will suddenly work. The problem is that your firewall is being too strict that it prevents loopback connections, ie 127.0.0.1 even when the originator is your own IP. You will need to add firewall rules to allow connections to 127.0.0.1 from any IP. Once you got everything working, you might then want to restrict that rule further to only allow connections from the local network or certain trusted network ranges.
I resolved the issue today and it is very apparent that the culprit was 64-bit win 7 installation
I reinstalled the win 7 32-bit edition, jdk 1.6 32-bit, kept windows firewall on and didn't need to do any configuration, installed glassfish v3.01 and it worked straight away.
@handat: thanks for your suggestion. i actually configured windows firewall to allow localhost ip which failed.. so i completely disabled it and tried with no result. just letting you know.
Found the exact root cause:
Old installation of Avast firewall.
on my laptop I used Avast internet security and then removed it sometime ago. But some avast entries in registry were still left and also there was a windows service for Avast.
I found this out because I have a win 7 32-bit netbook where I was got same exception (Unable to establish loopback connection) yesterday when i tried to start glassfish.
So i deleted all avast registry entries and removed the avast service, then I could start the Glassfish server successfully.
So no surprise why it worked on my new Win 7 installation on original laptop as it was a clean format n reinstall.