Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Request on LAN error, V1.4.9 #1059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
GypsyLife opened this issue Dec 25, 2015 · 4 comments
Closed

Request on LAN error, V1.4.9 #1059

GypsyLife opened this issue Dec 25, 2015 · 4 comments

Comments

@GypsyLife
Copy link

Hey,
While I make a post request to LAN address(like 192.168.1.185),it post to localhost.
This happens on Nexus 4/5/6.I find out the problem in httpclient lib.
Class SchemeSocketFactoryAdaptor, line 65,here u should
invoke connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)
instead of the deprecated method.
if u confirm or solve this issue, please comment here.
Thanks for this great lib!

@GypsyLife
Copy link
Author

I should make it more clearly,on my device (Nexus 5, Android 6.0),InetSocketAddress.getHostName()
returns wrong result "localhost" for address like 192.168.1.185. That's a bug in Android SDK, Hope this helpfull.

@flyworkspace
Copy link

I get the same error .I request 10.154.30.52:8081, java.net.ConnectException: failed to connect to localhost/127.0.0.1 (port 8081) after 10000ms: isConnected failed: ECONNREFUSED (Connection refused).

@sendtion
Copy link

I get the same error.
java.net.ConnectException: failed to connect to localhost/127.0.0.1 (port 8080) after 3000ms: isConnected failed: ECONNREFUSED (Connection refused).
how to solve it?

@smarek
Copy link
Member

smarek commented May 22, 2019

Questions related to requests to local/ip addresses, that fail, will be tracked under #998

@smarek smarek closed this as completed May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants