-2

I am trying to develop an Android app that requests to server but whenever i try to request the server it gives me the following error:

org.apache.http.conn.HttpHostConnectException: Connection to

http:// 10.10.10.129:80

refused

don't know how to fix it and I've tried a lot of things but it didn't worked.

Pragmateek
  • 13,174
  • 9
  • 74
  • 108
ShodowOverRide
  • 451
  • 2
  • 5
  • 15
  • http://stackoverflow.com/questions/14099347/org-apache-http-conn-httphostconnectexception-connection-to-http-localhost-re...,see here – rajshree Apr 01 '14 at 10:27

2 Answers2

0

did you give internet permission to your up in manifest file?

<uses-permission android:name="android.permission.INTERNET" />

and I think that address is local ip so you can use just 10.10.10.129 if you give more detail about your app I can help you.

thanks

CompEng
  • 7,161
  • 16
  • 68
  • 122
  • i ahve already mentioned that in my minifest file . and also it tried 10.10.10.129 but still not working. – ShodowOverRide Apr 01 '14 at 11:50
  • can you try it on your browser? – CompEng Apr 01 '14 at 11:51
  • the more details are that i have my APIs on a server that is directly linked with the database and from android i use to access it. it use to work but today don't know what happened its not working... – ShodowOverRide Apr 01 '14 at 11:52
  • I am sorry I cant understand, it is working for a long time but only today it is not working ? do i understand right? – CompEng Apr 01 '14 at 11:58
0

"Connection refused" means that there is nothing listening on the specified port.

So first check that you have the correct address and it's reachable from your device and there's a server running in port 80.

laalto
  • 150,114
  • 66
  • 286
  • 303