#1
|
|||
|
|||
SSH to different hosts fails
My script to SSH into different Cisco Wireless LAN Controllers sequentially to program LWAPs only connects to the first Controller. Upon trying to SSH to the next Cisco Controller it states CRT Scripting Runtime error
ERror: Connection failed Line 256 after clicking OK the console states "The specified address is not available from the local computer" If I try accessing the controllers in reverse IP address order, the 2nd controller which was not accessible IS accessible. It's something to do with the disconnect of the first controller and SSH connection into second controller. Last edited by olivebranch2006; 04-03-2013 at 07:31 PM. Reason: more detail |
#2
|
|||
|
|||
Hi olivebranch2006,
What is the version of SecureCRT that you are using? Is this a new issue? If it is, what has changed in your environment? Please post the script you are using (after removing any sensitive data). |
#3
|
|||
|
|||
Script Code
This problem has existed since I wrote the script and I haven't been able to figure it out. SecureCRT is version 7.0.1 (x64 build 374). Platform is Windows 7 Enterprise N 64 bit.
Thanks! |
#4
|
|||
|
|||
Hi olivebranch2006,
Thanks for the data and the script. We are investigating this issue. In the meantime, would you make a change to your Default.ini file and post whether the issue is resolved? To edit the Default.ini file:The line to edit is: From:D:"Force Close On Exit"=00000000To:D:"Force Close On Exit"=00000001 |
#5
|
|||
|
|||
Edited Default.ini
Edited Default file and ran the script. Same problem:
CRT Scripting Runtime error Error: Connection failed LWAP-Program-3.31.vbs Line: 256 After clicking OK, the first session is now disconnected in SecureCRT with the only text in terminal window being: The specified address is not available from the local computer. Thanks! Last edited by olivebranch2006; 04-04-2013 at 04:02 PM. Reason: typo |
#6
|
|||
|
|||
Thanks for the test olivebranch2006. I will post here with any other questions we might have as we investigate this issue.
|
#7
|
|||
|
|||
Hi olivebranch2006,
We would like to get some additional data. Would you comment out the calls to ProgramAllAPs and let me know if you still see the issue when connecting to the second device? If you do, would you enable logging for each connection to a separate file? For example: Code:
' Set log file name crt.Session.logfilename = "c:\temp\connection1.log" ' Enable logging crt.Session.log true ' Get current trace level so we can set it back after the test nCurrentTraceLevel = CInt(crt.Session.Config.GetOption("Trace Level")) ' Set new trace level crt.Session.Config.SetOption "Trace Level", 5 ' Connect to remote crt.Session.Connect "/ssh2 /l user /password password host" ' Set trace level back crt.Session.Config.SetOption "Trace Level", nCurrentTraceLevel |
#8
|
|||
|
|||
Any luck?
Any luck? Can I help? Oh I didn't see your reply. I'll get that as soon as possible.
Last edited by olivebranch2006; 04-09-2013 at 06:22 PM. |
#9
|
|||
|
|||
Hi olivebranch2006,
Since the trace output can have sensitive data, you may want to send this to support@vandyke.com with a subject of Attn Todd - Forum thread #10971. |
#10
|
|||
|
|||
logs created but blank
I added the code like so:
' Set log file name crt.Session.logfilename = "c:\FTPROOT\connection1.log" ' Enable logging crt.Session.log true ' Get current trace level so we can set it back after the test nCurrentTraceLevel = CInt(crt.Session.Config.GetOption("Trace Level")) ' Set new trace level crt.Session.Config.SetOption "Trace Level", 5 ConnectWLC1 'connect to 1st WLC 'ProgramAllAPs ' Set trace level back crt.Session.Config.SetOption "Trace Level", nCurrentTraceLevel for each connect WLC instance (1, 2, 3) and the logs were blank except the last one which was me manually logging out of the last WLC. The script did work though. It connected to 1st WLC, had a long pause, then connected to 2nd WLC. It could be something in the ProgramAllAPs function? do you agree? Thanks! |
#11
|
|||
|
|||
Tried another change but failed
Screen JPEG attached. This is after:
1. enabling ProgramAllAPs function again. 2. increased pause at end of SaveConfig function from 500ms to 3second 3. added 3 second pause at middle of SaveConfig function before it sends console "logout" command. So it appears something is broken in the ProgramAllAPs function which also calls out many other functions. The connection log files are blank, which is strange. The ProgramAllAPs function successfully executes all of its ancillary functions down to saveconfig. Your help is always appreciated, thank you. |
#12
|
|||
|
|||
Hi olivebranch2006,
Thanks for the update. I am not sure why the log files are blank. In my tests, they are not. There is likely some simple thing that is causing a problem. I do think that there is a bug in your code, but I am not sure what it is. I would suggest that you comment all function calls in ProgramAllAPs and see if you have a problem. If you don't, slowly add one function call back in at a time and see which one is causing the problem. Once you find that, post it, and I will see if I can find out what might be causing the problem, and what data we might need to get. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|