• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem using sockets on solaris  RSS feed

 
ram datta
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Programming language : --- java


On windows..
----------
i wrote a socket program which connects to the serversocket(say 1111).and sends a request to open a new serversocket(say2222)..and starts communicating to port 2222

This program worked fine on Windows, used JDK : 1.4.2_04

On Solaris 9
-------------
when i tested the same program..with JDK 1.4.2_04-b05
i am facing problem.. it is as follows
on solaris socket is able to connect to port 1111 and able to send arequest to open serversocket @ 2222. The serversocket opened port 2222
BUT the client socket is not able to connect...

RECEVING A MESSAGE CONNECTION REFUSED..

Your help is appreciated.

Thanks
ram
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Sockets forum...
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

I'm going to assume your numbers (1111, 2222) are just examples.

UNIX, unlike Windows, has the concept of "privileged ports". For a program to be able to listen on a port numbered below 1023 -- i.e., create a ServerSocket with such an argument -- the program must be running as root. Regular user processes must use ports numbered 1024 and above.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!