This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Did not receive expected response to conf t command!

     Hi again! As you requested, I've made a new theme with my question. What kind of diagnostics you need from me?

I have the same question as flexible, I have 2 Cisco IOS switches 2960 (first firmware version is 12.2(50)SE5 and another 12.2(58)SE2) when I am trying to use "Device.CLI.Send commands" in Cat tools the switch, which have 12.2(50)SE5 version make all commands correctly, but when running activity  on another(12.2(58)SE2):  "Did not receive expected response to command: conf t" and after that Cat tools stops activity. I used putty(ssh2) as a terminal in cattools.

     P.S. I apologize for my English, if something not right written^^

Thanks!

  • Very surprising that one of your devices is failing to execute 'conf t' command.

    Have you tried a manual PuTTY session to the device using the same credentials for the device as you have specified in CatTools?  What happens?  Can you run the command or do you get the same error?

    The only thing I can think is maybe you are not in 'enable' (privileged exec) mode for this device when trying to execute the 'conf t' command.

    In the Options tab of the Device.CLI.Send Commands activity, have you selected the 'Enter command in enable mode' option?

    If not then try that and see what happens, as if this works I will be able to tell you what the problem is.

    Regards,

    Steve

  • Steve, "conf t" command is just an example... on 12.2(58)SE2 cattools couldn't do any command!!!!!!!!!! manualy i can do any command and it will work! in my opinion it because cattolls couldn't work with 12.2(58)SE2 firmware! Because all commands work on switches with 12.2(50)SE5 firmware.I have cattools 3.3.4 enterprise.

  • Still sounds very odd.  I don't remember any issues with specific IOS versions not sending commands, although v3.3.4 is quite an old version now (2008).   My thought therefore is its possible CatTools is either having issue trying to log in to the device, or when trying to determine the device hostname which is then used as the anchor-point when running commands to tell CatTools the command output has completed.   Are there any errors in the 'Info Log' pane which provide any indication of the problem?

    If you have a spare machine somewhere that can get Telnet/SSH connectivity to the problem device, you may want to try downloading the latest CatTools release Eval version to install on that test machine to see if the latest release encounters the same issue.

    Failing that we'd really need to get some diagnostics from you (device DebugLog for one of the effected devices, the Infolog.txt file to cross-reference any log messages and probably also a PuTTY session log file too).

    As the debuglog file may contain sensitive (login credentials) data, I'd recommend raising a support ticket for this one.

    Please post back on the thread with the case number and any solution that support provide as this could be valuable for other CatTools users if they encounter a similar issue.

    When you raise your support ticket, mention that you have spoken with me on thwack.

    Regards.

    Steve

  • If i correctly understand, I couldn't raise a support ticket, because i'm not yet an owner of cattools?(The v3.3.4 i get for free...just for testing) I tried a new trial version - the same situation. I'm intersted in purchasing new cattools, but it doesn't work with new cisco firmware. You also asked for some diognostics - where i need to send it?

    Best regards,

    Vadim

  • You understand correctly. In order to raise a support ticket, you need to have valid (current) software maintenance for the product.

    However, seeing as you are experiencing the same problem with the Evaluation download for v3.7.0, I would recommend contacting the Sales team to let them know the details.

    Kind regards,

    Steve

  • Thank you, Steve!

    I will try.

    But one more question: how to contact the Sales team? emoticons_confused.png

  • About mid-way down the page: http://www.solarwinds.com/company/contact.aspx

    There are different contact numbers depending on which geographical region you are in, else use the email link.

    Let Sales know you are evaluating the product and are encountering this issue.

    Regards

    Steve

  • I had a problem with not getting responses or failures with CatTools waiting for an echo of a command. I had to write custom section in my scripts to send commands and only look for the command itself. The reason is because some older switches or routers for that matter will change how the prompt looks. See CatTools expects to see this hostname# for enable and hostname( for the config prompt. Well I've had some devices that shorten the hostname take "thisisareallylonghostname" the switch will shorten to say thisisareallylong# or thisisareallylon( now as you can see CatTools will never get the expected response. So below is a function I wrote for sending a command.

    '######################################################################################################

    ' Function: Send_Command

    ' Purpose: This is used throughout the script to send a specific cli command.

    ' Variables: Command in string format, Boolean on prompts, true for Yes AND false for No

    '######################################################################################################

    Function Send_Command(sCommand,bYesToPrompts)

        ' Integers

        Dim i,j

        Dim iTimeOut

        Dim iChoices

        Dim iRetVal

        ' Booleans

        Dim bRetVal

        Dim sResponse,sBufferBefore,sBufferMore

        'Arrays

        Dim aMult(7)

      

        aMult(1) = "]?"

        aMult(2) = "[confirm]"

        aMult(3) = "[yes/no]"

        aMult(4) = "% Unknown command"

        aMult(5) = "% Invalid input"

        aMult(6) = "#"

        aMult(7) = "<--- More --->"

        iTimeout = 30

        iChoices = 7

        j = 0

      

        ' This will send the commands. This is to help on making the code smaller. Just basic commands, no responses

        Send_Command = True

        bRetVal = ""

        sResponse = sCommand

        If Len(sCommand) > 20 Then sResponse = Left(sCommand,20)

        ' Save buffer before. This helps in controlling possible issues.

        sBufferBefore = cl.RXBuffer

        ' Flush Receive Buffer

        cl.FlushRXBuffer

        cl.Log 4, "Sending Command: " & sCommand

        cl.SendData(sCommand & vbCr)

        Do

            iRetVal = cl.WaitForMultData(aMult, iChoices, iTimeOut)

            Select Case iRetVal

                Case 0

                    cl.Log 4, "Case 0 - " & cl.RxBuffer

                    If sBufferMore = "" Then

                        cl.RxBuffer = sBufferBefore & cl.RxBuffer

                    Else

                        cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                    End If

                    Send_Command = "No response to " & sCommand

                    Exit Function

                Case 1

                    iRetVal = ""

                    Exit Do

                Case 2

                    iRetVal = ""

                    If bYesToPrompts = True Then

                        cl.SendData vbCr

                            Do

                                iRetVal = cl.WaitForMultData(aMult, iChoices, iTimeOut)  

                                While cl.RXBuffer = ""

                                    ' Do Nothing, just wait

                                    cl.Delay(1)

                                    j = j + 1

                                    If j = iTimeout Then

                                        Send_Command = "Timeout reached on command: " & sCommand

                                        If sBufferMore = "" Then

                                            cl.RxBuffer = sBufferBefore & cl.RxBuffer

                                        Else

                                            cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                                        End If

                                        Exit Function

                                    End If

                                Wend

                                If sBufferMore = "" Then

                                    cl.RxBuffer = sBufferBefore & cl.RxBuffer

                                Else

                                    cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                                End If

                                Exit Do

                            Loop

                        Exit Do

                    Else

                        cl.SendData "n" & vbCr

                        Do

                            iRetVal = cl.WaitForMultData(aMult, iChoices, iTimeOut)  

                            While cl.RXBuffer = ""

                                ' Do Nothing, just wait

                                cl.Delay(1)

                                j = j + 1

                                If j = iTimeout Then

                                    Send_Command = "Timeout reached on command: " & sCommand

                                    If sBufferMore = "" Then

                                        cl.RxBuffer = sBufferBefore & cl.RxBuffer

                                    Else

                                        cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                                    End If

                                    Exit Function

                                End If

                            Wend

                            If sBufferMore = "" Then

                                cl.RxBuffer = sBufferBefore & cl.RxBuffer

                            Else

                                cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                            End If

                            Exit Do

                        Loop

                        Exit Do

                    End If

                Case 3

                    iRetVal = ""

                    If bYesToPrompts = True Then

                        cl.SendData "y" & vbCr

                        Do

                            iRetVal = cl.WaitForMultData(aMult, iChoices, iTimeOut)  

                            While cl.RXBuffer = ""

                                ' Do Nothing, just wait

                                cl.Delay(1)

                                j = j + 1

                                If j = iTimeout Then

                                    Send_Command = "Timeout reached on command: " & sCommand

                                    If sBufferMore = "" Then

                                        cl.RxBuffer = sBufferBefore & cl.RxBuffer

                                    Else

                                        cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                                    End If

                                    Exit Function

                                End If

                            Wend

                            If sBufferMore = "" Then

                                cl.RxBuffer = sBufferBefore & cl.RxBuffer

                            Else

                                cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                            End If

                            Exit Do

                        Loop

                        Exit Do

                    Else

                        cl.SendData "n" & vbCr

                        Do

                            iRetVal = cl.WaitForMultData(aMult, iChoices, iTimeOut)  

                            While cl.RXBuffer = ""

                                ' Do Nothing, just wait

                                cl.Delay(1)

                                j = j + 1

                                If j = iTimeout Then

                                    Send_Command = "Timeout reached on command: " & sCommand

                                    If sBufferMore = "" Then

                                        cl.RxBuffer = sBufferBefore & cl.RxBuffer

                                    Else

                                        cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                                    End If

                                    Exit Function

                                End If

                            Wend

                            If sBufferMore = "" Then

                                cl.RxBuffer = sBufferBefore & cl.RxBuffer

                            Else

                                cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                            End If

                            Exit Do

                        Loop

                        Exit Do  

                    End If

                Case 4

                    If sBufferMore = "" Then

                        cl.RxBuffer = sBufferBefore & cl.RxBuffer

                    Else

                        cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                    End If

                    Send_Command = "Unknown Command: " & sCommand

                    Exit Function

                Case 5

                    cl.Log 4, cl.RxBuffer

                    If sBufferMore = "" Then

                                cl.RxBuffer = sBufferBefore & cl.RxBuffer

                            Else

                                cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                            End If

                    Send_Command = "Invalid Input: " & sCommand

                    Exit Function

                Case 6

                    While cl.RXBuffer = ""

                        ' Do Nothing, just wait

                        cl.Delay(1)

                        j = j + 1

                        If j = iTimeout Then

                            Send_Command = "Timeout reached on command: " & sCommand

                            If sBufferMore = "" Then

                                cl.RxBuffer = sBufferBefore & cl.RxBuffer

                            Else

                                cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                            End If

                            Exit Function

                        End If

                    WEND

                    If sBufferMore = "" Then

                        cl.RxBuffer = sBufferBefore & cl.RxBuffer

                    Else

                        cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                    End If

                    Exit Do

                Case 7

                    iRetVal = ""

                    If sBufferMore = "" Then

                        sBufferMore = sBufferBefore & cl.RxBuffer

                    Else

                        sBufferMore = sBufferBefore & sBufferMore & cl.RxBuffer

                    End If

                    cl.FlushRxBuffer

                    cl.SendData Chr(32)

                    j = j + 1

                    If j = iTimeout Then

                        Send_Command = "Timeout reached on command: " & sCommand

                        If sBufferMore = "" Then

                            cl.RxBuffer = sBufferBefore & cl.RxBuffer

                        Else

                            cl.RxBuffer = sBufferBefore & sBufferMore & cl.RxBuffer

                        End If

                        Exit Function

                    End If

            End Select

        Loop

    End Function

    My function looks for the first 20 characters of a command to see if it exists in the Buffer. If it does then it will send a return character. Login to you device and whats the device hostname and how does it compare to the enable and config prompts.