dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Java Language
Expertise: Beginner
Mar 6, 2000

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


ServerSocket Port Binding Error

Question:
My Java server compiles perfectly, but when I try to run it on my machine I get an error when it tries to open up the ServerSocket on port 2525. I have tried it on another machine and it works fine. It also worked on my own machine the first few times I tried it.

Answer:
Without knowing the exact exception you are getting, it is not possible for me to definitively diagnose the problem.

However, it sounds like the port is probably in use when it is failing. This could be caused by an error in closing the socket in one of your previous runs, or from another program on the system using the port. To see which ports are in use on your machine you can use the netstat command if you are using a Unix-based OS or netstat.exe on Win32.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date