java.net.ConnectException: failed to connect to localhost/127.0.0.1 (port 80) after 30000ms: isConnected failed: ECONNREFUSED (Connection refused)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by Varsha
, 1 year ago
failed to connect to localhost/127.0.0.1 (port 80) after 30000ms: isConnected failed: ECONNREFUSED (Connection refused)
via GitHub by wischweh
, 1 year ago
failed to connect to www.google-analytics.com/127.0.0.1 (port 80) after 30000ms: isConnected failed: ECONNREFUSED (Connection refused)
via Stack Overflow by Nikhil Kulkarni
, 9 months ago
failed to connect to localhost/127.0.0.1 (port 8080) after 10000ms: isConnected failed: ECONNREFUSED (Connection refused)
via Stack Overflow by Nikhil Kulkarni
, 9 months ago
failed to connect to localhost/127.0.0.1 (port 8080) after 10000ms: isConnected failed: ECONNREFUSED (Connection refused)
via Stack Overflow by xdamir79
, 1 month ago
failed to connect to www.ya.ru/87.250.250.242 (port 80) after 15000ms: isConnected failed: ECONNREFUSED (Connection refused)
via Stack Overflow by Katedral Pillon
, 2 years ago
failed to connect to localhost/127.0.0.1 (port 8080) after 20000ms: isConnected failed: ECONNREFUSED (Connection refused)
java.net.ConnectException: failed to connect to localhost/127.0.0.1 (port 80) after 30000ms: isConnected failed: ECONNREFUSED (Connection refused)
at libcore.io.IoBridge.isConnected(IoBridge.java:226)
at libcore.io.IoBridge.connectErrno(IoBridge.java:174)
at libcore.io.IoBridge.connect(IoBridge.java:122)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
at java.net.Socket.connect(Socket.java:882)
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:139)
at com.android.okhttp.Connection.connect(Connection.java:152)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:279)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:213)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
at com.example.playtym.playtym.Mobile_num$signin_process.get_response(Mobile_num.java:154)
at com.example.playtym.playtym.Mobile_num$signin_process.doInBackground(Mobile_num.java:109)
at com.example.playtym.playtym.Mobile_num$signin_process.doInBackground(Mobile_num.java:100)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

Users with the same issue

14 times, 1 year ago
4 times, 1 year ago
Once, 1 year ago
2 times, 1 year ago
8 times, 4 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.