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 01-06-2006, 11:48 AM
cythraul's Avatar
cythraul cythraul is offline
Registered User
 
Join Date: Mar 2005
Posts: 6
crt.Session.Connect hangs

Hi,

I had a problem with crt.session.disconnect. It would hangs forever. This has been corrected.

I'm having the same problem is crt.session.connect :

Code:
crt.session.Disconnect
sessioncmd = "/SERIAL COM1 /BAUD 9600 /CTS /DATA 8 /DSR /PARITY NONE /STOP 0 /XON"
crt.Session.Connect sessioncmd
or
Code:
crt.session.Disconnect
sessioncmd = "/SSH1 /L xxx /C 3DES /PASSWORD xxx 10.18." & ThirdIP & "." & FourthIP + 1
crt.session.Connect sessioncmd
I use the above scripts to automate 83x routers configurations. These only have one console port that can be used as an AUX port.

I had the misfortune to upgrade my production machine from 4.1 to 5.0 recently and now I can't configure any routers. :(

Thanks!
cyth
Reply With Quote
  #2  
Old 01-09-2006, 10:32 AM
tnygren's Avatar
tnygren tnygren is offline
Registered User
 
Join Date: May 2005
Posts: 1,408
Hi Cythraul,

I'm sorry to hear that there have been issues with crt.session.connect.

I just need to get a little more information to find out what is happening.

Are you using CRT or SecureCRT?

Could you tell me more about what is happening (can't connect, can connect but can't authenticate, can authenticate but have issues afterward, etc)?

Are any errors being displayed?

Which exact version and build is installed?

This can be found in the 'About' option in the 'Help' menu of the application.
__________________
Thanks,

Teresa

Teresa Nygren
Reply With Quote
  #3  
Old 01-11-2006, 11:33 AM
cythraul's Avatar
cythraul cythraul is offline
Registered User
 
Join Date: Mar 2005
Posts: 6
Quote:
Originally Posted by tnygren
I'm sorry to hear that there have been issues with crt.session.connect.
No need, it has been corrected after I opened a ticket with your support group.

Quote:
Originally Posted by tnygren
Are you using CRT or SecureCRT?
SecureCRT.

Quote:
Originally Posted by tnygren
Could you tell me more about what is happening (can't connect, can connect but can't authenticate, can authenticate but have issues afterward, etc)?
Are any errors being displayed?
Basicaly the script will simply hang to the crt.session.disconnect statement forever. No error, no timeout. Nothing. :(

Quote:
Originally Posted by tnygren
Which exact version and build is installed?
This can be found in the 'About' option in the 'Help' menu of the application.
Sorry about that, I should have provided it when I posted. The version I'm using is the latest one (5.0.4.) I'm not certain of the built since I removed it and reinstalled that latest v4.

cyth
Reply With Quote
  #4  
Old 01-11-2006, 11:55 AM
tnygren's Avatar
tnygren tnygren is offline
Registered User
 
Join Date: May 2005
Posts: 1,408
Hi Cyth,

If I understand correctly, you have gone back to SecureCRT 4 to resolve this issue.

Is this correct?

If so, we would like to see this resolved in 5.0.4.

Was the support ticket opened over the phone or via email?

Does this connection go through a firewall to connect?
__________________
Thanks,

Teresa

Teresa Nygren
Reply With Quote
  #5  
Old 01-14-2006, 07:50 PM
cythraul's Avatar
cythraul cythraul is offline
Registered User
 
Join Date: Mar 2005
Posts: 6
Quote:
Originally Posted by tnygren
If I understand correctly, you have gone back to SecureCRT 4 to resolve this issue.
Is this correct?
Exact and with absolutely no change to the script itself. I can prove it with the script timestamp. :)

Quote:
Originally Posted by tnygren
If so, we would like to see this resolved in 5.0.4.
Indeed. Working without tabs sucks. Fortunately, I was able to obtain a separate desktop to run my scripts. For everything else but script usage, I use my primary computer. What I'm saying is, this issue is not as critical as it was when I had the crt.disconnect problem. That's why I'm using the forum and not support directly. I think it's great that you provide that kind of forum-based support and I prefer to use it when possible.

Quote:
Originally Posted by tnygren
Was the support ticket opened over the phone or via email?
Via email. The ticket reference is T200506170015. You can also refer to this thread: http://forums.vandyke.com/showthread.php?t=841

Quote:
Originally Posted by tnygren
Does this connection go through a firewall to connect?
Nope. In both cases it's a direct connection. One's serial (using the internal COM port,) the other one uses either a xover patch cord or a standard patch cord, depending on the equipment. Though, I just remembered that I have this issue with a rarely used script that connects thru using SSH to a remote router which is only reachable by a VPN tunnel. But I suspect that anything that uses this function will hang.

Beside, crt.session.connect would timeout if a connection problem was present. Itís not the case here. I tried once to leave the script running all week-end just to see if it would have done something. When I came in Monday morning, it was still sitting there.

Thanks!
cyth
Reply With Quote
  #6  
Old 01-16-2006, 11:25 AM
tnygren's Avatar
tnygren tnygren is offline
Registered User
 
Join Date: May 2005
Posts: 1,408
Hi Cythraul,

Thank you for all the information!

We have opened a trouble ticket for this issue and hope to have it resolved soon.

I believe that I've found your contact information from the previous thread you mentioned.

However, just to be certain that any pre-release build that is created to resolve this issue goes to the correct person, could you send an email to support@vandyke.com with a subject of ATTN: Teresa Forum Thread 1203?
__________________
Thanks,

Teresa

Teresa Nygren
Reply With Quote
  #7  
Old 01-17-2006, 08:12 AM
tnygren's Avatar
tnygren tnygren is offline
Registered User
 
Join Date: May 2005
Posts: 1,408
Hi Cythraul,

We believe that we have a resolution for this hang in a pre-release version of SecureCRT 5.1.

Please send me an email if you would like to try this version so I can make certain that I get the download to the correct person.
__________________
Thanks,

Teresa

Teresa Nygren
Reply With Quote
  #8  
Old 05-19-2009, 09:21 AM
mp3droid's Avatar
mp3droid mp3droid is offline
Registered User
 
Join Date: Oct 2008
Posts: 5
crt.Session.Connect "/SERIAL ..."

I found this thread when I was having problems figuring out a way to set a timeout for a serial connection, which I think was one of the problems the original poster had.

While there doesn't seem to be a way to include a timeout in crt.Session.Connect, you can achieve the same results by telling your script to wait a given amount of time for the cursor to move.
Code:
 cResult = crt.Screen.waitforcursor (5)
If the cursor doesn't move, then it assumes it is not connected and you can write your script to handle that however you wish.

This workaround is useful when connecting to a serial devices whose baud rates may not all be set the same. Here is the relevant code from a script I recently finished to configure cisco 800's.

Code:
Sub Script (intStop, strRetry, intRetryCnt)
	'connect @ 115200 or 9600 depending on intRetry
	If crt.Session.Connected = True Then 
		crt.Session.Disconnect
	End If
	If strRetry = "" Then
		crt.Session.Connect "/SERIAL COM1 /BAUD 115200 /DATA 8 /NODSR /PARITY NONE /NOXON"
		'crt.Dialog.messagebox "115200"
	Else
		crt.Session.Connect "/SERIAL COM1 /BAUD 9600 /DATA 8 /NODSR /PARITY NONE /NOXON"
		'crt.Dialog.messagebox "9600"
	End If
	cResult = crt.Screen.waitforcursor (5)
	'crt.Dialog.messagebox "cResult: " & cResult
	If cResult = 0 Then 'no text was output on screen, therefore wrong baud rate or not connected...try again at 9600
		intRetryCnt = intRetryCnt + 1
		strRetry = "Yes"
		If intRetryCnt <> 1 Then
			crt.Dialog.messagebox "Please check your console cable, insure that the device is powered, and press ''OK'' to try again.","Cannot Communicate with Cisco 800"
			intRetryCnt = 0
			strRetry = ""
		End If
		Exit Sub
	Else
		intRetryCnt = 0
		strRetry = ""
	End If
Reply With Quote
  #9  
Old 05-19-2009, 09:42 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi mp3droid,

Thanks for taking the time to post this work-around. It looks like it will be helpful for future script writers.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #10  
Old 06-22-2010, 05:47 AM
Axlrod Axlrod is offline
Registered User
 
Join Date: Oct 2007
Posts: 8
indeed thanks mp3droid
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 04:12 AM.