Address already in use

Hi, guys
I need your help with the following issue:
I'm trying to deploy/run a web project on a local web server (it's just the default web project created by Idea, with a single index.jsp), but I always get "Address already in use" error. I'm trying Idea 8618 with jdk 1.6u7 on Vista SP1. When I try it with Tomcat 6 it says localhost:8080 already in use and when I try it with glassfish it says localhost:4848 already in use. I went through the other posts on such issues, but nothing helped.
And before you ask :) :
- I have NOD32 firewall, NOD32 web monitor and windows firewall disabled
- netstat reports that ports 8080 and 4848 are free
- both Tomcat and Glassfish are starting and running fine when launched standalone

Obviously I'm doing something wrong, so if someone has ANY useful idea, please help.

Edited by: Nemo on Jul 30, 2008 1:59 PM


I get this quite often. There is a java process running. I kill it and I am good to go. I think it is something to do with the way Glassfish or Glassfish/IntelliJ work. It is very frustrating until you figure out what to do.


Thanks, but it seems it's not my case. I guess you get at least one successful launch and then the problems start for you, so you probably have issues with properly shutting down the server on exit or something. I can't start at all ... ever and more important - all the same for Tomcat.


Not necessarily. I could boot my machine and I still would not be able to start the server. It was not the case, where it started once, but failed on restarts. Also, it does not happen all the time. It seems like there is something that part of IJ that is looking for a port to use. Sometimes it grabs a port that my app server needs, sometimes it doesn't.


Hm, strange indeed. Do you think it's an IJ issue ? If it was so - then I guess there would be some helpful information here or on the issue tracker, while there isn't (or at least I couldn't find anything).


Help, anyone ?


I have the same problem. And I also can't run tomcat from eclipse.



when selecting server, be sure you choose "remote" option, otherwise, you'll get error if your server is already started (if you have chosen "local" server)
Could this be your problem?


Hi, guys
thanks to all of you for the ideas, but after all - I solved it my self and it has nothing to do with IDEA :-). Still I'm publishing the solution for all of you that might have the problem at some point (especially Problem 1 described below, which is very common, I think). There were actually two problems with caused by different things and solved separately.

Problem 1:
localhost is not accessible under Vista - the solution is to check your hosts file (system32/drivers/etc/hosts) and remove the ipv6 mapping "::1 localhost"

Problem 2:
port already in use - it turns up that disabling Eset smart security anti-virus and firewall does not disable the http filtering for some reason. Anyway - this is caused by the eset firewall and the way I solved it (there might be better, more secure option) is by switching the eset http protocol filtering (Advanced settings>Personal Firewall -> Protocol filtering) from "Ports and applications marked as Internet browsers and email clients" to "Applications marked as Internet browsers and email clients".

Of course, doing these two changes solved it once and for all - Tomcat, Glassfish etc.


Killing Java process works for me. If killing java doesn't work for you, then opne edit configuration for server, go to startup/connection tab go to debug and try changing the port .



deleting line which contains ":1 localhost"  in file (system32/drivers/etc/hosts) location worked for me... Thanks lllopo


Please sign in to leave a comment.