How to get connection to remote host

Discussion in 'Java' started by arunkumar.mit@gmail.com, Nov 8, 2006.

  1. Guest

    Hi all,

    I am beginner in httpunit i am trying to get resonse from a remote
    host, but i am not able to get it

    the error is

    connnection Exception: connection refused; connect

    how can i resolve it

    thanks and regards,
    Arun
    , Nov 8, 2006
    #1
    1. Advertising

  2. Oliver Wong Guest

    <> wrote in message
    news:...
    > Hi all,
    >
    > I am beginner in httpunit i am trying to get resonse from a remote
    > host, but i am not able to get it
    >
    > the error is
    >
    > connnection Exception: connection refused; connect
    >
    > how can i resolve it
    >
    > thanks and regards,
    > Arun


    Are you able to ping the remote host?

    http://www.mysitespace.com/howtoping.asp

    - Oliver
    Oliver Wong, Nov 8, 2006
    #2
    1. Advertising

  3. Daniel Pitts Guest

    wrote:
    > Hi all,
    >
    > I am beginner in httpunit i am trying to get resonse from a remote
    > host, but i am not able to get it
    >
    > the error is
    >
    > connnection Exception: connection refused; connect
    >
    > how can i resolve it
    >
    > thanks and regards,
    > Arun


    Make sure a few things:
    1. The remote host is listening on the port you are trying to connect
    to (often 80, or 8080)
    2. The host you are connecting to is reachable from the host you are
    on. (using ping, for instance)
    3. You are specifying the correct host name and port.

    Hope this helps. Good luck.
    Daniel Pitts, Nov 8, 2006
    #3
  4. ChrisWSU Guest

    are you behind a NAT device? (linksys/netgear/dlink type router?)
    ChrisWSU, Nov 8, 2006
    #4
  5. Guest

    No i am not able to ping to remote host, how can i do it. I am able to
    get response on a browser from the url but when i try it using httpunit
    webconversation and webrequest i am get the error

    > > connnection Exception: connection refused; connect


    Is there any thing i need to change in the configuration.

    regards,
    arun


    Oliver Wong wrote:
    > <> wrote in message
    > news:...
    > > Hi all,
    > >
    > > I am beginner in httpunit i am trying to get resonse from a remote
    > > host, but i am not able to get it
    > >
    > > the error is
    > >
    > > connnection Exception: connection refused; connect
    > >
    > > how can i resolve it
    > >
    > > thanks and regards,
    > > Arun

    >
    > Are you able to ping the remote host?
    >
    > http://www.mysitespace.com/howtoping.asp
    >
    > - Oliver
    , Nov 9, 2006
    #5
  6. Guest

    No i am not able to ping to remote host, how can i do it. I am able to
    get response on a browser from the url but when i try it using httpunit
    webconversation and webrequest i am get the error

    > > connnection Exception: connection refused; connect


    Is there any thing i need to change in the configuration.

    regards,
    arun


    Oliver Wong wrote:
    > <> wrote in message
    > news:...
    > > Hi all,
    > >
    > > I am beginner in httpunit i am trying to get resonse from a remote
    > > host, but i am not able to get it
    > >
    > > the error is
    > >
    > > connnection Exception: connection refused; connect
    > >
    > > how can i resolve it
    > >
    > > thanks and regards,
    > > Arun

    >
    > Are you able to ping the remote host?
    >
    > http://www.mysitespace.com/howtoping.asp
    >
    > - Oliver
    , Nov 9, 2006
    #6
  7. Guest

    How to make sure the remote host is listening to the port i am
    connecting, iam just giving the url from which i want the response.

    Its really help full to trace the bug.

    Thanks
    Arun

    Daniel Pitts wrote:
    > wrote:
    > > Hi all,
    > >
    > > I am beginner in httpunit i am trying to get resonse from a remote
    > > host, but i am not able to get it
    > >
    > > the error is
    > >
    > > connnection Exception: connection refused; connect
    > >
    > > how can i resolve it
    > >
    > > thanks and regards,
    > > Arun

    >
    > Make sure a few things:
    > 1. The remote host is listening on the port you are trying to connect
    > to (often 80, or 8080)
    > 2. The host you are connecting to is reachable from the host you are
    > on. (using ping, for instance)
    > 3. You are specifying the correct host name and port.
    >
    > Hope this helps. Good luck.
    , Nov 9, 2006
    #7
  8. Guest

    Yes i am behind Network Adapter Translation, is it possible to get the
    response when we are behing NAT device. If possible let me know it.

    Thanks

    ChrisWSU wrote:
    > are you behind a NAT device? (linksys/netgear/dlink type router?)
    , Nov 9, 2006
    #8
  9. JanTheKing Guest

    To check if a server is listening at a particular port or not - you
    have to follow the following steps in the command prompt:

    telnet <server-name> <port>

    Note: the port for http protocol defaults to 80 and that for https
    protocol defaults to 443.

    Cheers,
    Jan

    wrote:
    > How to make sure the remote host is listening to the port i am
    > connecting, iam just giving the url from which i want the response.
    >
    > Its really help full to trace the bug.
    >
    > Thanks
    > Arun
    >
    > Daniel Pitts wrote:
    > > wrote:
    > > > Hi all,
    > > >
    > > > I am beginner in httpunit i am trying to get resonse from a remote
    > > > host, but i am not able to get it
    > > >
    > > > the error is
    > > >
    > > > connnection Exception: connection refused; connect
    > > >
    > > > how can i resolve it
    > > >
    > > > thanks and regards,
    > > > Arun

    > >
    > > Make sure a few things:
    > > 1. The remote host is listening on the port you are trying to connect
    > > to (often 80, or 8080)
    > > 2. The host you are connecting to is reachable from the host you are
    > > on. (using ping, for instance)
    > > 3. You are specifying the correct host name and port.
    > >
    > > Hope this helps. Good luck.
    JanTheKing, Nov 9, 2006
    #9
  10. Oliver Wong Guest

    <> wrote in message
    news:...
    > No i am not able to ping to remote host, how can i do it. I am able to
    > get response on a browser from the url but when i try it using httpunit
    > webconversation and webrequest i am get the error


    You should probably forget about pinging. The telnet advice than Jan
    gave you is better. Pinging might give you a false negative if the server is
    configured to ignore pings.

    - Oliver
    Oliver Wong, Nov 9, 2006
    #10
  11. Guest

    Hi,

    When i trying use it by means of telnet the connection is refused,
    so is that i might be behind proxy. Or wht could go worng in this. In
    httpunit they just given the the url directly as "www.meterware.com" to
    get the response when i try to do it, The error pops. Is there anything
    they were missing in explaining this, is so let me know it

    cheers,
    Arun.

    On Nov 9, 4:37 pm, "Oliver Wong" <> wrote:
    > <> wrote in messagenews:...
    >
    > > No i am not able to ping to remote host, how can i do it. I am able to
    > > get response on a browser from the url but when i try it using httpunit
    > > webconversation and webrequest i am get the error You should probably forget about pinging. The telnet advice than Jan

    > gave you is better. Pinging might give you a false negative if the server is
    > configured to ignore pings.
    >
    > - Oliver
    , Nov 10, 2006
    #11
  12. Ian Wilson Guest

    wrote:
    >
    > Daniel Pitts wrote:
    >
    >> wrote:
    >>>
    >>> I am beginner in httpunit i am trying to get resonse from a
    >>> remote host, but i am not able to get it
    >>>
    >>> the error is
    >>> connnection Exception: connection refused; connect
    >>>
    >>> how can i resolve it

    >>
    >> Make sure a few things: 1. The remote host is listening on the port
    >> you are trying to connect to (often 80, or 8080) 2. The host you
    >> are connecting to is reachable from the host you are on. (using
    >> ping, for instance) 3. You are specifying the correct host name and
    >> port.
    >>

    >
    > How to make sure the remote host is listening to the port i am
    > connecting, iam just giving the url from which i want the response.
    >


    You say you can reach this remote host using a web-browser? Does the
    web-browser have a local http-proxy configured?

    In Internet Explorer, select the "Tools" menu, "Internet Options",
    "Connections", "LAN Settings" and see if the "Proxy" is ticked.
    Ian Wilson, Nov 10, 2006
    #12
  13. wrote:
    > Hi,
    >
    > When i trying use it by means of telnet the connection is refused,
    > so is that i might be behind proxy. Or wht could go worng in this. In
    > httpunit they just given the the url directly as "www.meterware.com" to
    > get the response when i try to do it, The error pops. Is there anything
    > they were missing in explaining this, is so let me know it
    >

    Well, from where I'm sitting

    - ping works
    - I can telnet to port 80
    - my browser can fetch the main page

    You'd better check that you aren't using a proxy and/or being blocked by
    a firewall on your site.

    --
    martin@ | Martin Gregorie
    gregorie. | Essex, UK
    org |
    Martin Gregorie, Nov 10, 2006
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brad
    Replies:
    9
    Views:
    34,975
    nealpat
    Mar 28, 2007
  2. kurt sune
    Replies:
    0
    Views:
    5,645
    kurt sune
    Nov 15, 2006
  3. iKiLL
    Replies:
    0
    Views:
    484
    iKiLL
    Dec 20, 2006
  4. Anbu
    Replies:
    4
    Views:
    556
    Juan T. Llibre
    Mar 13, 2007
  5. Artur
    Replies:
    1
    Views:
    524
Loading...

Share This Page