Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using my Android device to talk to my WAMP server .

I am sending bits viahttp connection to a script on /www/ directory.

But in logcat, I am getting the following error :

~error in http connection org.apache.http.conn.HttpHostConnectException :Connection to xx.xx.xx.xx:8080  was refused ! ~

xx.xx.xx.xx is my IP address !

Help needed asap .


share|improve this question

migrated from Apr 26 '11 at 1:57

This question came from our site for professional and enthusiast programmers.

What does your Apache log say about the connection attempt? What about the Windows Event logs? Can any other devices/web browsers "talk" to it? – GAThrawn Apr 26 '11 at 12:59

Please check the following:

  1. You can access to your server and port with your browser
  2. Your emulator has 3G or WiFi enabled
  3. Your emulator's browser can access to the server and port
share|improve this answer
I am using a real Droid and it is connected to the Internet ! please ! – Heather Apr 26 '11 at 1:39
Can you access to the server and port in your Droid's browser? It could be your carrier's policy. – Vicente Plata Apr 26 '11 at 1:39
when people see 1 answer, they don't view the question !! Little do they realize that the answer was irrelevant to the question asked: One of the limitations of this site ! – Heather Apr 26 '11 at 1:40
For heaven's sake ! There's no carrier policy ! and yes everything is perfect from the hardware point of view.. please refrain from answering please ! your answers are irrelevant . – Heather Apr 26 '11 at 1:41
@Heather: The error message seems straightforward, and probably means exactly what it says: the server is refusing the connection. I think this is one of those times where you're going to have to do some troubleshooting and figure out what the problem is. I would eliminate the obvious things first. – Robert Harvey Apr 26 '11 at 1:46

Either your server is refusing connection or one of the routers between your phone and the server (e.g. your carrier's router) is refusing connection.

Try connecting to the server from another device (preferrably from a Wifi connection), if your connection is refused from that other device as well, then it is almost definitely a server configuration issue and this question should be asked on SuperUser or ServerFault.

Your question is way too vague to be answerable, you will need to answer these questions (hint: you can edit your question, then put a comment to notify your answerers):

  1. There is no such thing as a device "talking" to another device. What do you mean by "talking" to the server? Is your server serving static HTML pages, CGI scripts, or is it some kind of media streaming server?

  2. Is the IP address the server's local IP address (e.g. looks like or, or is it the server's public IP address?

  3. Can you access this server from other devices? What have you tried?

  4. How are you connecting to the serve from the Android? Is it over Wifi or over 3G?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.