I\'m using Glassfish 3.0.1, JVM 1.6.0_21 on Windows XP Pro;
I don\'t know exactly what has changed in my environment but I get this stacktrace as soon as I try to de
I notice you are using windows, which is particularly bad about using low port numbers for outgoing sockets. See here for how to reserve the port number that you want to rely on using for glassfish.
You can try to use TCPView utility.
Try to find in the localport column is there any process worked on "busy" port. Right click and end the process. Then try to start the Tomcat.
Its really works for me.
on windows open a cmd.exe window with administrator permissions and use netstat -a -b -o
you will get the id of the proccess that holds your port and be able to kill it using task manager.
My answer does 100% fit to this problem, but I want to document my solution and the trap behind it, since the Exception is the same.
My port was always in use testing a Jetty in a Junit testcase. Problem was Google's code pro on Eclipse, which, I guess, was testing in the background and thus starting jetty before me all the time. Workaround: let Eclipse open *.java files always w/ the Java editor instead of Google's Junit editor. That seems to help.
Your local port 443 / 8181 / 3820 is used.
If you are on linux/unix:
netstat -an
and lsof -n
to check who is using this portIf you are on windows
netstat -an
and tcpview to check.This problem mostly occurs because there could be another istance of the code running, from some previous tests you did most probably. Find out and close any other instance or if it is ok, try restarting the server.