<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: XMC script -&amp;gt; Timeout during login to device in Scripting</title>
    <link>https://community.extremenetworks.com/t5/scripting/xmc-script-gt-timeout-during-login-to-device/m-p/64474#M379</link>
    <description>&lt;P&gt;Hello Robert,&lt;/P&gt;&lt;P&gt;I found out that my problem is not related to the timeouts. In the debug you can see that the prompt detection is not working properly. However, I am working with GTAC to find a solution.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Apr 2021 13:31:52 GMT</pubDate>
    <dc:creator>StephanH</dc:creator>
    <dc:date>2021-04-27T13:31:52Z</dc:date>
    <item>
      <title>XMC script -&gt; Timeout during login to device</title>
      <link>https://community.extremenetworks.com/t5/scripting/xmc-script-gt-timeout-during-login-to-device/m-p/64471#M376</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a problem running python scripts on some switches. The scripts are started on the XMC.&lt;/P&gt;&lt;P&gt;Due to several radius servers and other parameters it takes more than 30 seconds until the CLI session (SSH) is established.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If I&amp;nbsp;open a terminal in the XMC on these switches it works fine and there are no problems.&lt;/P&gt;&lt;P&gt;A connection with Putty works the same way. Of course you have to wait more than 30 seconds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I start a Python script it doesn't seem to wait long enough for the login to be successful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are now several timeouts that are maybe responsible for this.&lt;/P&gt;&lt;P&gt;On the one hand there is the timeout&lt;STRONG&gt; "Script Timeout per Device (secs)" &lt;/STRONG&gt;which is defined directly in the GUI of the XMC when executing the script (default value is 60).&lt;BR /&gt;On the other hand there is also &lt;STRONG&gt;"emc_cli.setSessionTimeout(xxx)”&lt;/STRONG&gt;&amp;nbsp;and last but not least you can use “&lt;STRONG&gt;emc_cli.send("show ..., True, timeout)”&lt;/STRONG&gt; to set the value how long it should wait for the response of a command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure if one of these values should help me with my problem or if there is another one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I have increased all values accordingly, but it does not work in any of the cases.&lt;/P&gt;&lt;P&gt;The result is always the same:&lt;/P&gt;&lt;P&gt;When the script starts nothing happens until the "Script Timeout per Device (secs)" from the GUI expires. Then I get the following result:&lt;BR /&gt;&lt;STRONG&gt;"Error: CLI session was closed"&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way: If I send a command in the XMC via "Device-&amp;gt;Tasks-&amp;gt;CLI Commands" I get the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I run the script for a switch where the authentication works faster everything works as it should.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now the question: How can I make the script engine wait longer for authentication?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 15:00:10 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/xmc-script-gt-timeout-during-login-to-device/m-p/64471#M376</guid>
      <dc:creator>StephanH</dc:creator>
      <dc:date>2021-04-21T15:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: XMC script -&gt; Timeout during login to device</title>
      <link>https://community.extremenetworks.com/t5/scripting/xmc-script-gt-timeout-during-login-to-device/m-p/64472#M377</link>
      <description>&lt;P&gt;Hello People,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I happen to have a very similar problem with XMC Version 8.5 (did not test on 8.4; on 8.3 everything works just fine).&amp;nbsp;&lt;BR /&gt;I developed a&amp;nbsp;Workflow which does a firmwareupgrade dependent on the configuration it was executed on. The download and installation of a new firmware takes longer than 30 seconds.&lt;BR /&gt;&lt;BR /&gt;If I just run the command with ‘emc_cli.send(“&amp;lt;command&amp;gt;”)’, the workflow will fail with a message like “Error Session exceeded timeout of: 30 s”. So I made an adjustment like the following:&lt;BR /&gt;&lt;BR /&gt;emc_cli.setSessionTimeout(&amp;lt;timeout_in_seconds&amp;gt;)&lt;BR /&gt;emc_cli.setCommandTimeout(&amp;lt;timeout_in_seconds&amp;gt;)&lt;BR /&gt;emc_cli.close()&lt;BR /&gt;emc_cli.send(“&amp;lt;command&amp;gt;”)&lt;BR /&gt;&lt;BR /&gt;This always worked until (including) version 8.3. On 8.5, however, the new session timeout value seems to be ignored completely and I get the error message from above, again.&lt;BR /&gt;On 8.3 and lower, if a command exceeded the custom set timeout, the error message adjusted the timeout value. On 8.5, it always states 30s, regardles of what I set before.&lt;BR /&gt;&lt;BR /&gt;Other values from the emc_cli object still seem to affect the interface behaviour (for example, I can set another IP-Address using emc_cli.setIpAddress(“&amp;lt;deviceIP&amp;gt;”), close the connection and then run commands&amp;nbsp;on another device.)&lt;BR /&gt;&lt;BR /&gt;Whats funny though, is that I get the correct value displayed when I read the session timeout (‘print str(emc_cli.getSessionTimeout()’)&amp;nbsp;after setting it to a value suitable for my task. However, if I read it before setting a value, ‘emc_cli.getSessionTimeout()’ returns 0.&lt;BR /&gt;&lt;BR /&gt;Now, as I’m unable to find&amp;nbsp;documentation about the emc_cli object, I’m&amp;nbsp;not quite sure if i use this correctly. Does anyone know some documentation about this API or knows another way to set the session timeout inside of a XMC-Python-Script, depending on ones&amp;nbsp;needs?&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 19:21:48 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/xmc-script-gt-timeout-during-login-to-device/m-p/64472#M377</guid>
      <dc:creator>Robert_Heydenbl</dc:creator>
      <dc:date>2021-04-21T19:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: XMC script -&gt; Timeout during login to device</title>
      <link>https://community.extremenetworks.com/t5/scripting/xmc-script-gt-timeout-during-login-to-device/m-p/64473#M378</link>
      <description>&lt;DIV&gt;emc_cli.setSessionTimeout() is working fine in XMC 8.5.4.23.&lt;/DIV&gt;&lt;DIV&gt;But that got broken in XMC 8.5.5.&lt;/DIV&gt;&lt;DIV&gt;There is a Jira for that:XMC-4131&lt;/DIV&gt;</description>
      <pubDate>Mon, 26 Apr 2021 21:12:32 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/xmc-script-gt-timeout-during-login-to-device/m-p/64473#M378</guid>
      <dc:creator>Ludovico_Steven</dc:creator>
      <dc:date>2021-04-26T21:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: XMC script -&gt; Timeout during login to device</title>
      <link>https://community.extremenetworks.com/t5/scripting/xmc-script-gt-timeout-during-login-to-device/m-p/64474#M379</link>
      <description>&lt;P&gt;Hello Robert,&lt;/P&gt;&lt;P&gt;I found out that my problem is not related to the timeouts. In the debug you can see that the prompt detection is not working properly. However, I am working with GTAC to find a solution.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 13:31:52 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/xmc-script-gt-timeout-during-login-to-device/m-p/64474#M379</guid>
      <dc:creator>StephanH</dc:creator>
      <dc:date>2021-04-27T13:31:52Z</dc:date>
    </item>
  </channel>
</rss>

