• 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

problem using sockets on solaris

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to Sockets forum...
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic