How to get connection to remote host

A

arunkumar.mit

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
 
D

Daniel Pitts

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.
 
A

arunkumar.mit

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

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

regards,
arun
 
A

arunkumar.mit

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

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

regards,
arun
 
A

arunkumar.mit

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
 
A

arunkumar.mit

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
 
J

JanTheKing

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
 
O

Oliver Wong

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
 
A

arunkumar.mit

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.
 
I

Ian Wilson

> 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.
 
M

Martin Gregorie

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top