aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes connecting  internic.net  for who is protocol Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "connecting  internic.net  for who is protocol" Watch "connecting  internic.net  for who is protocol" New topic
Author

connecting internic.net for who is protocol

varsha koli
Greenhorn

Joined: Jul 23, 2013
Posts: 7

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
Marshal

Joined: Mar 22, 2005
Posts: 42922
    
  68
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

Joined: Jul 23, 2013
Posts: 7

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
Marshal

Joined: Mar 22, 2005
Posts: 42922
    
  68
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

Joined: Jul 30, 2013
Posts: 19
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
Marshal

Joined: Mar 22, 2005
Posts: 42922
    
  68
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

Joined: Jul 30, 2013
Posts: 19
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
Marshal

Joined: Mar 22, 2005
Posts: 42922
    
  68
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: connecting internic.net for who is protocol