Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-14-2018, 09:36 AM
bstedh bstedh is offline
Registered User
 
Join Date: Jan 2018
Posts: 41
.ConnectInTab Time out

I have a script that logs into routers from a list. I need to have a time out for connection failures. How do I change the time out or test for it?

Here is the connection portion of the script.
Code:
Set cfg = crt.OpenSessionConfiguration("Default")
	cfg.Save "CSR"
	Set cfg = crt.OpenSessionConfiguration("CSR")
	fwd = ""
	cfg.SetOption "Port Forward Table V2", Split(fwd, vbCrlf)
	cfg.SetOption "Hostname", ip
	cfg.SetOption "Username", login(0)
	cfg.SetOption "Firewall Name", "Forward"
	cfg.SetOption "color scheme", "Traditional"
	cfg.Save
	On Error Resume Next
	crt.Session.ConnectInTab "/S CSR /Password " & login(1),False,True
	set objTabCSR = crt.GetActiveTab
	objTabCSR.screen.Synchronous = True
	objTabCSR.screen.IgnoreEscape = True
	a = objTabCSR.Screen.WaitForStrings ("%","#",3)
	nerror = Err.Number
	On Error Goto 0
	If nerror <> 0 Then
		objTabCSR.Close
		CNNcsr = "FAIL"
		Exit Function
	End If
This works but there is a long (about two minute wait for the tab to time out) wait before the script continues to the next step. I have had no luck finding any information on connection timeouts with SecureCRT.

Version 6.7.3 (build 292)
__________________
Version 6.7.3 (build 292)
Reply With Quote
  #2  
Old 08-14-2018, 11:44 AM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 920
SecureCRT doesn't provide any way (scripting or otherwise) within the application to control TCP time-out values. These TCP connection time-out values are inherited from the operating system on which you've installed and are running SecureCRT.

I'll add a feature request for you, and should a version of SecureCRT ever become available that provides the ability to control the TCP connect time-out within the application, we'll post a notice here. If you'd like email notification of such an occurrence should it ever happen, please send email to support@vandyke.com with a subject of "ATTN: TCP timeouts, please - Forum thread #13217"

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 03:57 PM.