Socket Programming

Can somebody tell be why socket programming code does not work in windows 2000 which works perfectly in Windows XP?
[122 byte] By [Janaka-Srilankaa] at [2007-10-1 22:16:20]
# 1
A very vague question. Please post details, like what you mean by 'does not work' - does it throw exceptions? If yes - post them. Or behaviour is different from the expected, if then - how?It is good itf you post relevant code (please format it before posting).Mike
bellyrippera at 2007-7-13 8:29:58 > top of Java-index,Administration Tools,Sun Connection...
# 2

Hi,

Here the output I get with windows 2000:

Sending->BEGIN AUTH REQUEST

Sending->/SwedenRepository

Sending->janslk

Sending->AZy%:y,c

Sending->END AUTH REQUEST

Exception at readLine method

Connection reset

java.net.SocketException: Connection reset

at java.net.SocketInputStream.read(Unknown Source)

at java.net.SocketInputStream.read(Unknown Source)

at java.io.FilterInputStream.read(Unknown Source)

at com.ifs.rsp.cvs.base.CVSBase.readLine(CVSBase.java:1974)

at com.ice.cvsc.CVSClient.performLogin(CVSClient.java:941)

at com.ifs.rsp.cvs.base.RSPCVSMain.authentication(RSPCVSMain.java:120)

at com.ifs.rsp.cvs.CMD.RSPCVSCMD.performSync(RSPCVSCMD.java:109)

at com.ifs.rsp.cvs.CMD.RSPCVSCMD.main(RSPCVSCMD.java:245)

Received>null

Sending->BEGIN AUTH REQUEST

Sending->/DemoRepository

Sending->janslk

Sending->AZy%:y,c

Sending->END AUTH REQUEST

Exception at readLine method

Connection reset

java.net.SocketException: Connection reset

at java.net.SocketInputStream.read(Unknown Source)

at java.net.SocketInputStream.read(Unknown Source)

at java.io.FilterInputStream.read(Unknown Source)

at com.ifs.rsp.cvs.base.CVSBase.readLine(CVSBase.java:1974)

at com.ice.cvsc.CVSClient.performLogin(CVSClient.java:941)

at com.ifs.rsp.cvs.base.RSPCVSMain.authentication(RSPCVSMain.java:120)

at com.ifs.rsp.cvs.CMD.RSPCVSCMD.performSync(RSPCVSCMD.java:110)

at com.ifs.rsp.cvs.CMD.RSPCVSCMD.main(RSPCVSCMD.java:245)

Received>null

The normal output(under Windows XP) will be something like the following:

Sending->BEGIN AUTH REQUEST

Sending->/SwedenRepository

Sending->janslk

Sending->AZy%:y,c

Sending->END AUTH REQUEST

Received>I LOVE YOU

Sending->BEGIN AUTH REQUEST

Sending->/DemoRepository

Sending->janslk

Sending->AZy%:y,c

Sending->END AUTH REQUEST

Received>I LOVE YOU

Janaka

Janaka-Srilankaa at 2007-7-13 8:29:58 > top of Java-index,Administration Tools,Sun Connection...
# 3

Do your client and server work on the same machine in both cases? Please describe briefly where each one runs in both cases. This could be a firewall issue according to this thread: http://forum.java.sun.com/thread.jspa?threadID=632222&messageID=3654125

Do you have personal firewall running on some of the machines, like XP's personal firewall for example?

Mike

bellyrippera at 2007-7-13 8:29:58 > top of Java-index,Administration Tools,Sun Connection...
# 4

Hi,

I have used the same machine for both the server and the clinet. I have tried using "localhost" and the machine name when refering to the server but in both cases the program did not work under Windows 2000 but works under Windows XP.

I am using my office machine so obviously the LAN firewall is there but I do not have a personal firewall installed in the machine in both cases.

Bye.

Janaka-Srilankaa at 2007-7-13 8:29:58 > top of Java-index,Administration Tools,Sun Connection...
# 5

Hi all,

I had the chance of running my progarm on another machine with Windows 2000. There it runs ok. So the problem is not with the os but with my machine. Yet I am pretty sure that my machine does not have a firewall as in the case of the suggested thread.

Any ideas!

Janaka

Janaka-Srilankaa at 2007-7-13 8:29:58 > top of Java-index,Administration Tools,Sun Connection...