This discussion is archived
3 Replies Latest reply: Feb 20, 2011 1:55 AM by 840714 RSS

Unable to start  GlassFish server V3.01 on Windows 7 64 bit

840714 Newbie
Currently Being Moderated
Hello All,

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?


[#|2011-02-16T22:55:52.443+0000|SEVERE|glassfish3.0.1|grizzly|
ThreadID=18;Thre
adName=Thread-16;|doSelect IOException
java.io.IOException: Unable to establish loopback connection
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:106)
at java.security.AccessController.doPrivileged(Native Method)
at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:122)
at
sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27
)
at java.nio.channels.Pipe.open(Pipe.java:133)
at
sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:104)
at
sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvid
er.java:26)
at java.nio.channels.Selector.open(Selector.java:209)
at com.sun.grizzly.util.Utils.openSelector(Utils.java:100)
at
com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.ja
va:399)
at
com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:
379)
at
com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.
java:183)
at
com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:
130)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:
500)
at java.nio.channels.SocketChannel.open(SocketChannel.java:
146)
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:78)
... 15 more
|#]
  • 1. Re: Unable to start  GlassFish server V3.01 on Windows 7 64 bit
    handat Expert
    Currently Being Moderated
    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.
  • 2. [RESOLVED]Re: Unable to start  GlassFish server V3.01 on Windows 7 64 bit
    840714 Newbie
    Currently Being Moderated
    RESOLVED!!!

    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.


    Regards,

    Prash
  • 3. Re: [RESOLVED]Re: Unable to start  GlassFish server V3.01 on Windows 7 64 bit
    840714 Newbie
    Currently Being Moderated
    Hi all,

    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.


    Prash

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points