Questions tagged [socketexception]

SocketException is the superclass of all other socket related exceptions and may be thrown during socket creation or setting options.

SocketException is the superclass of all other socket related exceptions and may be thrown during socket creation or setting options.

616 questions
362
votes
32 answers

No connection could be made because the target machine actively refused it?

Sometimes I get the following error while I was doing HttpWebRequest to a WebService. I copied my code below too. System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made…
hsnkvk
  • 3,629
  • 2
  • 16
  • 4
183
votes
15 answers

java.net.SocketException: Connection reset

I am getting the following error trying to read from a socket. I'm doing a readInt() on that InputStream, and I am getting this error. Perusing the documentation suggests that the client part of the connection closed the connection. In this…
Darryl
155
votes
14 answers

What's causing my java.net.SocketException: Connection reset?

We are seeing frequent but intermittent java.net.SocketException: Connection reset errors in our logs. We are unsure as to where the Connection reset error is actually coming from, and how to go about debugging. The issue appears to be unrelated to…
Richard Ev
  • 52,939
  • 59
  • 191
  • 278
146
votes
38 answers

How to solve SocketException: Failed host lookup: 'www.xyz.com' (OS Error: No address associated with hostname, errno = 7)

Whenever I try to do an http call after about 20 seconds I get in the console the following error: E/flutter ( 8274): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception: E/flutter ( 8274): SocketException: Failed host…
David
  • 1,503
  • 2
  • 6
  • 7
54
votes
5 answers

WSACancelBlockingCall exception

Ok, I have a strange exception thrown from my code that's been bothering me for ages. System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall at System.Net.Sockets.Socket.Accept() at…
Radu094
  • 28,068
  • 16
  • 63
  • 80
52
votes
2 answers

WCF: System.Net.SocketException - Only one usage of each socket address (protocol/network address/port) is normally permitted

I have a WCF service and a Web application. Web application makes calls to this WCF service in a continous manner a.k.a polling. In our production environment, I receive this error very rarely. Since, this is an internal activity users were not…
asyncwait
  • 4,457
  • 4
  • 40
  • 53
50
votes
2 answers

SocketException: Permission Denied?

My LogCat reads: 08-19 09:29:01.964: WARN/System.err(311): java.net.SocketException: Permission denied 08-19 09:29:02.204: WARN/System.err(311): at org.apache.harmony.luni.platform.OSNetworkSystem.createStreamSocketImpl(Native Method) 08-19…
Mxyk
  • 10,678
  • 16
  • 57
  • 76
49
votes
4 answers

Only one usage of each socket address (protocol/network address/port) is normally permitted?

I've been looking for a serious solution on google and I only get "Registry solutions" kind of stuff which I don't think even relate to my problem. For some reason I get this Error, while I'm only starting the TcpListner once, and when and if it…
WeinForce
  • 1,264
  • 2
  • 11
  • 17
44
votes
6 answers

Getting "SocketException : Connection reset by peer" in Android

My app needs to contact the same device it is working on, via http://127.0.0.1/... (a localhost url). For some reason, about 50% of the times (and maybe exactly 50%) when I reach a website there with JSON content, I get the…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
43
votes
11 answers

Could not get a resource from the pool(SocketTimeoutException:)

I'm running multiple worker threads(around 10) to access the data from the redis Q. For the i'm using infinte timeout for Jedis Client. Jedis jedis = pool.getResource(); jedis.getClient().setTimeoutInfinite(); Still i'm getting the error "Could…
Vignesh
  • 2,295
  • 7
  • 33
  • 41
38
votes
3 answers

java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind

Tomcat is running a webapp under Windows. After a few days (under very low load), the exception mentioned in the title starts to appear in the logs, no new connections can be established from that point on, the only fix is then to reboot the…
Michael Böckling
  • 7,341
  • 6
  • 55
  • 76
33
votes
2 answers

java.net.SocketTimeoutException in okhttp

Here it takes so much time to get data from json. When deleted and again installed it will get json within 1 min and when i again click button for json it takes so much time and still data is not getting in listview Here is my exception…
Abhi
  • 385
  • 1
  • 4
  • 13
24
votes
4 answers

ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error

I am getting the following error frequently while retrieving file object from database column. How can I resolve this problem? May 8, 2009 3:18:14 PM org.apache.catalina.core.StandardHostValve status WARNING: Exception Processing…
jothinst
21
votes
5 answers

How to solve "Connection reset by peer: socket write error"?

When I am reading the file content from server it returns the following error message: Caused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at…
Babu R
  • 1,025
  • 8
  • 20
  • 40
20
votes
3 answers

java.net.ConnectException - Connection Refused Android Emulator

I have an android emulator I'm running from eclipse and just trying to connect to a simple socket server I wrote in .NET (c#). The server is running on the same machine on port 4505. I am able to telnet (through PuTTy) to the server and it works…
Kyle
  • 10,839
  • 17
  • 53
  • 63
1
2 3
41 42