windows xp server drops connections
Closed604079ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-09-03 17:28:11
This is a rehash of 597970 with better (hopefully!)
example scripts.
The server. This is run on a windows xp machine with
Tcl version 8.3.4
----
proc Accept {sock args} {
puts "$args"
close $sock
}
socket -server Accept 4545
vwait forever
----
The client. This is run on another machine, in my case
Linux 2.4.19, with Tcl 8.3.3. When run from the same
host the server is on, the number of bad connections is
very low.
----
set numcon 50
set goodsockets 0
set badsockets 0
set i 0
while { $i < $numcon } {
if { [catch {
set sk [socket dwelton 4545]
} err] } {
incr ::badsockets
puts "$::badsockets bad sockets: $err"
} else {
incr ::goodsockets
puts "$::goodsockets good sockets"
}
incr i
}
----
The results, on the client side:
----
@ashland [~/tmp] $ tclsh ./badsockets.tcl
1 good sockets
2 good sockets
3 good sockets
4 good sockets
5 good sockets
6 good sockets
7 good sockets
1 bad sockets: couldn't open socket: connection refused
2 bad sockets: couldn't open socket: connection refused
3 bad sockets: couldn't open socket: connection refused
4 bad sockets: couldn't open socket: connection refused
5 bad sockets: couldn't open socket: connection refused
6 bad sockets: couldn't open socket: connection refused
7 bad sockets: couldn't open socket: connection refused
8 bad sockets: couldn't open socket: connection refused
9 bad sockets: couldn't open socket: connection refused
8 good sockets
10 bad sockets: couldn't open socket: connection refused
11 bad sockets: couldn't open socket: connection refused
12 bad sockets: couldn't open socket: connection refused
13 bad sockets: couldn't open socket: connection refused
14 bad sockets: couldn't open socket: connection refused
9 good sockets
15 bad sockets: couldn't open socket: connection refused
16 bad sockets: couldn't open socket: connection refused
17 bad sockets: couldn't open socket: connection refused
18 bad sockets: couldn't open socket: connection refused
19 bad sockets: couldn't open socket: connection refused
10 good sockets
20 bad sockets: couldn't open socket: connection refused
21 bad sockets: couldn't open socket: connection refused
22 bad sockets: couldn't open socket: connection refused
23 bad sockets: couldn't open socket: connection refused
24 bad sockets: couldn't open socket: connection refused
11 good sockets
25 bad sockets: couldn't open socket: connection refused
26 bad sockets: couldn't open socket: connection refused
27 bad sockets: couldn't open socket: connection refused
28 bad sockets: couldn't open socket: connection refused
29 bad sockets: couldn't open socket: connection refused
30 bad sockets: couldn't open socket: connection refused
31 bad sockets: couldn't open socket: connection refused
32 bad sockets: couldn't open socket: connection refused
12 good sockets
33 bad sockets: couldn't open socket: connection refused
34 bad sockets: couldn't open socket: connection refused
35 bad sockets: couldn't open socket: connection refused
36 bad sockets: couldn't open socket: connection refused
13 good sockets
37 bad sockets: couldn't open socket: connection refused
----
Maybe it's not a Tcl problem - it could be something to
do with windows, but this is a very low of connections
for it to be accepting reliably.
davidw Ticket [604079ffff]: 1 change
[History diff]2002-09-04 04:41:22
davidwplain2002-10-02 03:42:59
Logged In: YES user_id=240 This is apparently a windows settings problem. Adding the registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters and setting it to 1 or 2 makes this problem go away. So it would seem that it is indeed a windows problem rather than a Tcl problem.
davygrvyplain2002-10-26 03:46:54
Logged In: YES user_id=7549 in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Tcpip\Parameters create a DWORD key called SynAttackProtect and set it to 1
Log in (anonymous is fine) to add a comment.