Questions tagged [tcp-keepalive]
50 questions
0
votes
1 answer
Setting keep alive on windows server 2016 throws WSAENOPROTOOPT (10042) error
I am trying to set keep alive times on a connected socket and getting following exception
System.Net.Sockets.SocketException (10042): An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call.
at…

NullReference
- 862
- 1
- 11
- 27
0
votes
0 answers
An existing connection was forcibly closed by the remote host. Error while copying content to a stream
.NET HttpClient parallels API call and throw exception randomly:
An existing connection was forcibly closed by the remote host. Error while copying content to a stream.
Remote service: Springboot.
Client environment: .NET Framework 4.8, Console…

Raymond Peng
- 1
- 2
0
votes
0 answers
python requests.get hangs until timeout for a long http request
I encounter a repeating case where an http request hangs indefinitely (or until timeout) when the request is "long enough". Didn't get to test what's the threshold, but my requests are taking about 18 minutes.
I verified server responds and finishes…

Mugen
- 8,301
- 10
- 62
- 140
0
votes
1 answer
Enable TCP keepalive on port open by another program
On a Debian machine I'm using an OPCUA server https://github.com/FreeOpcUa/opcua-asyncio. The server does not give the possibility to enable TCP keepalive on the port opened by the server.
Basically, I want to know if it's possible to start the…
user3827165
0
votes
1 answer
Does TCP kills dead idle connection after keepalive packet is sent
My understandings for TCP keepalive:
This keepalive does not really "keeping connection alive". Instead, "detectAlive" may be a more proper word: Tcp levels exchange heartbeat packet to detect whether an idle conneciton dead or alive.
Here are my…

aaron.chu
- 165
- 1
- 6
0
votes
2 answers
Getting Invalid argument as a failure reason while enabling TCP keep alive option?
I have tried to implement TCP client to send TCP keep alive request but all the option were failed with invalid argument. My code looks like as below:
#define SERVER_ADDRESS "94.23.3.169" /* Server address */
#define PORT 1010/* the port…

Abhishek Lakhara
- 1
- 1
0
votes
1 answer
TCP socket state become persist after changing IP address even configured keep-alive early
I met a problem about TCP socket keepalive.
TCP keep-alive is enabled and configured after the socket connection, and system has its own TCP keep-alive configuration.
'ss -to' can show the keep-alive information of the connection.
The network…

ryanking
- 309
- 2
- 6
0
votes
0 answers
Keep-alive socket option & "Connection: Keep-Alive" header
How do the options of my socket (socket, which I've got after accept() ) related to HTTP header "Connection: Keep-Alive"?
I know, that if I want to keep my socket alive, I need to set the following options: SO_KEEPALIVE, TCP_KEEPIDLE, TCP_KEEPINTVL,…
0
votes
2 answers
robust continuous TCP connection (python socket)
My goal is to establish a continuous and robust TCP connection between one server and exactly one client. If one side fails, the other one should wait until it recovers.
I wrote the following code based on this question (that only asks for…

black
- 1,151
- 3
- 18
- 46
0
votes
1 answer
Postgres c# listen timeout
I'm using Postgres 9.5 which has a feature called LISTEN/NOTIFY that allows you to set up an asynchronous command channel to get notifications from the server. For the first 10-15 minutes when my application runs and I test the notifications…

Lawrence Kok
- 1,568
- 11
- 29
0
votes
0 answers
socket keep alive not working on Linux as expected
I am using this code to setup a socket to detect a network error:
int socket_keepalive(int s, int ktime, int kinterval, int kprobes) {
int enable = 1;
if(setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, &enable, sizeof(int)) < 0) {
…

Rahul
- 390
- 4
- 14
0
votes
2 answers
How to set TCP keep alive interval for a specific socket fd (Not system wide) in VxWorks?
I created a TCP socket in an application with KEEPALIVE enabled for this socket. I can see that keepalive packets are coming with the frequency of keepalive interval which i have already set in my system variable of iptcp, i.e 30secs.
Socket…

Webster
- 79
- 8
0
votes
1 answer
Why SpringBoot RabbitMQ client auto shutdown connection to rabbitmq server
**
geting rabbitmq connection error as follows.
**
2019-07-11 13:14:51.147.AMQP Connection 127.0.0.1:5672> ERROR - TID[] UID[] MID[] CID[] - Channel shutdown: connection error; protocol method: #method(reply-code=541, reply-text=INTERNAL_ERROR,…

Nishan Norun Nobi
- 71
- 5
0
votes
1 answer
Keep-alive: dead peers detection
I run client and socket server written in Go (1.12) on macOS localhost.
Server sets SetKeepAlive and SetKeepAlivePeriod on net.TCPConn.
Client sends a packet and then closes connection (FIN) or client abruptly terminated.
Tcpdump shows that…

surlac
- 2,961
- 2
- 22
- 31
0
votes
0 answers
How to deploy MASTER/BACKUP machines using Puppet?
I have 2 VMs.
I'm using keepalived to have them as MASTER/BACKUP with the same VIP. (http://www.keepalived.org)
I want to deploy the machines one by one using Puppet.
I want to deploy the the BACKUP first and when it finishes, deploy the…

bilgo
- 137
- 1
- 9