Solved

Cannot open socket - Listen fails

Posted on 2000-05-17
6
189 Views
Last Modified: 2010-04-01
i installed jdk2 and jsdk2.0 on win95. when i ran SERVLETRUNNER which comes with jsdk2.0 i get the following Exception

java.net.SocketException : Descriptor not a socket Listen failed.
with a stack trace printed out in Standard output

is there a problem with jvm i installed jrun and uninstalled as it too was not able to open a socket to listen.

Thanks
arun.
0
Comment
Question by:marun
  • 4
6 Comments
 
LVL 7

Accepted Solution

by:
Ravindra76 earned 100 total points
ID: 2820101
Replace java.policy file

in c:\jdk2home\jre\lib\security

with



// Standard extensions get all permissions by default

grant {
      permission java.security.AllPermission;
};

Note:- c:\jdk2home is the directory where U actuallu installed JDK software
0
 
LVL 1

Expert Comment

by:tonus
ID: 2821165
Hi,
Generally Servletrunner is trying to connect to 8080 port. If that port is occupied by some other process, servletrunner won't start. Try changing the port of the servletrunner (setup files u will get in c:/jsdk2.0/examples) and run the servletrunner

bye
0
 
LVL 7

Expert Comment

by:Ravindra76
ID: 2821237

Hi ,

It is not port problem.

If it is so, it will give already bind exception

If U still face, some problem

run Your servlets with this command

servletrunner -d c:\Yourdir -v

wher yourdir is the directory where U are wishing to run servlets.

Otherwise U have to put your servlets in c:\jdsk\examples

because servletrunner will run servlerts in c:\jsdk\examples
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Author Comment

by:marun
ID: 2822597
when i installed java1.1 it worked but with jdk2 its not working what may be the problem.
    its not the port problem as  said by ravindra. ravindra security is all the same in the file u mentioned i checked it up but directory is too not the problem. please suggest another way to tackle the problem

thanks
0
 
LVL 7

Expert Comment

by:Ravindra76
ID: 2822752

try first

1.ping localhost

      If it succeeds ,

2. Type ipconfig

3. Then try

      ping ipaddress

      where ipaddress is the system ip address given in ipconfig

If both failed means something problem in Your system networking drivers.

Reinstall TCP/IP drivers
0
 
LVL 7

Expert Comment

by:Ravindra76
ID: 2822846

I will feel very happpy if U would have been rejected my answer than giving D grade.

Ok.

Bye
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
backtracking recursion  code 19 57
GUI builder for Eclipse? 8 35
couple of eclipse 5 35
JAVA API design with micro service cloud in mind 1 12
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question