2

I am using Eclipse oepe 3.8 and glassfish 4.0. I am getting the error "The Eclipse plugin cannot communicate with the GlassFish server.... The Eclipse plugin cannot communicate with the GlassFish server.Please, check for antivirus software blocking or monitoring this port, or firewall configuration, or VPN setup which might block some ports..." whenever i try to start glassfish from eclipse.There are no process running on port 8080 and 4848,i have checked it,still i am getting this error.

Pallav
  • 163
  • 2
  • 12
  • I faced same issue. I just ended all my tasks(java). I started eclipse again. It resolved my issue. – Krish Dec 03 '13 at 09:36

4 Answers4

2

i got the issue while starting the glassfish4 server and resolved too . Here the solutions is:

Create new domain after starting the asadmin batch file in (glassfish4/bin) using command : create-domain newdomainame

i.e: C:\glassfish4\bin (installed location) -> start "asadmin" batch -> create-domain newdomainame (ie: create-domain domain2)

once done these things just add this server in eclipse environment and start the server and test it.

for adding server just follow the video link given here: http://www.youtube.com/watch?v=9kb0iLpqKY4

Bhaskar P
  • 32
  • 2
0

Uncheck "preserve sessions across redeployment" in server properties

I can't post comments yet but would like to link to Christoph Andriessens's answer here which helped resolve my issue.

Restarting Eclipse and my computer did not help in my case. Quoting the full answer here from Christoph:

I had exactly the same problem. When I set "preserve sessions across redeployment" in the Eclipse properties dialog for GlassFish, tab "GlassFish", to false (true being the default), everything worked out fine.

After doing that, the initial error goes away but I got another error "Publishing to Glassfish 4 at localhost[domain1].. has encountered a problem.". This answer resolved it for me. Again i quote:

I had same deployment issue (eclipse Lune/Glassfish 4.1) and it was resolved thanks to Marvin's feedback.

You can find the "Use JAR archives for deployment" by: right click on glassfish from eclipse server tab. Then, select Monitoring >Properties > Glassfish in new windows > Use JAR archives for deployment.

Then, the miracle occurs...

Community
  • 1
  • 1
typoerrpr
  • 1,408
  • 17
  • 16
0

Change the port if you are in development mode.

I did as mentioned below and voila, my glassfish server instance was up and running(Running from inside eclipse).

  1. Go to %INSTALLED_GLASSFISH_PATH%/glassfish/domains/domain1/config/ and open domain.xml.
  2. Find <network-listeners> element.
  3. One of the child element mentions the port used by the server. Change that port number to some other port number which is not in use.

We can check the port used by the Glassfish instance by following the below listed steps -

a. Go to Windows->Show View> Servers b. In the Servers view, select the Glassfish server and right click. c. Go to Monitoring -> Properties -> Glassfish. Here, we can see the server port in use.

  1. After changing the port number -> go to eclipse and repeat (a), (b) and (c).
  2. You should have a properties screen opened as shown below.

enter image description here

  1. Click on the Browse button present next to the Domain Path text box. This should open Directory browser on your machine. Just click on Ok. Eclipse will load the changes done in the domain.xml file. Click on Apply and Ok and you are all set to run the Glassfish server instance.

Hope, this helps someone to avoid the brutal cycle of restarting eclipse, system, unintalling the glassfish/ eclipse instances.

Tirath
  • 2,094
  • 15
  • 26
0

Best Solution is Stop the server and Remove the Server ones from eclipse and again add the server in eclipse and Start the Server