File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connecting internic.net for who is protocol

 
varsha koli
Greenhorn
Posts: 7
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to connect to internic.net for 'who is' protocol but i'm getting "connection refused" exception

I am connected to internet though I can not access internic.net through my program.







please help
thanks!!
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That port seems closed. Do you have reason to assume that it should be open?

If you're trying to do a Whois lookup in Java, you're in luck - there is code for that available right here on the Ranch: https://www.coderanch.com/how-to/java/WhoisLookup
 
varsha koli
Greenhorn
Posts: 7
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf.

Thanks for reply. ok I got it. Port may be closed. And for reasons the port should have been closed or open I don't know of any methods to check status of the port.

And i wasn't aware that javaranch contains tutorials also..thank you so much for direct link to article. Helped a lot to me as a beginner to this "Internet protocol and java.net".
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The usual way to check whether a particular port is open on a particular host is something like this. A 2 second timeout should be sufficient.

But the more pertinent question is: should that port be open? Have you read somewhere that that server runs a public Whois service?

You should definitely browse through the CodeBarn, it contains a lot of useful code.
 
Kamal Chopra
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:The usual way to check whether a particular port is open on a particular host is something like this. A 2 second timeout should be sufficient.

But the more pertinent question is: should that port be open? Have you read somewhere that that server runs a public Whois service?

You should definitely browse through the CodeBarn, it contains a lot of useful code.


it is not working for anyother site other than you mentioned and is returning HTTP/1.0 302 Found
Location: http://www.internic.net/osborne.com
Server: BigIP
Connection: close
Content-Length:
for every site ..i menz that except the site name is variably appended nothing new like server etc changes.....y so???
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand what you're asking; can you rephrase it while also giving more detail? You're quoting my post about checking whether a port is open, but what you wrote seems about Whois...? But Whois has nothing to do with HTTP, so I'm confused.
 
Kamal Chopra
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So simple...i wanna know that what if i change the string to somrthing esle ...what will be the output after the socket is established???
well it be the same as in the beginning posts on this page ???
hoping you will get it now
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I don't. What is "the string"?

But let's take a step back - this topic was about making a Whois query, and about checking whether a port is open. Which of these two are you asking about? If it's about neither, then you should start new topic. If it actually is about one of these, then tell us which one, and what specifically you are trying to do.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic