• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sockets under Windows XP OS

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

A simple Java socket programming is not working in windows XP home edition OS. I'm getting the following error. I'm running server in one DOS window and client in another DOS window. daytimeClient is my client program name.

java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at daytimeClient.main(daytimeClient.java:11)

But the same server and client programs are working fine in my work pc. Windows XP OS is not supporting Java socket programming or some other reason?
Pl clarify.

regards
Sreenivas
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have the XP Internet Connection Firewall running?
 
Sree Nivas
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes or No. I'm not sure about this. But I have internet connection. Pl tell me if Yes what to do or if no what's the solution?

regards
Sreenivas
 
Sree Nivas
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As described in archive, I enabled firewall and created manually port for my java socket program and tried. But still my client program is not running and giving same error message.

Also tried by disabling firewall, still same problem is occuring.

Could any tell me the what's wrong in running Java sockets in XP home edition OS. The same programs (Server & client) running in my work pc fine.

regards
Sreeni
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
During times like this, I like to just try to ping the client from the server and visa versa.

If you cannot do that, then at least we can eliminate JAVA as a possible suspect here.
 
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi -

1. I'm curious if you made any progress resolving this problem since your first post last Sep 23 (a little over a week ago).

2. "TCP/IP is TCP/IP", and "sockets are sockets". So no, in general, it should *not* be an issue whether or not the program is written in Java or not.

3. The specific error, "Connection refused", indicates that your (XP?) server process failed to connect to your (Java?) client - i.e. that the first place to look for the source of the problem is on the *server* side.

4. The key question is "What's different between the (XP?) client that works and the Java client that fails?

Do both clients execute on the same host? The same OS? Can you run *both* clients in a different window at the same time, and have only one fail?

5. Perhaps the best tool for answering question 4) is "Ethereal" (www.ethereal.org).

Good luck - and please let us know what happens!

Your .. PSM
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic