1

I'm attempting to connect my Android device to my PC's localhost via a Android usb to PC tunneling app to develop and test a web service I'm working on. When the Android attempts connection to localhost, I get a message "org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1:26121 refused"

Here's how I've configured things:

Tunnel software: Android usb portforwarding installed on the PC and Android side.

The Android usb tunnel on the PC is listening to Android port 8080 and is set to direct traffic to the PC at 192.168.0.1:80 which is my PC's default gateway.

The web service is running at http://localhost:26121 and a valid address for it is http://localhost:26121/api/products/.

I've written a firewall rule to allow TCP connections to local port 26121.

So now when I try to address this address on Android using HttpClient, I get the "Connection to http://127.0.0.1:26121 refused" message.

Could anyone suggest changes to the configuration that will allow a successful connection?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
jchristof
  • 2,794
  • 7
  • 32
  • 47

0 Answers0