You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Vishal_Jain <pi...@gmail.com> on 2007/12/03 11:23:21 UTC

Running Wget results in IOException

Hi All,

I tried to run the Wget program as is (just hardcoded the url as
http://www.google.com)
and i ended up in:
Exception in thread "main" java.lang.Exception: java.io.IOException: An
existing connection was forcibly closed by the remote host
Caused by: java.io.IOException: An existing connection was forcibly closed
by the remote host
        at sun.nio.ch.SocketDispatcher.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
        at sun.nio.ch.IOUtil.read(IOUtil.java:206)

am i missing something ?

vishal
-- 
View this message in context: http://www.nabble.com/Running-Wget-results-in-IOException-tf4935596s16868.html#a14127258
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: Running Wget results in IOException

Posted by Vishal_Jain <pi...@gmail.com>.
Realized what was going wrong. I wasn't setting couple of headers explicitly
(such as Host, Accept etc. )
it works fine :)

thanks.


Vishal_Jain wrote:
> 
> Hi All,
> 
> I tried to run the Wget program as is (just hardcoded the url as
> http://www.google.com)
> and i ended up in:
> Exception in thread "main" java.lang.Exception: java.io.IOException: An
> existing connection was forcibly closed by the remote host
> Caused by: java.io.IOException: An existing connection was forcibly closed
> by the remote host
>         at sun.nio.ch.SocketDispatcher.read0(Native Method)
>         at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
>         at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
>         at sun.nio.ch.IOUtil.read(IOUtil.java:206)
> 
> am i missing something ?
> 
> vishal
> 

-- 
View this message in context: http://www.nabble.com/Running-Wget-results-in-IOException-tf4935596s16868.html#a14143528
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.