Stange TCP timeout
Hi there,
I am noticing some strange behaviour with the TCP Open Connection VI. For some reason it is totally ignoring any timeout value (including the default unwired state of 60000 ms) and giving an error after approx 1 second (Error 63: network connection refused).
I dont actually have a listener waiting, but surely it should only give the error message after the timeout period is over? My question is not how to get it working, but rather why does this error occur after 1 s?
Any one experience similar behaviour, or am I misinterpreting the LabVIEW help?
ps: am using LabVIEW 7.0 for Win32
nrp
CLA
nrp wrote:
> Hi there,
>
> I am noticing some strange behaviour with the TCP Open Connection VI.
> For some reason it is totally ignoring any timeout value (including
> the default unwired state of 60000 ms) and giving an error after
> approx 1 second (Error 63: network connection refused).
>
> I dont actually have a listener waiting, but surely it should only
> give the error message after the timeout period is over? My question
> is not how to get it working, but rather why does this error occur
> after 1 s?
TCP/IP is a 3-way handshake protocol eventhough you do not see that on
the application level. You are most probably trying this out on a local
machine or a local network only. What happens in the TCP/IP socket
driver on the other side when you try
to connect is that it checks its
internal tables and then when no listener has been registered it sends
back a negative acknowledgment informing the requesting socket that no
connection could be established. This certainly is very fast and happens
in less than a second unless you are connected over a very slow dialup
line and trying to reach a similar slow remote site on the other side of
the world or have some serious network overload problems.
Once the socket receives the connection rejection message LabVIEW
correctly decides to not wait any longer and returns the error you see.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions
Similar Messages
-
WRT600N Change the TCP timeouts in the stock linksys firmware
I need to know if there is a way to change the TCP timeouts for the WRT600N in their stock firmware. The only way to change the settings are in a 3rd party Firmware.
It's not possible to change the TCP timeouts for the WRT600N in their stock firmware.
-
Hello,
Could someone please explain why on average the TCP timeout is generally set longer that the UDP timeout. Just looking at one of my home routers i have at home via telnet and the tcp idle stat is set to 15 minutes where as the udp timeout is 1 minute.
Is there any specific reason for this?
Thanks
ChrisHello,
If go into the Device Manager (filename: DEVMGMT.MSC), select View→Show Hidden Devices and examine the Non-Plug and Play Drivers tree, are there any old device drivers left over from previously installed security or connectivity software? If so, perhaps one of those is the culprit and disabling or uninstalling it will solve the problem.
Another possibility is that the automatic network tuning enhancements (a feature first introduced in Windows Vista) in Windows 7's network stack are changing the TCP window size until it reaches a value which is incompatible with your router. That is fairly simple to test, though: Open an elevated Command Prompt (filename: CMD.EXE) and issue a "netsh int tcp set global autotuninglevel=disabled" command and see if that makes any difference. If that makes no difference, repeat the Netsh command with "autotuning=enabled" to restore the previous values and we can continue troubleshooting.
Regards,
Aryeh Goretsky
I am a volunteer and neither a Lenovo nor a Microsoft employee. • Dexter is a good dog • Dexter je dobrý pes
S230u (3347-4HU) • X220 (4286-CTO) • W510 (4318-CTO) • W530 (2441-4R3) • X100e (3508-CTO) • X120e (0596-CTO) • T61p (6459-CTO) • T43p (2678-H7U) • T42 (2378-R4U) • T23 (2648-LU7)
Deutsche Community Comunidad en Español Русскоязычное Сообщество -
TCP Timeouts in Native Windows 7 64-bit (wired and wireless)
I am having some major headaches with this new laptop in regards to network stability. I have a W510 4318CTO with the Ultimate-N 6300 AGN adapter. Here is what I'm seeing:
Prior to installing Virtual PC/XP Mode, whenever I am browsing the web or accessing samba shares, I occasionally get spurts of timeouts. Sometimes the timeouts are inescapable, but oddly enough the issue surfaces less after a hibernation than after a reboot or shutdown/start. Google Docs is one thing that is especially unstable. Either the icons don't load or the style sheet doesn't load or I can't click on anything or I can't save a document or open a document. This happens across all browsers when run in regular old Windows 7. I tried adjusting affinity and resetting tcp and reinstalling the network drivers and scanning for malware and yada yada yada.
I have made queries on Microsoft Connect and TechSupportForum and nothing I've tried is helping. This problem doesn't happen on my XP desktop at all, and very strangely, this doesn't happen in XP Mode on the same laptop at the same time as the issue surfaces in native win7. If I ping the gateway, I get timeouts at the same time as the issue manifests and I get longer response times when making network requests. I have been hammering this issue for the entire month and can't get past it. I've tried uninstalling Lenovo's Access Connection tool and that didn't help either. I tried this over the 82577LM gigabit wired adapter as well and have the same issues but they occur less than in wireless mode (which I would expect).
I am quite an expert on Windows, but this issue has brought me to my wits end. I am an inch away from blowing the preinstall away and starting from scratch, but I just don't want to invest so much time in reinstalling everything. I've had enough trouble with working around power management issues on this new laptop and I just want this fixed.
If you can solve this, I would be forever grateful. I feel like I'm in the empty hell of a network admin's nightmare.
- SteveHello,
If go into the Device Manager (filename: DEVMGMT.MSC), select View→Show Hidden Devices and examine the Non-Plug and Play Drivers tree, are there any old device drivers left over from previously installed security or connectivity software? If so, perhaps one of those is the culprit and disabling or uninstalling it will solve the problem.
Another possibility is that the automatic network tuning enhancements (a feature first introduced in Windows Vista) in Windows 7's network stack are changing the TCP window size until it reaches a value which is incompatible with your router. That is fairly simple to test, though: Open an elevated Command Prompt (filename: CMD.EXE) and issue a "netsh int tcp set global autotuninglevel=disabled" command and see if that makes any difference. If that makes no difference, repeat the Netsh command with "autotuning=enabled" to restore the previous values and we can continue troubleshooting.
Regards,
Aryeh Goretsky
I am a volunteer and neither a Lenovo nor a Microsoft employee. • Dexter is a good dog • Dexter je dobrý pes
S230u (3347-4HU) • X220 (4286-CTO) • W510 (4318-CTO) • W530 (2441-4R3) • X100e (3508-CTO) • X120e (0596-CTO) • T61p (6459-CTO) • T43p (2678-H7U) • T42 (2378-R4U) • T23 (2648-LU7)
Deutsche Community Comunidad en Español Русскоязычное Сообщество -
How can I fix consistent TCP timeout and make data flow simpler?
Hi!
I'm acquiring data from a Scanivalve Digital Scanning Array through a TCP/IP connection. I'm having problems with the connection timing out regularly. It will run fine if you take data several times in a row, but if the VI sits for several minutes (while looking at previous data runs or adjusting test setup) the connection will timeout the next time you try to take data. The subVIs (reading the tcp connection, processing the data pakcet, etc) were provided by the manufacturer several years ago. The midlevel VI were written by another engineer, and I adapted them to run with the top level VI that I needed for this test. The data flow in the VIs are convoluted and while I can follow the ones t
hat I wrote, I'm not sure how to troubleshoot the others.
I posted a question on an unrelated problem and the responses mentioned that race conditions were going to be a problem b/c of all of the global variables.
Please be patient with my lack of knowledge in some areas. Any help would be appreciated.
Thanks so much!
-Sarah
Engineering intern
Techsburg, Inc.
Attachments:
DSA_Acquistion_VIs.zip 253 KBI'm not positive about the best solution in this situation, but there is lots of information available regarding error 56 when using TCP/IP communication.
You might find some of these useful:
Error 56 Occurred at TCP Open: Windows XP Fails as TCP/IP Server with LabVIEW 6.1.
Error 56 Occurs When Using TCP Listen.vi
TCP/IP Error Codes and Related Time-out Issues in LabVIEW -
A TCP reference that I have created (using TCP Open Connection) becomes non-functional after 300 seconds of inactivity. The timeout input to the TCP Open Connection subVI is unrelated to this 300 seconds.
Is there someplace where the 300 seconds can be adjusted? I have been unable to find where it is.
Thanks for your help,
ChrisI can't say I've heard of this, but it would probably be part of the OS, since that's responsible for handling the TCP communication. In Windows, you might have a registry setting for this.
I prefer writing a sort of automatic "ping" into my code (where applicable) so that if nothing was done for N seconds, a message is sent just to make sure that the connection is still there. Then, I have a running counter for timeout errors which is reset whenever any message is received. If the counter reaches a certain limit, it means that no message was received for X time and we would want to do something about it. The main reason is that any number of things can cause the connection to break (like someone accidentally pulling out a cable) and you would like to know about as soon as possible.
Try to take over the world! -
Hi, My PIX firewall has identfied that connection between a gateway and a VIP which is kept alive by 45 sec keepalives gets a connection timeout message after 8-9 hrs. This is because it suddenly see's the keepalives being sent from the real IP address (same port numbers) of an application server behind the CSS, not the VIP address. So my question is does the CSS have a address translation table which suddenly times out?
Many thanks
NickyNicky,
the command I mentioned was introduced with version 6.10.
The flow permanent command is as you said to prevent a flow to be marked idle.
If the CSS sees the flow is terminated by either the client or the server, the CSS will still remove the flow.
So the problem is only if the connection gets established but the client or server never sends a FIN or RST.
So, this should not be a problem to use this command. You can monitor the status of the resources to make sure there is no *leak*. The command is 'flow stats' from llama mode.
Regards,
Gilles. -
Setting TCP Read timeout value?
How do I choose a timeout value for a TCP read function?
I'm receiving data from a server at a rate which varies between 40 and 140 Hz (normally 120 Hz), there is no handshaking and at any set transmission rate it appears that the network load causes the rate to fluctuate slightly.
All I have been able to do so far is plot a frame number that is received in my data and fiddle with the buffer mode and timeout until I get the least dropouts. At 120Hz 5ms works best with a standard buffer, surprisingly 8ms is poorer.
I am using a producer consumer loop with a queue and some interpolation to make up for the loss of data.
This is very hit and miss so I'm sure there's a proper / better way to do this!If you are using standard mode, then the read function should return any partial data, but will report an error out.
You may want to look at the functions that you call after the TCP read. I think that the enqueue function will NOT enqueue data if there is an error in.
There is a function you can use to clear TCP timeout errors. You could use this to allow you to enqueue partial data to your consumer loop.
vi.lib\addons\internet\utils\tcputil.llb\No Time Out Error.vi
Note that it will be up to your consumer code to identify your 'frames' for proper decoding.
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness -
Hello,
our customer has a problem with correct closing TCP connections on the ACE. TCP session (HTTP protocol) is closed _correctly_ (we can see it in the sniffer output), but 'sh conn' on the ACE shows it as 'established' (session is already closed). TCP timeout is set to default (60min).
Any new connection from the same src port (because many connection to the service) is closed after TCP session is established.
When I try generate 200 concurrent sessions TCP sessions in my lab, this are on the ACE closed correctly. Customer's traffic is around 20-30.000 concurrent session, but I can't generate so much traffic.
SW version on the ACE: 3.0(0)A1(3b)
thx
martinThanks Gilles!
The problem occurs only with traffic from WAP nodes (too many short HTTP requests).
We try it upgrade to A1(5b), but I'm not sure, if this is our problem...
Bug description:
Symptom:
With L7 LB configuration, Some times connections do not close.
Conditions:
SYN sent to Real server may result in ACK coming from server. ACE TCP module was not handling this ACK correctly.
...but our traffic is only L4 LB and we have a problem with connection state on the ACE from both sides (client and server). on the client and server side is connection closed properly, but on the ACE module ('sh conn') we can see it in 'established' state. It's closed after TCP timeout and that is not correct.
martin -
Tcp Connection timeout on ASA for vpn traffic
Hello All
I need an answer please.
I wanted to give tcp conenction timeout as unlimited for some IPs coming through VPN.
So, I created an access-list defining the traffic for which I want this tcp timeout.
Then a class map, policy map, entered set timeout to '0'
Applied it under default service-policy, which is applied as global (by default).
My doubt is should I apply the service policy on the interface or the global will work.
Just a silly doubt
Thanks in advance.Hi,
I think it should work just fine if you attach it to the default "policy-map" configuration that you have attached globally on the ASA.
You might want to configure the timeout value as something long rather than setting it as unlimited.
- Jouni -
ACE - timeout inactivity problem
Hi All,
I've got a strange problem with session counts and timeout on an ACE (2.1.3).
I created a connection parameter-map to an existing configuration, added it to the load-balance configuration and then removed and re-added the service policy. The context is in bridge mode.
parameter-map type connection FINJAN
set timeout inactivity 60
set tcp timeout half-closed 60
policy-map multi-match Finjan-04-LB-policy
class VIP-production_class
loadbalance vip inservice
loadbalance policy production-8080_LB_policy
loadbalance vip icmp-reply
connection advanced-options FINJAN
class VIP-beta_class
loadbalance vip inservice
loadbalance policy beta-8080_LB_policy
loadbalance vip icmp-reply
connection advanced-options FINJAN
interface vlan 396
description slb vlan
bridge-group 396
access-group input BPDU
access-group input PERMIT-ALL
service-policy input Finjan-04-LB-policy
no shutdown
But I'm still seeing sessions with idle times of minutes.
For example:
27344 1 in TCP 397 10.199.253.103:3563 61.143.251.173:80 ESTAB
[ idle time : 00:16:47, byte count : 975 ]
[ elapsed time: 00:20:30, packet count: 14 ]
Is there anything else I need to do to make the timeout effective? I need to get this working before I can limit the number of connections to each real server.
Also the output of "sh serverfarm" shows many more current connections than a "sh conn de" command. Is this expected?
E.g:
ace2/finjan# sh serverfarm beta-farm-8080
serverfarm : beta-farm-8080, type: HOST
total rservers : 7
----------connections-----------
real weight state current total failures
---+---------------------+------+------------+----------+----------+---------
rserver: beta_blade-1
10.199.253.111:0 8 OPERATIONAL 44982 39669799 45323
rserver: beta_blade-2
10.199.253.112:0 8 OPERATIONAL 49594 42955799 60246
rserver: beta_blade-3
10.199.253.113:0 8 OPERATIONAL 51545 46098331 49868
rserver: beta_blade-4
10.199.253.114:0 8 OPERATIONAL 51659 46260307 57544
rserver: production_blade-2
10.199.253.102:0 8 OPERATIONAL 720 540878 41145
rserver: production_blade-3
10.199.253.103:0 8 OPERATIONAL 51270 45832507 45670
rserver: production_blade-4
10.199.253.104:0 8 OPERATIONAL 51870 45779920 47624
when the "sh conn de" reports about 14000 sessions.
Any help appreciated.
Thank you
CathyI moved the service policy from the client vlan to the global config - in the hope of being able to apply the connection parameter-map. Just after I did that the whole ACE reloaded (failure in arp_mgr). Hopefully unrelated.
I do see unbalanced flows;
5078 1 in TCP 397 10.199.253.112:6005 211.166.10.66:80 ESTAB
[ idle time : 00:16:56, byte count : 1644 ]
[ elapsed time: 00:19:17, packet count: 29 ]
35 1 out TCP 396 211.166.10.66:80 10.199.253.112:6005 CLOSED
[ conn in reuse pool : FALSE]
[ idle time : 00:19:14, byte count : 28504 ]
[ elapsed time: 00:19:17, packet count: 21 ]
Is there anything I can do about this or is it dependent on the server-side doing something?
Thank you
Cathy -
Slow TCP performance for traffic routed by ACE module
Hi,
the customer uses two ACE20 modules in active-standby mode. The ACE load-balances servers correctly. But there is a problem with communication between servers in the different ACE contexts. When the customer uses FTP from one server in one context to the other server in other context the throughput through ACE is about 23 Mbps. It is routed traffic in ACE:-( See:
server1: / #ftp server2
Connected to server2.cent.priv.
220 server2.cent.priv FTP server (Version 4.2 Wed Apr 2 15:38:27 CDT 2008) ready.
Name (server2:root):
331 Password required for root.
Password:
230 User root logged in.
ftp> bin
200 Type set to I.
ftp> put "|dd if=/dev/zero bs=32k count=5000 " /dev/null
200 PORT command successful.
150 Opening data connection for /dev/null.
5000+0 records in.
5000+0 records out.
226 Transfer complete.
163840000 bytes sent in 6.612 seconds (2.42e+04 Kbytes/s)
local: |dd if=/dev/zero bs=32k count=5000 remote: /dev/null
ftp>
The output from show resource usage doesn't show any drops:
conc-connections 0 0 800000 1600000 0
mgmt-connections 10 54 10000 20000 0
proxy-connections 0 0 104858 209716 0
xlates 0 0 104858 209716 0
bandwidth 0 46228 50000000 225000000 0
throughput 0 1155 50000000 100000000 0
mgmt-traffic rate 0 45073 0 125000000 0
connections rate 0 9 100000 200000 0
ssl-connections rate 0 0 500 1000 0
mac-miss rate 0 0 200 400 0
inspect-conn rate 0 0 600 1200 0
acl-memory 7064 7064 7082352 14168883 0
sticky 6 6 419430 0 0
regexp 47 47 104858 209715 0
syslog buffer 794624 794624 418816 431104 0
syslog rate 0 31 10000 20000 0
There is parameter map configured with rebalance persistant for cookie insertion in the context.
Do you know how can I increase performance for TCP traffic which is not load-balanced, but routed by ACE? Thank you very much.
RomanDefault inactivity timeouts used by ACE are
icmp 2sec
tcp 3600sec
udp 120sec
With your config you will change inactivity for every protocol to 7500sec.If you want to change TCP timeout to 7500sec and keep the
other inactivity timeouts as they are now use following
parameter-map type connection GLOBAL-TCP
set timeout inactivity 600
parameter-map type connection GLOBAL-UDP
set timeout inactivity 120
parameter-map type connection GLOBAL-ICMP
set timeout inactivity 2
class-map match-all ALL-TCP
match port tcp any
class-map match-all ALL-UDP
match port tcp any
class-map match-all ALL-ICMP
match port tcp any
policy-map multi-match TIMEOUTS
class ALL-TCP
connection advanced GLOBAL-TCP
class ALL-UDP
connection advanced GLOBAL-UDP
class ALL-TCP
connection advanced GLOBAL-ICMP
and apply service-policy TIMEOUTS globally
Syed Iftekhar Ahmed -
Hi all,
I have this configuration:
version 12.2
service nagle
no service pad
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime
service timestamps log datetime msec localtime
service password-encryption
service internal
service sequence-numbers
hostname c3620
ip subnet-zero
no ip source-route
ip rtp coalesce
ip cef
ip tcp selective-ack
ip tcp path-mtu-discovery
interface Ethernet1/0
bandwidth 10000
ip address 172.16.0.1 255.255.255.248
ip verify unicast reverse-path
no ip redirects
no ip unreachables
no ip proxy-arp
ip nat inside
full-duplex
interface BRI1/0
no ip address
no ip redirects
no ip unreachables
no ip proxy-arp
ip nat outside
encapsulation ppp
dialer rotary-group 0
isdn switch-type basic-net3
isdn spid1 985123123
isdn timeout-signaling
no cdp enable
interface Dialer0
bandwidth 64
ip address negotiated
no ip redirects
no ip unreachables
no ip proxy-arp
ip nat outside
service-policy output QoS-RDSI
encapsulation ppp
dialer in-band
dialer idle-timeout 0
dialer string 909250250
dialer-group 1
no cdp enable
ppp authentication pap callin
ppp chap hostname tu@eresmas
ppp chap password 7 00000
ppp pap sent-username tu@eresmas password 7 00000
ip nat translation tcp-timeout 1800
ip nat inside source list 150 interface Dialer0 overload
ip classless
ip route 0.0.0.0 0.0.0.0 Dialer0
access-list 1 permit 172.16.0.2
access-list 1 permit 172.16.0.3
access-list 150 remark ** Dialer-list 1 y Ip nat inside **
access-list 150 permit tcp 172.16.0.0 0.0.0.7 gt 1023 any
access-list 150 permit udp 172.16.0.0 0.0.0.7 gt 1023 any
access-list 150 permit icmp 172.16.0.0 0.0.0.7 any
dialer-list 1 protocol ip list 150
dial-peer cor custom
line con 0
logging synchronous
line aux 0
line vty 0 4
access-class 1 in
logging synchronous
transport input telnet ssh
end
(I avoid user accounts and other commands that I think are not interesting for my problem at all)
Ok, my problem is that "dialer idle-timeout" under diler0 interface doesn't run.
As I read into the documentation the interesting traffic should use ACL 150 and then resets the dialer counter in order to mantain the call/internet connetion UP.
That is not the case. The diale counter ends and the connection must be re-established.
Any suggestions?
I don't know what to try.
Thanks.Hi Rick,
Changes into configuration were...
no access-list 150
access-list 150 remark ** IP NAT inside **
access-list 150 permit tcp 172.16.0.0 0.0.0.7 gt 1023 any
access-list 150 permit udp 172.16.0.0 0.0.0.7 gt 1023 any
access-list 150 permit icmp 172.16.0.0 0.0.0.7 any
access-list 151 remark ** Dialer List **
access-list 151 permit tcp 172.16.0.0 0.0.0.7 gt 1023 any
access-list 151 permit udp 172.16.0.0 0.0.0.7 gt 1023 any
access-list 151 permit icmp 172.16.0.0 0.0.0.7 any
no dialer-list 1 protocol ip list 150
dialer-list 1 protocol ip list 151
As you can see I made two ACLs, one for NAT and other for the "dialer-list" command.
Then, I modified the "dialer idle-timeout" under Dialer0 interface and I changed it to 90 seconds.
After that I executed "show dialer" with this result:
# show dialer
Dial reason: ip (s=172.16.0.3, d=61.155.39.144)
Time until disconnect 81 secs
Ok, idle counter is running!!
I did a ping against 61.155.39.144 (it replied correctly) and the idle counter didn't reset to the 90 seconds :(
Another strange thing is that Dialer0 interface always appears with "no ip route-cache cef", but I can force the interface to use CEF. It doesn't matter if I save the config with CEF, after a reboot the Dialer0 interface appears as "no ip route-cache cef". I don't know if this issue has relation with the "dialer idle-timeout" command. I don't think so since I have the same "dialer idle-timeout" with and without CEF. This issue calls my attention too because I never see it before.
More info, IOS Version:
3600 Software (C3620-IK9S-M), Version 12.2(28a), RELEASE SOFTWARE (fc2)
c3620-ik9s-mz.122-28a.bin
I hope this helps -
V1.5 ORB Setting Timeout values
Is it possible to set the timeout values used by the Java ORB?
I can�t find any information about it�
I know that in version 1.4.x was impossible.
I tried this with different values, but no success�
// transport read tcp timeout property, colon separated property
// with syntax <initial time to wait:max read giop header time to
// wait: max read message time to wait:backoff factor>
properties.put( "com.sun.CORBA.transport.ORBTCPReadTimeouts", "0:0:0:0");
orb = ORB.init(args, properties);I know the values are passed to the ORB properties (debug in eclipse), but the sockets created for the connections don�t use them�
Can some one please tell me how?
Ps: I know that JacORB offer this feature but I prefer continuing using the ORB offered by sun.
Thanks in advance!I have had the code to do it in Java 1.4 for a couple years now. It is below with instructions. Last year I started porting to Java 5 and have been unable to find the solution until now. That is below as well.
(I am typing this from a printed copy so bear with me)
Java 1.4
// to use set the system property -
// com.sun.CORBA.connection.ORBSocketFactoryClass = Jre4SocketFactory
import com.sun.corba.se.connection.EndPointInfo;
import com.sun.corba.se.connection.GetEndPointInfoAgainException;
import com.sun.corba.se.internal.iiop.DefaultSocketFactory;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
public class Jre4SocketFactory
extends DefaultSocketFactory
public ServerSocket createServerSocket(String type, int port)
throws IOException
ServerSocket result = super.createServerSocket(type, port);
result.setSoTimeout(3000);
return result;
public Socket createSocket(EndPointInfo epi)
throws IOException, GetEndPointInfoAgainException
Socket result = super.createSocket(epi);
result.setSoTimeout(3000);
return result;
Java 5
// to use set the system properties -
// com.sun.CORBA.transport.ORBSocketFactoryClass = Jre5SocketFactory
// com.sun.CORBA.transport.ORBConnectionSocketType = Socket
import com.sun.corba.se.transport.DefaultSocketFactoryImpl;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
public class Jre5SocketFactory
extends DefaultSocketFactoryImpl
public ServerSocket createServerSocket(String type, InetSocketAddress in)
throws IOException
ServerSocket result = super.createServerSocket(type, in);
result.setSoTimeout(3000);
return result;
public Socket createSocket(String type, InetSocketAddress in)
throws IOException
Socket result = super.createSocket(type, in);
result.setSoTimeout(3000);
return result;
}This is just how I did timeouts in corba. You can also implement encryption etc by using this method and wrapping up the socket. I figured out both of them by reading the source code out in com.sun.corba.se...etc. Both of the above are tested and work great in operational code.
--Zerothbase -
JNDI connection creation timeouts
Hi,
I've a question concerning connection creation timeouts. The Tutorial (http://java.sun.com/products/jndi/tutorial/ldap/connect/create.html) says "By default, this timeout period is the network (TCP) timeout value, which is in the order of a few minutes. " But which exact tcp-value is it? tcp_keepalive_time? I need to know the default value of this.
Thanx for any hints.
Regards,
IngoHi,
Please let me know if you found the answer. I have the same query. Also, is there any way using JNDI to avoid closing the connection due to TCP timeout as a firewall may time-out after a specified period of inactivity.? That is, If a long-running query is established with LDAP server, can the application keep the session active by sending a keep-alive across the connection?
Thanks in advance.
Maybe you are looking for
-
My computer won't detect my phone SD card
Okay, so I have a new SD card for my BlackBerry 8520 (well I say new, I mean my friend gave me it), and every time I try to plug my phone in my computer, it will not detect the card, even though the phone itself recognises it (as it shows it on the
-
I am currently running a MacBook Core Duo 2.0 13 inch. It was purchased in June of 2006 and has had the hard drive replaced by Apple within the last year. (Just a quick summary!) This evening, I closed my MacBook to take it to a different room. When
-
Crystal 8.5 Licensing?
I've been assigned to maintain some old VB 6.0 code that was developed by a different company. Some of the reports appear to be Crystal Reports 8.5 ttx files. While I've found several places I can download Crystal Reports 8.5 developer from, I would
-
OCR makes Document Shrink!
Hi, I am having a wierd error with Adobe Acrobat Pro 8. When I try to OCR something it shrinks the actual viewable document an inch in size. I have tried looking online for a solution but I haven't found a thing relating to why this would be happenin
-
Double NATting ASA 5510 8.4 how to ?
Hi, I have a situation that creates a bit of a headache for me. The task is to use SMB / NetBIOS (Win Server 2008 R2) to open a connection and transfer a file from host 2 to host 1. Sounds easy, I know. Here's the setup: Host 1: 192.168.10.34 (on 192